You can start the Automation Orchestrator server in debug mode to debug issues when developing a plug-in.
Procedure
- Log in to the Automation Orchestrator Appliance command line as root.
- Run the kubectl -n prelude edit deployment vco-app command.
- Edit the deployment YAML file, by adding a debug environment variable to the vco-server-app container. The variable must be added under the env section of the vco-server-app container.
containers:
- command:
...
env:
- name: DEBUG_PORT
value: "your_desired_debug_port"
...
name: vco-server-app
...
Note: When adding the debug environment variable to the
env section, you must follow the YAML indentation formatting as presented in the preceding example.
- Save the changes to the deployment file.
If the edit to the deployment file is successful, you receive the
deployment.extensions/vco-app edited message.
- Generate the Kubernetes configuration file, by running the vracli dev kubeconfig command.
As kubeconfig is a developer environment, you are prompted to confirm that you want to continue. Enter
yes to continue or
no to stop.
- Copy the content of the generated configuration file from apiVersion: v1 up to and including the client-key-data content.
- Save the generated Kubernetes configuration file on your local machine.
- Log out of the Automation Orchestrator Appliance.
- Finish configuring the debug mode on your local machine.
- Open a command-line shell.
- Bind the KUBECONFIG environment variable to the saved configuration file.
Note: This example is based on a Linux environment.
export KUBECONFIG=/file/path/fileName
- To validate that the services are running, run the kubectl cluster-info command.
- To finish configuring the debug mode, perform the following Kubernetes API request.
Note: The value of the
localhost_debug_port variable is the port set in your remote debugging configuration of your Integrated Development Environment (IDE). The value of the
vro_debug_port variable is generated during step 3 of this procedure.
kubectl port-forward pod/vco_app_pod_ID localhost_debug_port:vro_debug_port
Important: When configuring your debugging tool, provide the DNS and IP settings of the local machine where you performed the port forward command.
Results
You have configured server debugging for your
Automation Orchestrator Appliance.