Skip to main content
Version: 3.1.0

Install Resoto with pip

pip is the package installer for Python and allows for easy installation of Python packages in Linux environments.

Prerequisites

Installing Resoto

Resoto consists of multiple components that are published as individual Python packages:

  1. 📦 resotocore maintains the infrastructure graph.
  2. 📦 resotoworker collects infrastructure data from the cloud provider APIs.
  3. 📦 resotometrics exports metrics in Prometheus format.
  4. 📦 resotoshell is the command-line interface (CLI) used to interact with Resoto.
  5. A list of collector plugins. In this guide we will install the most prominent collector plugins. See this list for an overview of all available plugins.
    1. 📦 resoto-plugin-aws collects data from AWS.
    2. 📦 resoto-plugin-gcp collects data from GCP.
    3. 📦 resoto-plugin-k8s collects data from Kubernetes.
    4. 📦 resoto-plugin-digitalocean collects data from DigitalOcean.
Installing Resoto using pip
$ mkdir -p ~/resoto
$ cd ~/resoto
$ python3 -m venv resoto-venv # Create a virtual Python environment.
$ source resoto-venv/bin/activate # Activate the virtual Python environment.
$ python -m ensurepip --upgrade # Ensure pip is available.
$ pip install -U resotocore==3.1.0 resotoworker==3.1.0 resotometrics==3.1.0 resotoshell==3.1.0 resoto-plugin-aws==3.1.0 resoto-plugin-gcp==3.1.0 resoto-plugin-k8s==3.1.0 resoto-plugin-digitalocean==3.1.0
# Generate two random passphrases. One to secure the graph database and one to secure resotocore with.
$ echo $(LC_ALL=C tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c 20) > .graphdb-password
$ echo $(LC_ALL=C tr -dc _A-Z-a-z-0-9 < /dev/urandom | head -c 20) > .pre-shared-key
$ chmod 600 .graphdb-password .pre-shared-key

Installing ArangoDB

Follow the ArangoDB installation instructions for your Linux distribution. Also read the Linux Operating System Configuration guide for optimal database performance.

A copy'paste ready snippet that worked at the time of writing this documentation:

$ mkdir -p ~/resoto/arangodb ~/resoto/data
$ cd ~/resoto
$ curl -L -o arangodb3.tar.gz https://download.arangodb.com/arangodb39/Community/Linux/arangodb3-linux-3.9.1.tar.gz
$ tar xzf arangodb3.tar.gz --strip-components=1 -C arangodb
$ rm -f arangodb3.tar.gz
$ arangodb/bin/arangod --database.directory ~/resoto/data

This will start ArangoDB on the current shell which is useful for testing. Once Resoto Core starts it will automatically secure the ArangoDB installation using the password provided in the .graphdb-password file (unless explicitly turned off using the --graphdb-bootstrap-do-not-secure flag).

Read the section Securing ArangoDB for details on how to generate certificates and encrypt the connection between Resoto Core and the graph database.

Installing the WebUI

A copy'paste ready snippet to download an extract the UI locally.

$ mkdir -p ~/resoto/ui
$ cd ~/resoto
$ curl -L -o ui.tar.gz https://cdn.some.engineering/resoto-ui/releases/3.0.2.tar.gz
$ tar xzf ui.tar.gz -C ui
$ rm -f ui.tar.gz

Running Resoto

Create multiple shells/tabs and run each component in a separate shell:

$ graphdb_password=$(< ~/resoto/.graphdb-password)
$ pre_shared_key=$(< ~/resoto/.pre-shared-key)
$ source ~/resoto/resoto-venv/bin/activate
$ resotocore --graphdb-password "$graphdb_password" --graphdb-server http://localhost:8529 --psk "$pre_shared_key" --ui-path ~/resoto/ui

Resoto Core only listens on localhost:8900 by default. Resoto Core can be configured to listen on all interfaces if desired.

Launching the Web UI

  1. Resoto UI listens on port 8900 by default. You can access it by opening https://localhost:8900 in your browser.

    note

    The SSL certificate is self-signed, but you can safely ignore any browser warnings.

  2. If it is your first time starting Resoto UI, the setup wizard will appear and help you configure Resoto:

    Screenshot of Resoto UI

Launching the Command-Line Interface

The resh command is used to interact with resotocore.

Simply execute the following to access the Resoto Shell interface:

$ pre_shared_key=$(< ~/resoto/.pre-shared-key)
$ source ~/resoto/resoto-venv/bin/activate
$ resh --resotocore-uri https://localhost:8900 --psk "$pre_shared_key"

Resoto Shell