What is CDS?
CDS, or Configuration Data Store, is a Cassandra server that the custom VMs use to distribute configuration, and to coordinate their actions. Before deploying any custom VMs, the operator needs to set up a Cassandra server with the right keyspaces and tables, as described on this page.
Planning for the procedure
Background knowledge
This procedure assumes that:
-
you already have a Cassandra server running. Metaswitch does not provide Cassandra support.
-
you know how to use the
cqlsh
tool.
Reserve maintenance period
This procedure does not require a maintenance period. However, if you are integrating into a live network, we recommend that you implement measures to mitigate any unforeseen events.
Tools and access
You must have:
-
access to a local computer with
cqlsh
installed and access to the Cassandra server -
access to a Cassandra role with permissions to create keyspaces and tables.
Security configuration
If you have configured your custom VMs to use authentication or SSL encryption when connecting to Cassandra via CQL as per Cassandra security configuration, you must also configure your Cassandra servers to support your security configuration.
Authentication
To support custom VMs connecting to CDS using authentication,
you must configure your Cassandra servers to use the PasswordAuthenticator
,
and must configure a role with your chosen username and password.
Refer to the
security page of the Cassandra documentation
for instructions on how to do this.
SSL
To support custom VMs connecting to CDS using SSL, you must configure your Cassandra servers to support incoming SSL connections and must load a certificate signed by the SSL signing certificate, and a corresponding private key, into the keystore. Refer to the security page of the Cassandra documentation for instructions on how to do this.
Method of procedure
Create keyspace and tables
Use the cqlsh
tool to create the CDS keyspace and tables as follows.
First create the keyspace. If your Cassandra cluster has 1 or 2 nodes, use the following statement.
CREATE KEYSPACE IF NOT EXISTS metaswitch_tas_deployment_info
WITH REPLICATION={'class' : 'SimpleStrategy', 'replication_factor' :
1};
If your Cassandra cluster has 3 or 4 nodes, use the following statement instead.
CREATE KEYSPACE IF NOT EXISTS metaswitch_tas_deployment_info
WITH REPLICATION={'class' : 'SimpleStrategy', 'replication_factor' :
3};
Finally, if your Cassandra cluster has 5 or more nodes, use the following statement instead.
CREATE KEYSPACE IF NOT EXISTS metaswitch_tas_deployment_info
WITH REPLICATION={'class' : 'SimpleStrategy', 'replication_factor' :
5};
Regardless of the number of nodes, create five tables as follows.
CREATE TABLE IF NOT EXISTS
metaswitch_tas_deployment_info.initial_config_namespaced (
deployment_id text, group_id text, namespace text, config blob, config_metadata blob,
PRIMARY KEY (deployment_id, group_id, namespace)
);
CREATE TABLE IF NOT EXISTS
metaswitch_tas_deployment_info.cas_group_state (
deployment_id text, group_id text, namespace text, state blob, seq int,
PRIMARY KEY (deployment_id, group_id, namespace)
);
CREATE TABLE IF NOT EXISTS
metaswitch_tas_deployment_info.cas_instance_state (
deployment_id text, group_id text, namespace text, instance_id text, state blob, seq int,
PRIMARY KEY (deployment_id, group_id, namespace, instance_id)
);
CREATE TABLE IF NOT EXISTS
metaswitch_tas_deployment_info.audit_history (
deployment_id text, group_id text, namespace text, instance_id text, history blob,
PRIMARY KEY (deployment_id, group_id, namespace, instance_id)
);
CREATE TABLE IF NOT EXISTS
metaswitch_tas_deployment_info.log_history (
deployment_id text, group_id text, namespace text, instance_id text, history blob, key_id text,
PRIMARY KEY (deployment_id, group_id, namespace, instance_id)
);
CREATE TABLE IF NOT EXISTS
metaswitch_tas_deployment_info.maintenance_window (
deployment_id text, site_id text, end_timestamp int,
PRIMARY KEY (deployment_id, site_id)
);
Your CDS is now ready for use.