The following section describes a method to combine both manual and scripted approaches, allowing the user to utilize RDT functionality to deploy the Regatta database while making desired changes to the configuration along the way.
This section breaks the deployment process into three steps:
- Inventory - Creating the Regatta Cluster Module distribution
- Configuration - Deploying the Regatta Cluster and creating the distribution
- Start - Starting the system
Between each deployment step, you may stop to make modifications to the cluster configuration file if needed and start the cluster when ready.
Inventory
The Regatta Deployment Tool works by expanding the config.json file into a complete cluster.config file by following the recommended approach. The first step creates an inventory and assigns the different Regatta modules to the nodes described in the config.json.
The RDT can be executed with the --help flag to view the available sub-commands that can be executed.
Start by configuring the JSON file as described in the rdt-config page.
Continue to the Setup Cluster page, and when you reach the point of executingsetup_cluster.sh, run it with the following sub-commands:
./setup_cluster.sh os devices
These commnds will execute the deployment steps responsible for configuring the firewall and storage devices only. During the execution, an inventory file will be generated under the ansible directory where the script resides:
The file will look something like this:
[rdb_nodes]
node-1 cluster_index=1 node_index=1 modules='{"sequencer": 1,"gdd": 2,"dcm":3, "rdb": 10}' ansible_host=10.0.0.11
node-2 cluster_index=1 node_index=2 modules='{"rdb": 11}' ansible_host=10.0.0.12
node-3 cluster_index=1 node_index=3 modules='{"rdb": 12}' ansible_host=10.0.0.13
You can now change the distribution of the different modules (though this is optional). In the example below, we will locate a non-RDB module with each of the RDBs:
[rdb_nodes]
node-1 cluster_index=1 node_index=1 modules='{"sequencer": 1,"rdb": 10}' ansible_host=10.0.0.11
node-2 cluster_index=1 node_index=2 modules='{"gdd": 2, "rdb": 11}' ansible_host=10.0.0.12
node-3 cluster_index=1 node_index=3 modules='{"dcm":3, "rdb": 12}' ansible_host=10.0.0.13
To install the Regatta client and the available drivers, you can add ‘clients’ to the nodes’ modules map:
[rdb_nodes]
node-1 cluster_index=1 node_index=1 modules='{"sequencer": 1,"gdd": 2,"dcm":3, "rdb": 10,
"clients": 0}' ansible_host=10.0.0.11
node-2 cluster_index=1 node_index=2 modules='{"rdb": 11}' ansible_host=10.0.0.12
node-3 cluster_index=1 node_index=3 modules='{"rdb": 12}' ansible_host=10.0.0.13
Notice that the clients key in the modules map must be defined with a number. This number does not have a special purpose for the deployment process; it is there only to maintain the map object structure.
Configuration
The second step creates all the Regatta configuration files.
During this step, it is possible to edit the cluster.config file for any Regatta module and change the module-specific parameters, such as dedicated RAM capacity.
Continue by running:
./setup_cluster.sh distribute rpm config
distribute command - Copies the RPM packages from the host where the script is executed to each of the cluster nodes/servers.
rpmcommand - Installs the RPM packages on each node/server.
configcommand - Generates a cluster.config file, copies it to each node/server, and appends the module-specific section for each module on the cluster.
Editing Common Cluster Parameters
At this stage, it is also possible to edit the common section of the cluster.config file.
To do so, edit the cluster.config file in the Ansible directory located in the same folder as the deployment script:
Make any changes to the config and save them to the same file.
To update the entire cluster with the changes made to the config file, execute the script with the update_config command:
./setup_cluster.sh update_config
This script will copy the cluster.config file to each node/server in the cluster and append the module-specific section for each module.
Editing Module-Specific Parameters
Once the script execution with either the config or update_config commands is done, you can connect to any of the cluster nodes/servers via SSH to edit the cluster config file for any module. For further details, follow the steps in the Configuration File section and apply the desired changes.
Note that the script has opened the ports that appear in the configuration files for all Regatta modules prior to this stage. If you decide to change ports, you will also need to update the firewall before executing the next step.
Start
Lastly, starting the cluster using the script can be done by running:
./setup_cluster.sh service
This will execute the steps to start the Regatta services across the cluster.
At this stage, the cluster is up and ready.
It is also possible to stop and start the cluster as individual steps by using the stop_cluster and start_cluster commands:
./setup_cluster.sh stop_cluster
./setup_cluster.sh start_cluster
You can also use the clean_install command to run a full deployment including removing any previous installations of Regatta on the cluster:
./setup_cluster.sh clean_install
clean_install command is useful when switching between Regatta distributions, and can also resolve installation errors during the execution of the RDT.