- Launch a Cassandra cluster with the default configuration (this will run in the local region).
- Launch a second Cassandra cluster, with the following changes to the configuration in the UI: under the "Service" tab, change the "Name" field to "cassandra2", the "Data Center" field to "datacenter2", and the "Region" field to "<REMOTE_REGION>".
- After the first service completes deployment, visit <>/service/v1/cassandra/seeds
For Example
https://<master-ip>/service/cassandra/v1/seeds
and record the list of addresses provided in that JSON blob. (Most likely "node-0-server.cassandra.autoip.dcos.thisdcos.directory" and "node-1-server.cassandra.autoip.dcos.thisdcos.directory").
-
After the second service completes deployment, perform Step 3 again but with the seed addresses obtained from $CLUSTER_URL/service/cassandra/v1/seeds instead.
-
Update the configuration for the "cassandra2" service, changing the "Remote Seeds" field to contain the two addresses noted earlier, separated by a comma (e.g. "node-0-server.cassandra.autoip.dcos.thisdcos.directory,node-1-server.cassandra.autoip.dcos.thisdcos.directory"). Wait for deployment to complete.
-
Perform step 5 again, but by updating the first cluster's config to reflect the seed addresses for the second cluster's config.
-
Create a keyspace that is replicated across all local and remote nodes by task-execing into a node with the following:
$ dcos node ssh --leader --master-proxy
docker run -it cassandra:3.0.16 bash
cqlsh node-0-server.cassandra.autoip.dcos.thisdcos.directory
> CREATE KEYSPACE IF NOT EXISTS mesosphere WITH REPLICATION = { 'class' : 'NetworkTopologyStrategy', 'datacenter1' : 3, 'datacenter2': 3 };
> CREATE TABLE mesosphere.test ( id int PRIMARY KEY, message text );
> INSERT INTO mesosphere.test (id, message) VALUES (1, 'hello world!');
cqlsh cqlsh node-0-server.cassandra2.autoip.dcos.thisdcos.directory
DESC mesosphere;
SELECT * FROM mesosphere.test;
And you'll see the keyspace replicated to this remote node as well as its data.
- LAB1 - Deploying AWS Using Terraform
- LAB2 - Bursting from AWS to Azure
- LAB3 - Deploying and Migrating Stateless App from AWS to Azure
- LAB4 - Deploying Cassandra Multi DataCenter (current)