This Docker composition implements the guide for running Cortex with Cassandra with a single-node Cassandra container and a single-node Cortex container. It also includes Prometheus for some starter data scraping and Grafana for visualization of Cortex.
Start up Cassandra
docker-compose up -d cassandra
Repeat the following until cassandra service shows "Up (healthy)" in the state column:
docker-compose ps
Create Cortex keyspace in Cassandra:
docker-compose exec cassandra \
cqlsh -e "CREATE KEYSPACE cortex WITH replication = {'class':'SimpleStrategy', 'replication_factor' : 1};"
Start up remainder of services:
docker-compose up -d
Logs of all services can be followed using:
docker-compose logs -f
Access Grafana from a browser at http://localhost:3000/, where the default login is admin/admin. You can always "change" the new password to be "admin" to keep things simple for local testing.
A Cortex datasource is pre-create and Prometheus is initially configured to scrape itself and Cortex, so you can start by creating a new dashboard or exploring the data.
The following will remove the containers and volumes:
docker-compose down -v