Skip to content

Latest commit

 

History

History
30 lines (19 loc) · 1.65 KB

File metadata and controls

30 lines (19 loc) · 1.65 KB

How to debug with CloudHarness

In order to debug your application locally you can run __main__.py to run as a plain flask application.

Depending on what your application uses of the infrastructure you may need to define some environmental variables and files.

The main file that the cloudharness applications will look for is /opt/cloudharness/resources/allvalues.yaml. This value is a copy of values.yaml that is generated by harness-deployment as deployment/helm/values.yaml. Can copy/link that file to /opt/cloudharness/resources/allvalues.yaml or set the environmental variable CH_VALUES_PATH to use a different path.

In-cluster debug with VS code

Remote debug can be achieved through Skaffold by using the Cloud Code extension for Visual studio code. All required configurations for Skaffold and VS code are generated by the harness-deployment command.

  1. Setup kubectl to use your remote cluster or minikube*. Set the default namespace to be the same namespace you are making the deployment (the same specified on running harness-deployment)
  2. Install Skaffold: see https://skaffold.dev/docs/install/
  3. Install Cloud Code extension on VS Code: https://cloud.google.com/code/docs/vscode/quickstart-local-dev#installing
  4. Launch the "CloudHarness: run/debug configuration" image

Build/deploy with skaffold

Skaffold configuration is generated by harness-deployment.

Can build and deploy with Skaffold with:

skaffold dev (local minikube)

skaffold dev --default-repo=[DOCKER_REGISTRY] (external cluster or forwarded minikube)