docker-examples icon indicating copy to clipboard operation
docker-examples copied to clipboard

CockroachDB examples using Docker and Docker Compose

CockroachDB Docker Examples

Examples

  • Single Node Example - Single node CockroachDB instance
  • NGINX Example - Simple 3 node cluster with NGINX as the load balancer
  • NGINX Example - Secure - A secure 3 node cluster with NGINX as the load balancer
  • HAProxy Example - Simple 3 node cluster with HAProxy as the load balancer
  • HAProxy Example - Secure - A secure 3 node cluster with HAProxy as the load balancer
  • HAProxy Example with Workload - Simple 3 node cluster with HAProxy as the load balancer and a client node running the tpcc workload
  • Enterprise Backup Example - CockroachDB Enterprise BACKUP to NGINX based "File Server"
  • YCSB Functional Example - Building and running YCSB against a 3 node CockroachDB cluster
  • OLTPBench Functional Example - [DEPRECATED] Building and running a fork of OLTPBench against a 3 node CockroachDB cluster
  • Netflix Genie Metastore Example - Example using CockroachDB as the metastore for Netflix Genie
  • Apache Druid Metastore Example - Example using CockroachDB as the metastore for Apache Druid

Useful commands

Generate and Download Debug Archive

Generate debug.zip file on crdb-0. For more details see https://www.cockroachlabs.com/docs/stable/debug-zip.html

docker compose exec crdb-0 /cockroach/cockroach debug zip ./cockroach-data/logs/debug.zip --insecure

Copy debug.zip from crdb-0 to current local directory

docker cp crdb-0:/cockroach/cockroach-data/logs/debug.zip .

Prune Docker Images, etc.

Prune all images matching label

docker system prune -a -f --volumes --filter "[email protected]"

Prune all images

docker system prune -a -f --volumes