Build from SourceΒΆ
Install Robusta from source to develop new features for the Robusta Engine (robusta-runner).
To install Robusta as a user, follow Monitor Kubernetes from Scratch instead.
To develop new playbook actions, you don't need to install from source. Refer to Developing New Actions.
Using SkaffoldΒΆ
git clone
the source code.Run
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
Run
robusta gen-config
and copy the result todeployment/generated_values.yaml
Run
skaffold run --tail
. On M1 Macs, add-p apple-m1-dev
Common Errors
Occurs on Mac OS if dependencies are missing. Run brew install libjpeg
.
Sometimes, when attaching a debugger to Robusta the following error occurs: NotADirectoryError: [Errno 20] Not a directory
If this occurs, disable the Attach to subprocess
option on your debugger.
Want Faster Builds? β‘οΈ
Install gcloud
Run
gcloud auth application-default login
Build with
skaffold run -p gcloud-build
Local DevelopmentΒΆ
When Using Skaffold, Robusta runs inside a Kubernetes cluster.
For faster code changes, you can run Robusta on your local computer:
git clone
the source codeRun
./run_runner_locally.sh
Note
You must have a cluster with Robusta installed for this to work. The runner needs a configuration file to run and it extracts it from your existing cluster.
Additional tips:
If you want to develop playbooks locally, configure
playbookRepos
with a local path to your playbooks directory.Your local runner wont incoming Kubernetes changes or Prometheus alerts.
For instructions on simulating Prometheus alerts, try
poetry run robusta playbooks trigger --dry-run prometheus_alert alert_name=KubePodCrashLooping namespace=default pod_name=example-pod
CLI DevelopmentΒΆ
To develop the robusta
cli:
git clone
the source codepoetry install
poetry run robusta
Alternative method, using pip not poetry
Install the robusta
cli into your global python environment:
git clone
the source codepip3 install .
Running TestsΒΆ
See tests/README.md