Skip to content

Commit 2f22533

Browse files
author
Jesse Seldess
committed
Update all Get Started pages
1 parent 7d01f68 commit 2f22533

23 files changed

+225
-130
lines changed

_includes/app/common-steps.md

+10-7
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,25 @@ For the purpose of this tutorial, you need only one CockroachDB node running in
44

55
~~~ shell
66
# Start node 1:
7-
$ cockroach start --background \
7+
$ cockroach start --insecure \
8+
--background \
89
--store=hello-1
910
~~~
1011

1112
But as you might've seen in the [Start a Local Cluster](start-a-local-cluster.html) tutorial, it's incredibly easy to start and join addition nodes, if you want to simulate a real cluster:
1213

1314
~~~ shell
1415
# Start node 2:
15-
$ cockroach start --background \
16+
$ cockroach start --insecure \
17+
--background \
1618
--store=hello-2 \
1719
--port=26258 \
1820
--http-port=8081 \
1921
--join=localhost:26257
2022

2123
# Start node 3:
22-
$ cockroach start --background \
24+
$ cockroach start --insecure \
25+
--background \
2326
--store=hello-3 \
2427
--port=26259 \
2528
--http-port=8082 \
@@ -31,19 +34,19 @@ $ cockroach start --background \
3134
As the `root` user, use the [`cockroach user`](create-and-manage-users.html) command to create a new user, `maxroach`.
3235

3336
~~~ shell
34-
$ cockroach user set maxroach
37+
$ cockroach user set maxroach --insecure
3538
~~~
3639

3740
## Step 4. Create a database and grant privileges
3841

3942
As the `root` user, use the [built-in SQL client](use-the-built-in-sql-client.html) to create a `bank` database.
4043

4144
~~~ shell
42-
$ cockroach sql -e 'CREATE DATABASE bank'
45+
$ cockroach sql --insecure -e 'CREATE DATABASE bank'
4346
~~~
4447

4548
Then [grant privileges](grant.html) to the `maxroach` user
4649

4750
~~~ shell
48-
$ cockroach sql -e 'GRANT ALL ON DATABASE bank TO maxroach'
49-
~~~
51+
$ cockroach sql --insecure -e 'GRANT ALL ON DATABASE bank TO maxroach'
52+
~~~

_includes/start_in_docker/mac-linux-steps.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
Make sure you have already [installed the official CockroachDB Docker image](install-cockroachdb.html).
44

5+
<!-- TODO: update the asciicast
56
Also, feel free to watch this process in action before going through the steps yourself. Note that you can copy commands directly from the video, and you can use **<** and **>** to go back and forward.
67
78
<asciinema-player class="asciinema-demo" src="asciicasts/start-a-local-cluster-docker.json" cols="107" speed="2" theme="monokai" poster="npt:0:43" title="Start a Local Cluster in Docker"></asciinema-player>
9+
-->
810

911
## Step 1. Create a bridge network
1012

@@ -75,7 +77,7 @@ These commands add two more containers and start CockroachDB nodes inside them,
7577
Now that you've scaled to 3 nodes, you can use any node as a SQL gateway to the cluster. To demonstrate this, use the `docker exec` command to start the [built-in SQL shell](use-the-built-in-sql-client.html) in the first container:
7678

7779
~~~ shell
78-
$ docker exec -it roach1 ./cockroach sql
80+
$ docker exec -it roach1 ./cockroach sql --insecure
7981
# Welcome to the cockroach SQL interface.
8082
# All statements must be terminated by a semicolon.
8183
# To exit: CTRL + D.
@@ -111,7 +113,7 @@ Exit the SQL shell on node 1:
111113
Then start the SQL shell in the second container:
112114

113115
~~~ shell
114-
$ docker exec -it roach2 ./cockroach sql
116+
$ docker exec -it roach2 ./cockroach sql --insecure
115117
# Welcome to the cockroach SQL interface.
116118
# All statements must be terminated by a semicolon.
117119
# To exit: CTRL + D.

build-a-c++-app-with-cockroachdb.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ You can copy the code or <a href="https://raw.githubusercontent.com/cockroachdb/
4949
After running the code, use the [built-in SQL client](use-the-built-in-sql-client.html) to verify that funds were transferred from one account to another:
5050

5151
~~~ shell
52-
$ cockroach sql -e 'SELECT id, balance FROM accounts' --database=bank
52+
$ cockroach sql --insecure -e 'SELECT id, balance FROM accounts' --database=bank
5353
~~~
5454

5555
~~~

build-a-clojure-app-with-cockroachdb.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,10 @@ Install the Clojure `lein` utility as described in its [official documentation](
2424
As the `maxroach` user, use the [built-in SQL client](use-the-built-in-sql-client.html) to create an `accounts` table in the new database.
2525

2626
~~~ shell
27-
$ cockroach sql --database=bank --user=maxroach -e \
28-
'CREATE TABLE accounts (id INT PRIMARY KEY, balance INT)'
29-
~~~
30-
31-
~~~
32-
CREATE TABLE
27+
$ cockroach sql --insecure \
28+
--database=bank \
29+
--user=maxroach \
30+
-e 'CREATE TABLE accounts (id INT PRIMARY KEY, balance INT)'
3331
~~~
3432

3533
## Step 6. Run the Clojure code
@@ -85,7 +83,7 @@ lein run
8583
After running the code, use the [built-in SQL client](use-the-built-in-sql-client.html) to verify that funds were transferred from one account to another:
8684

8785
~~~ shell
88-
$ cockroach sql -e 'SELECT id, balance FROM accounts' --database=bank
86+
$ cockroach sql --insecure -e 'SELECT id, balance FROM accounts' --database=bank
8987
~~~
9088

9189
~~~

build-a-go-app-with-cockroachdb-gorm.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ Initial balances:
5858
To verify that the table and rows were created successfully, you can again use the [built-in SQL client](use-the-built-in-sql-client.html):
5959

6060
~~~ shell
61-
$ cockroach sql -e 'SHOW TABLES' --database=bank
61+
$ cockroach sql --insecure -e 'SHOW TABLES' --database=bank
6262
~~~
6363

6464
~~~
@@ -71,7 +71,7 @@ $ cockroach sql -e 'SHOW TABLES' --database=bank
7171
~~~
7272

7373
~~~ shell
74-
$ cockroach sql -e 'SELECT id, balance FROM accounts' --database=bank
74+
$ cockroach sql --insecure -e 'SELECT id, balance FROM accounts' --database=bank
7575
~~~
7676

7777
~~~

build-a-go-app-with-cockroachdb.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Success
9191
However, if you want to verify that funds were transferred from one account to another, use the [built-in SQL client](use-the-built-in-sql-client.html):
9292

9393
~~~ shell
94-
$ cockroach sql -e 'SELECT id, balance FROM accounts' --database=bank
94+
$ cockroach sql --insecure -e 'SELECT id, balance FROM accounts' --database=bank
9595
~~~
9696

9797
~~~

build-a-java-app-with-cockroachdb-hibernate.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Toward the end of the output, you should see:
6868
To verify that the table and rows were created successfully, you can again use the [built-in SQL client](use-the-built-in-sql-client.html):
6969

7070
~~~ shell
71-
$ cockroach sql -e 'SHOW TABLES' --database=bank
71+
$ cockroach sql --insecure -e 'SHOW TABLES' --database=bank
7272
~~~
7373

7474
~~~
@@ -81,7 +81,7 @@ $ cockroach sql -e 'SHOW TABLES' --database=bank
8181
~~~
8282

8383
~~~ shell
84-
$ cockroach sql -e 'SELECT id, balance FROM accounts' --database=bank
84+
$ cockroach sql --insecure -e 'SELECT id, balance FROM accounts' --database=bank
8585
~~~
8686

8787
~~~

build-a-java-app-with-cockroachdb.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ You can copy the code or
5555
After running the code, use the [built-in SQL client](use-the-built-in-sql-client.html) to verify that funds were transferred from one account to another:
5656

5757
~~~ shell
58-
$ cockroach sql -e 'SELECT id, balance FROM accounts' --database=bank
58+
$ cockroach sql --insecure -e 'SELECT id, balance FROM accounts' --database=bank
5959
~~~
6060

6161
~~~

build-a-nodejs-app-with-cockroachdb-sequelize.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ The output should be:
5757
To verify that the table and rows were created successfully, you can again use the [built-in SQL client](use-the-built-in-sql-client.html):
5858

5959
~~~ shell
60-
$ cockroach sql -e 'SHOW TABLES' --database=bank
60+
$ cockroach sql --insecure -e 'SHOW TABLES' --database=bank
6161
~~~
6262

6363
~~~
@@ -70,7 +70,7 @@ $ cockroach sql -e 'SHOW TABLES' --database=bank
7070
~~~
7171

7272
~~~ shell
73-
$ cockroach sql -e 'SELECT id, balance FROM accounts' --database=bank
73+
$ cockroach sql --insecure -e 'SELECT id, balance FROM accounts' --database=bank
7474
~~~
7575

7676
~~~

build-a-nodejs-app-with-cockroachdb.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ You can copy the code or
6666
After running the code, use the [built-in SQL client](use-the-built-in-sql-client.html) to verify that funds were transferred from one account to another:
6767

6868
~~~ shell
69-
$ cockroach sql -e 'SELECT id, balance FROM accounts' --database=bank
69+
$ cockroach sql --insecure -e 'SELECT id, balance FROM accounts' --database=bank
7070
~~~
7171

7272
~~~

build-a-php-app-with-cockroachdb.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,10 @@ Install the php-pgsql driver as described in the [official documentation](http:/
2424
As the `maxroach` user, use the [built-in SQL client](use-the-built-in-sql-client.html) to create an `accounts` table in the new database.
2525

2626
~~~ shell
27-
$ cockroach sql --database=bank --user=maxroach -e \
28-
'CREATE TABLE accounts (id INT PRIMARY KEY, balance INT)'
29-
~~~
30-
31-
~~~
32-
CREATE TABLE
27+
$ cockroach sql --insecure \
28+
--database=bank \
29+
--user=maxroach \
30+
-e 'CREATE TABLE accounts (id INT PRIMARY KEY, balance INT)'
3331
~~~
3432

3533
## Step 6. Run the PHP code
@@ -63,7 +61,7 @@ You can copy the code or
6361
After running the code, use the [built-in SQL client](use-the-built-in-sql-client.html) to verify that funds were transferred from one account to another:
6462

6563
~~~ shell
66-
$ cockroach sql -e 'SELECT id, balance FROM accounts' --database=bank
64+
$ cockroach sql --insecure -e 'SELECT id, balance FROM accounts' --database=bank
6765
~~~
6866

6967
~~~

build-a-python-app-with-cockroachdb-sqlalchemy.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ The output should be:
6060
To verify that the table and rows were created successfully, you can again use the [built-in SQL client](use-the-built-in-sql-client.html):
6161

6262
~~~ shell
63-
$ cockroach sql -e 'SHOW TABLES' --database=bank
63+
$ cockroach sql --insecure -e 'SHOW TABLES' --database=bank
6464
~~~
6565

6666
~~~
@@ -73,7 +73,7 @@ $ cockroach sql -e 'SHOW TABLES' --database=bank
7373
~~~
7474

7575
~~~ shell
76-
$ cockroach sql -e 'SELECT id, balance FROM accounts' --database=bank
76+
$ cockroach sql --insecure -e 'SELECT id, balance FROM accounts' --database=bank
7777
~~~
7878

7979
~~~

build-a-python-app-with-cockroachdb.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ This tutorial shows you how build a simple Python application with CockroachDB u
1919

2020
Make sure you have already [installed CockroachDB](install-cockroachdb.html).
2121

22-
<div class="filter-content" markdown="1" data-scope="driver">
22+
<!-- TODO: update asciicast
2323
Also, feel free to watch this process in action before going through the steps yourself. Note that you can copy commands directly from the video, and you can use **<** and **>** to go back and forward.
2424
2525
<asciinema-player class="asciinema-demo" src="asciicasts/build-a-python-app-with-driver.json" cols="107" speed="2" theme="monokai" poster="npt:0:24" title="Build a Python App - Client Driver"></asciinema-player>
26-
</div>
26+
-->
2727

2828
## Step 1. Install the psycopg2 driver
2929

@@ -96,7 +96,7 @@ Balances after transfer:
9696
However, if you want to verify that funds were transferred from one account to another, use the [built-in SQL client](use-the-built-in-sql-client.html):
9797

9898
~~~ shell
99-
$ cockroach sql -e 'SELECT id, balance FROM accounts' --database=bank
99+
$ cockroach sql --insecure -e 'SELECT id, balance FROM accounts' --database=bank
100100
~~~
101101

102102
~~~

build-a-ruby-app-with-cockroachdb-activerecord.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ The output should be:
5959
To verify that the table and rows were created successfully, you can again use the [built-in SQL client](use-the-built-in-sql-client.html):
6060

6161
~~~ shell
62-
$ cockroach sql -e 'SHOW TABLES' --database=bank
62+
$ cockroach sql --insecure -e 'SHOW TABLES' --database=bank
6363
~~~
6464

6565
~~~
@@ -72,7 +72,7 @@ $ cockroach sql -e 'SHOW TABLES' --database=bank
7272
~~~
7373

7474
~~~ shell
75-
$ cockroach sql -e 'SELECT id, balance FROM accounts' --database=bank
75+
$ cockroach sql --insecure -e 'SELECT id, balance FROM accounts' --database=bank
7676
~~~
7777

7878
~~~

build-a-ruby-app-with-cockroachdb.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ $ ruby txn-sample.rb
7979
To verify that funds were transferred from one account to another, use the [built-in SQL client](use-the-built-in-sql-client.html):
8080
8181
~~~ shell
82-
$ cockroach sql -e 'SELECT id, balance FROM accounts' --database=bank
82+
$ cockroach sql --insecure -e 'SELECT id, balance FROM accounts' --database=bank
8383
~~~
8484
8585
~~~

build-a-rust-app-with-cockroachdb.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,10 @@ Install the Rust posgres driver as described in the <a href="https://crates.io/c
2424
As the `maxroach` user, use the [built-in SQL client](use-the-built-in-sql-client.html) to create an `accounts` table in the new database.
2525

2626
~~~ shell
27-
$ cockroach sql --database=bank --user=maxroach -e \
28-
'CREATE TABLE accounts (id INT PRIMARY KEY, balance INT)'
29-
~~~
30-
31-
~~~
32-
CREATE TABLE
27+
$ cockroach sql --insecure \
28+
--database=bank \
29+
--user=maxroach \
30+
-e 'CREATE TABLE accounts (id INT PRIMARY KEY, balance INT)'
3331
~~~
3432

3533
## Step 6. Run the Rust code
@@ -63,7 +61,7 @@ You can copy the code or
6361
After running the code, use the [built-in SQL client](use-the-built-in-sql-client.html) to verify that funds were transferred from one account to another:
6462

6563
~~~ shell
66-
$ cockroach sql -e 'SELECT id, balance FROM accounts' --database=bank
64+
$ cockroach sql --insecure -e 'SELECT id, balance FROM accounts' --database=bank
6765
~~~
6866

6967
~~~

0 commit comments

Comments
 (0)