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.
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 more nodes, use the following statement instead.
CREATE KEYSPACE IF NOT EXISTS metaswitch_tas_deployment_info
WITH REPLICATION={'class' : 'SimpleStrategy', 'replication_factor' : 3}
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.seeds_allocation (
deployment_id text, group_id text, namespace text, purpose text, instance_id set<text>, seq int,
PRIMARY KEY (deployment_id, group_id, namespace, purpose)
)
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)
)
Your CDS is now ready for use.