Setup¶
These are instructions for developing Robusta's core platform.
Most users are looking for the regular Installation or the documentation on Writing Playbook Actions. For developing Robusta itself, read on!
Installing Robusta in-cluster from source¶
git clone
the source code.Run
robusta gen-config
and copy the result todeployment/generated_values.yaml
Run
skaffold run --tail
, orskaffold run --tail -p apple-m1-dev
if you're using Apple M1
Common errors¶
If you encounter an error like:
"https://prometheus-community.github.io/helm-chart" is not a valid chart repository or cannot be reached
then run:
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
If you're on Mac OS and receive errors about Pillow or libjpeg when running
poetry install
then runbrew install libjpeg
first.If you encounter
NotADirectoryError: [Errno 20] Not a directory
while trying to debug, you may need to disable theAttach to subprocess
option on your debugger.
For faster builds that are running on Google Cloud¶
Install gcloud
Run
gcloud auth application-default login
- Now when you want to build:
Run
skaffold run -p gcloud-build
Running Robusta locally¶
A very convenient way to develop Robusta is to run it locally:
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
Running Robusta cli locally¶
This is only necessary if you are developing features for the cli itself.
Using poetry¶
git clone
the source codepoetry install
poetry run robusta
Alternative method using pip¶
This method installs robusta into your global python environment
git clone
the source codepip3 install .
Running Tests¶
See tests/README.md