Skip to content
This repository has been archived by the owner on May 27, 2024. It is now read-only.
/ ponos Public archive

A ChatOps SRE toil elimination tool

License

Notifications You must be signed in to change notification settings

mattermost/ponos

Ponos

Background

πόνος - pain in greek!

Introduction

Ponos is tool which the Mattermost SRE team uses daily to eliminate toil work with ChatOps tools. It includes the followings:

  • Ponos microservice: it's responsible for the business logic of the toil work
  • Ponos Mattemost App: it's the ChatOps based on Mattermost App Framework which interacts with Ponos service.

Developing

Running

For Ponos HTTP service you need a running provisioner and management of workspaces:

export AWS_REGION=us-east-1
export AWS_PROFILE="<profile-for-infra-migrations>"
export PONOS_ACCOUNT_ID="<aws-account-id-for-testing>"
export PONOS_KMS_KEY="<aws-kms-id-for-testing>"
export PONOS_PROVISIONER_ADDRESS=<your-provisioner-url>
export PONOS_WORKSPACES_ADDRESS=<your-workspaces-url>
export BUILD_SERVICE=server
export PONOS_DB_DSN="host=<db host> user=<db user> password=<db user's password> dbname=<db name>"
make run

For local development, you can run a local PostgreSQL database via

docker-compose up

by using the following as the databases's DSN:

export PONOS_DB_DSN="host=localhost user=ponos_dev_user password=ponos_dev_password dbname=ponos_dev"

In order to run all database migrations locally, you can use:

make goose COMMAND="up"

which uses the goose migration tool under the hood. All goose commands are available.

For Ponos ChatOps Mattermost App you need to run the following:

export PONOS_APP_ROOT_URL=http://<your-ip>:3000
export BUILD_SERVICE=app
make run

Testing

Running tests:

make test

Docker

Docker build and run locally Ponos Service.

make docker-build

docker run --rm -p 3000:3000 \
    -e PONOS_PROVISIONER_ADDRESS=https://<your-url> \
    -e PONOS_WORKSPACES_ADDRESS=https://<your-url>  mattermost/ponos-service:dev-local