Start or stop ThoughtSpot using ansible on clusters that use RHEL
If your organization requires that privilege escalation take place through an external tool that integrates with ansible, follow the steps in this article to start or stop your cluster.
Before starting or stopping the cluster, ensure that the system settings are correctly configured.
Start the cluster
-
Rename cluster_hosts.sample to cluster_hosts.yaml.
-
Update the ansible vars in cluster_hosts.yaml with your own specific values. See Sample ansible vars.
-
Run the ansible-playbook. This starts the cluster. Run the following command on any cluster node:
ansible-playbook -i cluster_hosts.yaml cluster_start.yamlIf privilege escalation requires a password, add the
-Koption to theansible-playbookcommand. -
If there is a failure at any point, fix the failure and rerun the
ansible-playbookcommand. Bypass the completed steps using the--start-at-taskoption, specifying the task at which to start.
Sample ansible vars
This is the definition of the cluster_hosts.sample file that is present in your ansible tarball. You must replace anything in this file within <> with your own specific information.
all:
hosts:
# List of IPs of the nodes in the cluster>
<node_ip1>:
<node_ip2>:
vars:
ssh_user: <ts_service_user>
ansible_ssh_user: <ts_service_user>
username: <ts_service_user>
groupname: <ts_service_group>
env: {}
ssh_private_key: <Private key for ssh>
Stop the cluster
-
Rename cluster_hosts.sample to cluster_hosts.yaml.
-
Update the ansible vars in cluster_create_hosts.yaml with your own specific values. See Sample ansible vars.
-
Run the ansible-playbook. This stops the cluster. Run the following command on any cluster node:
ansible-playbook -i cluster_hosts.yaml cluster_stop.yamlIf privilege escalation requires a password, add the
-Koption to theansible-playbookcommand. -
If there is a failure at any point, fix the failure and rerun the
ansible-playbookcommand. Bypass the completed steps using the--start-at-taskoption, specifying the task at which to start.
Sample ansible vars
This is the definition of the cluster_hosts.sample file that is present in your ansible tarball. You must replace anything in this file within <> with your own specific information.
all:
hosts:
# List of IPs of the nodes in the cluster>
<node_ip1>:
<node_ip2>:
vars:
ssh_user: <ts_service_user>
ansible_ssh_user: <ts_service_user>
username: <ts_service_user>
groupname: <ts_service_group>
env: {}
ssh_private_key: <Private key for ssh>