You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cassandra/content.md
+3-11Lines changed: 3 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -13,7 +13,7 @@ Apache Cassandra is an open source distributed database management system design
13
13
Starting a Cassandra instance is simple:
14
14
15
15
```console
16
-
$ docker run --name some-%%REPO%% -d %%IMAGE%%:tag
16
+
$ docker run --name some-%%REPO%% --network some-network -d %%IMAGE%%:tag
17
17
```
18
18
19
19
... where `some-%%REPO%%` is the name you want to assign to your container and `tag` is the tag specifying the Cassandra version you want. See the list above for relevant tags.
Using the environment variables documented below, there are two cluster scenarios: instances on the same machine and instances on separate machines. For the same machine, start the instance as described above. To start other instances, just tell each new node where the first is.
... where `some-%%REPO%%` is the name of your original Cassandra Server container, taking advantage of `docker inspect` to get the IP address of the other container.
30
-
31
-
Or you may use Docker networks to tell the new node where the first is:
32
-
33
-
```console
34
-
$ docker run --name some-cassandra2 -d --network some-network %%IMAGE%%:tag
For separate machines (ie, two VMs on a cloud provider), you need to tell Cassandra what IP address to advertise to the other nodes (since the address of the container is behind the docker bridge).
The following command starts another Cassandra container instance and runs `cqlsh` (Cassandra Query Language Shell) against your original Cassandra container, allowing you to execute CQL statements against your database instance:
54
46
55
47
```console
56
-
$ docker run -it --network some-network --rm %%IMAGE%% cqlsh some-cassandra
48
+
$ docker run -it --network some-network --rm %%IMAGE%% cqlsh some-%%REPO%%
57
49
```
58
50
59
51
More information about the CQL can be found in the [Cassandra documentation](https://cassandra.apache.org/doc/latest/cql/index.html).
0 commit comments