Skip to content

Latest commit

 

History

History
145 lines (93 loc) · 3.68 KB

installation.md

File metadata and controls

145 lines (93 loc) · 3.68 KB

Installing HolmesGPT

In-Cluster Installation (Recommended)

If you use Kubernetes, we recommend installing Holmes + Robusta as a unified package so you can:

  • Analyze Prometheus alerts easily
  • Use HolmesGPT in a friendly web UI
  • Get started without an OpenAI API Key (but you can bring your own LLM if you prefer)

Sign up for Robusta SaaS (Kubernetes cluster required) or contact us about on-premise options.

CLI Installation

You can install Holmes as a CLI tool and run it on your local machine:

Brew (Mac/Linux)
  1. Add our tap:
brew tap robusta-dev/homebrew-holmesgpt
  1. Install holmesgpt:
brew install holmesgpt
  1. Check that installation was successful. This will take a few seconds on the first run - wait patiently.:
holmes --help
  1. Apply an example Pod to Kubernetes with an error that Holmes can investigate:
kubectl apply -f https://raw.githubusercontent.com/robusta-dev/kubernetes-demos/main/pending_pods/pending_pod_node_selector.yaml
  1. Setup an API key

  2. Run holmesgpt:

holmes ask "what is wrong with the user-profile-import pod?"
Docker Container

You can run HolmesGPT via a prebuilt Docker container:

docker.pkg.dev/genuine-flight-317411/devel/holmes

Here is an example, that mounts relevant config files so that HolmesGPT can use kubectl and other tools:

docker run -it --net=host -v ~/.holmes:/root/.holmes -v ~/.aws:/root/.aws -v ~/.config/gcloud:/root/.config/gcloud -v $HOME/.kube/config:/root/.kube/config us-central1-docker.pkg.dev/genuine-flight-317411/devel/holmes ask "what pods are unhealthy and why?"

Don't forget to setup Setup an API key first.

Pip and Pipx

You can install HolmesGPT from source with pip or pipx. Pipx is recommended, as it prevents dependency conflicts.

First Pipx

Then install HolmesGPT from git:

pipx install "https://github.com/robusta-dev/holmesgpt/archive/refs/heads/master.zip"

Verify that HolmesGPT was installed by checking the version:

holmes version

Setup an API key and start testing HolmesGPT:

holmes ask "what pods are unhealthy and why?"

When new versions of HolmesGPT are released, you can upgrade HolmesGPT with pipx:

pipx upgrade holmesgpt
From Source (Python Poetry)

First install poetry (the python package manager)

git clone https://github.com/robusta-dev/holmesgpt.git
cd holmesgpt
poetry install --no-root

Setup an API key and run HolmesGPT:

poetry run python3 holmes.py ask "what pods are unhealthy and why?"
From Source (Docker)

Clone the project from github, setup an API key, and then run:

cd holmesgpt
docker build -t holmes . -f Dockerfile.dev
docker run -it --net=host -v -v ~/.holmes:/root/.holmes -v ~/.aws:/root/.aws -v ~/.config/gcloud:/root/.config/gcloud -v $HOME/.kube/config:/root/.kube/config holmes ask "what pods are unhealthy and why?"
Python API

You can use Holmes as a library and pass in your own LLM implementation. This is particularly useful if LiteLLM or the default Holmes implementation does not suit you.

See an example implementation here.