This repository was archived by the owner on Feb 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 85
Consul Setup
Sumedh Anantrao Kulkarni edited this page Sep 20, 2021
·
7 revisions
For 3 node provisioning, perform the instructions on all 3 nodes.
-
Install Consul rpm
wget https://github.com/Seagate/cortx/releases/download/third-party-deps-1.0.0-0/third-party-centos-7.9.2009-1.0.0-0.tar.gz tar -xvf third-party-centos-7.9.2009-1.0.0-0.tar.gz cd centos-7.9.2009-2.0.0-latest/commons/consul/consul_1.9.1/ sudo yum install ./consul-1.9.1-1.x86_64.rpm -y -
Install cortx-py-utils
Follow cortx-py-utils installtion guide till installation stage.
- For 3-node provisioning perform each step on every node
- Replace template values with real from the file
/opt/seagate/cortx/utils/conf/consul.post_install.tmplor template-file & save it as/tmp/consul.post_install. - Run the post_install command
/opt/seagate/cortx/utils/bin/consul_setup post_install --config yaml:///tmp/consul.post_install
- Replace template values with real from the file
/opt/seagate/cortx/utils/conf/consul.prepare.tmplor template-file & save it as/tmp/consul.prepare. - Run the prepare command
/opt/seagate/cortx/utils/bin/consul_setup prepare --config yaml:///tmp/consul.prepare
- Replace template values with real from the file
- for 1 node:
/opt/seagate/cortx/utils/conf/consul.config.tmpl.1-nodeor template-file & save it as/tmp/consul.config.1-node. - for 3 node:
/opt/seagate/cortx/utils/conf/consul.config.tmpl.3-nodeor template-file & save it as/tmp/consul.config.3-node.
TMPL_CONSUL_CONF_PATH => local dir path where consul configuartions will be store, eg: /opt/consul/conf TMPL_CONSUL_DATA_PATH => local dir path where consul data will be stored, eg: /opt/consul/data TMPL_DATA_PRIVATE_FQDN => private FQDN of the local machine, eg: srvnode-1.data.private TMPL_DATA_PRIVATE_INTERFACE => private network interface name, eg: eth0, enp175s0f1 TMPL_CONSUL_SERVER => add "consul_server" if the node is consul server else keep the array empty.
- for 1 node:
- Sample Config Files:
- Run the config command
- 1 node:
/opt/seagate/cortx/utils/bin/consul_setup config --config yaml:///tmp/consul.config.1-node
- 3 node:
/opt/seagate/cortx/utils/bin/consul_setup config --config yaml:///tmp/consul.config.3-node
- 1 node:
- Replace template values with real from the file
/opt/seagate/cortx/utils/conf/consul.init.tmplor template-file & save it as/tmp/consul.init. - Run the init command
/opt/seagate/cortx/utils/bin/consul_setup init --config yaml:///tmp/consul.init
Now, The consul should be up and running on all 3 nodes
- Install the cortx-py-utils-test rpm as described in the guide.
- Replace template values with real from the file
/opt/seagate/cortx/utils/conf/consul.test.tmplor template-file & save it as/tmp/consul.test. - Run the test command
/opt/seagate/cortx/utils/bin/consul_setup test --config yaml:///tmp/consul.test
- Replace template values with real from the file
/opt/seagate/cortx/utils/conf/consul.reset.tmplor template-file & save it as/tmp/consul.reset. - Run the reset command
/opt/seagate/cortx/utils/bin/consul_setup reset --config yaml:///tmp/consul.reset
- Replace template values with real from the file
/opt/seagate/cortx/utils/conf/consul.cleanup.tmplor template-file & save it as/tmp/consul.cleanup.TMPL_CONSUL_CONF_PATH => local dir path where consul configuartions will be store, eg: /opt/consul/conf TMPL_CONSUL_DATA_PATH => local dir path where consul data will be stored, eg: /opt/consul/data
- Sample Cleanup Configuration Files:
- Run the cleanup command
-
Normal:
configurations done till and excluding post_install stage will be undone/removed.
/opt/seagate/cortx/utils/bin/consul_setup cleanup --config yaml:///tmp/consul.cleanup
-
Pre-Factory:
configurations done till and including post_install stage will be undone/removed.
/opt/seagate/cortx/utils/bin/consul_setup cleanup --config yaml:///tmp/consul.cleanup --pre-factory
-
Normal:
configurations done till and excluding post_install stage will be undone/removed.