Skip to content

Instantly share code, notes, and snippets.

@payton
Last active May 4, 2018 19:47
Show Gist options
  • Save payton/b7fbce39833cee6bc73364024fd54399 to your computer and use it in GitHub Desktop.
Save payton/b7fbce39833cee6bc73364024fd54399 to your computer and use it in GitHub Desktop.
Cabot Check Development Guide

Cabot Check Development

This is an unofficial community-created guide

Cabot Setup

  1. Clone cabot
  2. Copy development conf: cp conf/development.env.example conf/development.env
  3. Create a new virtual environment in the Cabot root directory: python -m virtualenv venv
  4. Activate your virtual environment: source venv/bin/activate
  5. Install dependencies: pip install -r requirements.txt -r requirements-dev.txt -r requirements-plugins

Create new check

  1. Create a new app for check: python manage.py startapp name_of_check
  2. Develop custom check based off of cabot-check-cloudwatch or cabot-check-network.
    1. TODO: Add check creation instructions

Add new check to Cabot

To add your newly created Cabot check, we will create and upload a Python package to pypi. If you haven't already, create an account there.

  1. In the project root directory, execute the following commands (more information)
    1. python setup.py sdist
    2. twine upload dist/*
  2. Verify your package has uploaded by viewing your projects
  3. In the Cabot project, add the package/version to requirements-plugins.txt
  4. Modify CABOT_PLUGINS_ENABLED in default.env with your new package
  5. Run
    1. docker-compose build
    2. docker-compose up (don't use -d if you are debugging)
  6. Visit the dashboard at 127.0.0.1:5001

Alternative non-pypi approach

See cabotapp/cabot-check-network#2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment