Skip to content

Instantly share code, notes, and snippets.

@creepteks
Created July 26, 2021 13:03
Show Gist options
  • Save creepteks/a728c127b402f2c592baacb0cd237b30 to your computer and use it in GitHub Desktop.
Save creepteks/a728c127b402f2c592baacb0cd237b30 to your computer and use it in GitHub Desktop.
```
### create single node cockroach
mkdir certs .safe
cockroach cert create-ca --certs-dir certs/ --ca-key .safe/ca.key
cockroach cert create-node [hostname, set in /etc/hosts or a public dns name] [ip] --certs-dir certs/ --ca-key .safe/ca.key
cockroach cert create-client root --certs-dir certs/ --ca-key .safe/ca.key
### no adverise addr in single node setup, so
cockroach start-single-node --certs-dir certs --listen-addr [host, as above]:26257 --http-addr [host, as above]:8080 --background
cockroach node ls --certs-dir certs/ --host roach
cd certs/
openssl x509 -in client.root.crt -text -noout | less
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment