From d49622e3282e760b3c8802c5e254dcf0d7619dd0 Mon Sep 17 00:00:00 2001 From: Jesse Seldess Date: Tue, 6 Sep 2016 13:13:26 -0400 Subject: [PATCH 1/2] add quit to manual deployment instructions --- manual-deployment.md | 32 ++++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/manual-deployment.md b/manual-deployment.md index f9f886289c4..c532901c1ba 100644 --- a/manual-deployment.md +++ b/manual-deployment.md @@ -60,7 +60,7 @@ For more information, see [Configure Replication Zones](configure-replication-zo Start the built-in SQL client from any machine with the `cockroach` binary. This could be one of the node machines or a different machine. ~~~ shell -$ cockroach sql --insecure --url=postgresql://root@:26257/?sslmode=disable +$ cockroach sql --url=postgresql://root@:26257/?sslmode=disable # Welcome to the cockroach SQL interface. # All statements must be terminated by a semicolon. # To exit: CTRL + D. @@ -95,7 +95,7 @@ CockroachDB supports the PostgreSQL wire protocol, so you can use any available For a list of recommended drivers that we've tested, see [Install Client Drivers](install-client-drivers.html). For some basic code samples, see [Build a Test App](build-a-test-app.html). -### 7. Monitor your cluster +### 7. Monitor the cluster The CockroachDB Admin UI lets you monitor cluster-wide, node-level, and database-level metrics and events. To start up the Admin UI, point your browser to the URL in the `admin` field listed in the standard output of any node on startup, for example: @@ -110,6 +110,18 @@ store[0]: path=cockroach-data CockroachDB Admin UI +### 8. Stop the cluster + +You can stop the nodes (and therefore the cluster) from any machine with the `cockroach` binary as follows: + +~~~ shell +$ cockroach quit --host=node1.example.com +$ cockroach quit --host=node2.example.com +$ cockroach quit --host=node3.example.com +~~~ + +For more details about the `cockroach quit` command, see [Stop a Node](stop-a-node.html). + ## Deploy a Secure Cluster ### 1. Create security certificates @@ -166,7 +178,7 @@ For more information, see [Configure Replication Zones](configure-replication-zo ### 6. Use the built-in SQL client -You can run the built-in SQL client from any machine with the `cockroach` binary, CA cert, client certificate, and client key. Make sure the machine you want to use has these files and then start the client: +You can run the built-in SQL client from any machine with the `cockroach` binary, the CA cert, and a client certificate and key. Make sure the machine you want to use has these files and then start the client: ~~~ shell $ cockroach sql --url="postgresql://root@:26257/?sslcert=root.cert&sslkey=root.key&sslmode=verify-full&sslrootcert=ca.cert" @@ -204,7 +216,7 @@ CockroachDB supports the PostgreSQL wire protocol, so you can use any available For a list of recommended drivers that we've tested, see [Install Client Drivers](install-client-drivers.html). For some basic code samples, see [Build a Test App](build-a-test-app.html). -### 8. Monitor your cluster +### 8. Monitor the cluster The CockroachDB Admin UI lets you monitor cluster-wide, node-level, and database-level metrics and events. To access the Admin UI, from the address specified by the `--http-addr` flag in steps 2 and 3, point a browser to the URL in the `admin` field listed in the standard output on startup, for example: @@ -221,6 +233,18 @@ store[0]: path=cockroach-data {{site.data.alerts.callout_info}}In cases where you set --http-addr to localhost and need to access the Admin UI from a separate machine, you can use SSH to tunnel from the machine to a node.{{site.data.alerts.end}} +### 9. Stop the cluster + +You can stop the nodes (and therefore the cluster) from any machine with the `cockroach` binary, the CA cert, and a client certificate and key. Make sure the machine you want to use has these files and then stop the nodes: + +~~~ shell +$ cockroach quit --host= --ca-cert=ca.cert --cert=root.cert --key=root.key +$ cockroach quit --host= --ca-cert=ca.cert --cert=root.cert --key=root.key +$ cockroach quit --host= --ca-cert=ca.cert --cert=root.cert --key=root.key +~~~ + +For more details about the `cockroach quit` command, see [Stop a Node](stop-a-node.html). + ## See Also - [Cloud Deployment](cloud-deployment.html) From 9aec076e2ae26e9f9ef47a2703ec98620e0a7545 Mon Sep 17 00:00:00 2001 From: Jesse Seldess Date: Tue, 6 Sep 2016 14:40:24 -0400 Subject: [PATCH 2/2] add quit to secure local cluster instructions --- secure-a-cluster.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/secure-a-cluster.md b/secure-a-cluster.md index ca605b33eea..ba2d36404b3 100644 --- a/secure-a-cluster.md +++ b/secure-a-cluster.md @@ -100,6 +100,18 @@ Reopen the [Admin UI](explore-the-admin-ui.html) by pointing your browser to `ht Note that your browser will consider the CockroachDB-created certificate invalid; you’ll need to click through a warning message to get to the UI. +## Step 7. Stop the cluster + +When you're ready to stop the cluster, quit each node as follows: + +~~~ shell +$ cockroach quit --host=localhost --ca-cert=certs/ca.cert --cert=certs/root.cert --key=certs/root.key +$ cockroach quit --host=localhost --port=26258 --ca-cert=certs/ca.cert --cert=certs/root.cert --key=certs/root.key +$ cockroach quit --host=localhost --port=26259 --ca-cert=certs/ca.cert --cert=certs/root.cert --key=certs/root.key +~~~ + +For more details about the `cockroach quit` command, see [Stop a Node](stop-a-node.html). + ## What's Next? - Learn more about [CockroachDB SQL](learn-cockroachdb-sql.html) and the [built-in SQL client](use-the-built-in-sql-client.html)