Skip to content

Instantly share code, notes, and snippets.

@paigeadelethompson
Last active November 5, 2024 20:07
Show Gist options
  • Save paigeadelethompson/0cc3c3b1952338051fa29f91fb1c3b4c to your computer and use it in GitHub Desktop.
Save paigeadelethompson/0cc3c3b1952338051fa29f91fb1c3b4c to your computer and use it in GitHub Desktop.
docker run -it --rm -v $(pwd)/crdb/certs:/certs -v $(pwd)/crdb/my-safe-directory:/my-safe-directory docker.io/cockroachdb/cockroach:latest cert create-ca --certs-dir=/certs --ca-key=/my-safe-directory/ca.key
docker run -it --rm -v $(pwd)/crdb/certs:/certs -v $(pwd)/crdb/my-safe-directory:/my-safe-directory docker.io/cockroachdb/cockroach:latest cert create-node vps-1-1.8n1.io 1.2.3.4 aaaa:bbbb:cccc:dddd:eeee::ffff 127.0.0.1 localhost vps-1-1 --certs-dir=/certs --ca-key=/my-safe-directory/ca.key
docker run -it --rm -v $(pwd)/crdb/certs:/certs -v $(pwd)/crdb/my-safe-directory:/my-safe-directory docker.io/cockroachdb/cockroach:latest cert create-client root --certs-dir=/certs --ca-key=/my-safe-directory/ca.key
docker run -it -d --restart always --net host -v $(pwd)/crdb/data:/cockroach/cockroach-data -v $(pwd)/crdb/certs:/certs docker.io/cockroachdb/cockroach:latest start --certs-dir=/certs --join=vps-1-2.8n1.io,vps-1-3.8n1.io --listen-addr=:26257 --http-addr=:443 --advertise-addr=vps-1-1.8n1.io
docker run -it --rm --net host -v $(pwd)/crdb/certs:/certs docker.io/cockroachdb/cockroach:latest init --certs-dir=/certs --host vps-1-1.8n1.io
docker run -v $(pwd)/dump:/dump -v $(pwd)/aiven.pem:/aiven.pem -it --rm --entrypoint pg_dump postgres:16.4-bullseye --inserts --rows-per-insert 256 --format=custom -d "port=10930 host=matrix-paige-c04c.g.aivencloud.com user=avnadmin dbname=defaultdb sslrootcert=/aiven.pem sslmode=verify-ca" -f /dump/dump.sql -F p
docker run --net host -v $(pwd)/dump:/dump -v $(pwd)/crdb/certs:/certs -it --rm --entrypoint psql postgres:16.4-bullseye -j3 -a -d "port=26257 host=vps-1-1.netcrave.network user=root dbname=defaultdb sslrootcert=/certs/ca.crt sslkey=/certs/client.root.key sslcert=/certs/client.root.crt sslmode=verify-ca" -f /dump/dump.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment