Installation

Quickstart for testing

If you just want to checkout Confidant and aren’t looking to deploy it into production, it’s possible to get started without any external dependencies. Check out the test and development quickstart for this.

Note that you should never run with this quickstart configuration in production.

Docker installation

To run confidant in Docker

It’s necessary to export your configuration variables before running confidant. You can either specify them as multiple -e options, or you can put them into an environment file and use –env-file.

A production-ready docker image is available in GitHub Container Registry.

docker pull ghcr.io/lyft/confidant:master

This image can then be ran with any of your desired command line flags:

docker run --rm ghcr.io/lyft/confidant:master --help

To build the image

If you want to build the image and store it in your private registry, you can do the following:

git clone https://github.com/lyft/confidant
cd confidant
docker build -t lyft/confidant .

pip installation

Warning: this is still a work in progress and it may not be working right now. We’ll remove this warning when we have pip installation fully working.

  1. Using Ubuntu or Debian (please help with non-Ubuntu/Debian install instructions!)

  2. Using gunicorn as the wsgi server

  3. venv location: /srv/confidant/venv

Make a virtualenv and install pip requirements

sudo apt-get install -y python python-pip python-virtualenv python-dev build-essential libffi-dev libxml2-dev libxmlsec1-dev
cd /srv/confidant
virtualenv venv
source venv/bin/activate
pip install -U pip
pip install confidant
deactivate

Note that the pip package includes the minified, generated frontend artifacts, in the dist directory. This can be configured via the STATIC_FOLDER setting.

Manual installation

Assumptions:

  1. Using Ubuntu or Debian (please help with non-Ubuntu/Debian install instructions!)

  2. Using gunicorn as the wsgi server

  3. Installation location: /srv/confidant/venv

  4. venv location: /srv/confidant/venv

  5. node_modules location: /srv/confidant/node_modules

Clone Confidant

cd /srv
git clone https://github.com/lyft/confidant

Make a virtualenv and install pip requirements

sudo apt-get install -y python python-pip python-virtualenv python-dev build-essential libffi-dev libxml2-dev libxmlsec1-dev
cd /srv/confidant
virtualenv venv
source venv/bin/activate
pip install -U pip
pip install -r requirements.txt
deactivate

Build the frontend

cd /srv/confidant
sudo apt-get install -y npm nodejs nodejs-legacy git git-core
gem install compass
npm install grunt-cli
npm install
node_modules/grunt-cli/bin/grunt build

Run confidant

It’s necessary to export your configuration variables before running confidant. The easiest method is to source a file that exports your environment before running confidant.

source my_config
cd /srv/confidant
source venv/bin/activate
gunicorn confidant.wsgi:app --workers=2 -k gevent

That’s it. See the configuration documentation about how to configure and run.