This module creates a local 6 node docker cluster that is useful for integration testing the runner
and loader
modules but not suitable for performance testing. For true performance testing, use the terraform
module.
node-a
- CockroachDB node in regionA
node-b
- CockroachDB node in regionB
node-c
- CockroachDB node in regionC
node-d
- CockroachDB node in regionD
node-e
- CockroachDB node in regionE
node-f
- CockroachDB node in regionF
lb
- HAProxy acting as load balancerprometheus
- Prometheus servergrafana
- Grafana UI
- Create a file called
.env
in the root of thedocker
folder with the following content...ReplaceORG=<MY LICENSE ORG> KEY=<MY LICENSE KEY>
<MY LICENSE ORG>
with the organization associated with your enterprise license and<MY LICENSE KEY>
with your enterprise license key. - Run
./up.sh
ordocker-compose up -d
to start the Docker services - Visit the CockroachDB UI @ http://localhost:8080
- Visit the HAProxy UI @ http://localhost:8081
- Visit the Grafana UI @ http://localhost:3000. Default username and password are
admin
/admin
. - Visit the Prometheus UI @ http://localhost:9090
- Have fun!
You can run ./down.sh
to stop the Docker services and ./prune.sh
to do a Docker system prune when you are finished.
Ranges and data distribution can be viewed in the UI here (http://localhost:8080/#/data-distribution) or via the following commands:
docker-compose exec east-1 /cockroach/cockroach sql --insecure --database=store_demo --execute="SELECT * FROM [SHOW EXPERIMENTAL_RANGES FROM TABLE auth] WHERE \"start_key\" IS NOT NULL AND \"start_key\" NOT LIKE '%Prefix%';"
docker-compose exec east-1 /cockroach/cockroach sql --insecure --database=store_demo --execute="SELECT * FROM [SHOW EXPERIMENTAL_RANGES FROM TABLE acct] WHERE \"start_key\" IS NOT NULL AND \"start_key\" NOT LIKE '%Prefix%';"
docker exec -ti node-a /bin/bash
docker exec -ti node-b /bin/bash
docker exec -ti node-c /bin/bash
docker exec -ti node-d /bin/bash
docker exec -ti node-e /bin/bash
docker exec -ti node-f /bin/bash