An open API service indexing awesome lists of open source software.

https://github.com/mattermost/ponos

A ChatOps SRE toil elimination tool
https://github.com/mattermost/ponos

chatops sre sre-team toil-elimination

Last synced: 2 months ago
JSON representation

A ChatOps SRE toil elimination tool

Awesome Lists containing this project

README

          

# Ponos

## Background

[πόνος](https://en.wikipedia.org/wiki/Ponos) - 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](https://developers.mattermost.com/integrate/apps/) which interacts with Ponos service.

## Developing

### Running

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

```bash
export AWS_REGION=us-east-1
export AWS_PROFILE=""
export PONOS_ACCOUNT_ID=""
export PONOS_KMS_KEY=""
export PONOS_PROVISIONER_ADDRESS=
export PONOS_WORKSPACES_ADDRESS=
export BUILD_SERVICE=server
export PONOS_DB_DSN="host= user= password= dbname="
make run
```

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

```bash
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:

```bash
export PONOS_APP_ROOT_URL=http://:3000
export BUILD_SERVICE=app
make run
```

### Testing

Running tests:

```bash
make test
```

### Docker

Docker build and run locally Ponos Service.

```bash
make docker-build

docker run --rm -p 3000:3000 \
-e PONOS_PROVISIONER_ADDRESS=https:// \
-e PONOS_WORKSPACES_ADDRESS=https:// mattermost/ponos-service:dev-local
```