-
Notifications
You must be signed in to change notification settings - Fork 40
SaltStack Setup
-
Point to the supported YUM repos.
Ref: https://github.com/Seagate/cortx-prvsnr/tree/dev/files/etc/yum.repos.d
NOTE: Any repos not mentioned at above location should be removed. -
Clean yum database
yum clean all rm -rf /var/cache/yum
Note: You might be required to downgrade a few packages (like glibc and dependencies), in case there are setup issues.
-
Install and setup Git on the target node [For Dev setup]
$yum install -y git
-
Update hostname (if necessary):
$hostnamectl set-hostname <hostname>
-
Install Provisioner CLI rpm (cortx-prvsnr-cli) from the release repo on all nodes to be provisioned (This rpm is required to setup passwordless
ssh
communication across nodes. Can be neglected for single node setup):yum install -y yum-utils yum-config-manager --add-repo "http://<cortx_release_repo>/releases/cortx/github/master/rhel-7.7.1908/last_successful/" yum install -y cortx-prvsnr-cli --nogpgcheck rm -rf /etc/yum.repos.d/cortx-storage*
-
Modify contents of file
~/.ssh/config
on primary node as suggested below:Host srvnode-1 <node-1 hostname> <node-1 fqdn> HostName <node-1 hostname or mgmt IP> User root UserKnownHostsFile /dev/null StrictHostKeyChecking no IdentityFile ~/.ssh/id_rsa_prvsnr IdentitiesOnly yes Host srvnode-2 <node-2 hostname> <node-2 fqdn> HostName <node-2 hostname or mgmt IP> User root UserKnownHostsFile /dev/null StrictHostKeyChecking no IdentityFile ~/.ssh/id_rsa_prvsnr IdentitiesOnly yes
Copy
/root/.ssh/config
to other nodes -
Install Provisioner rpm (cortx-prvsnr) from the cortx release repo:
yum install -y yum-utils yum-config-manager --add-repo "http://<cortx_release_repo>/releases/cortx/github/master/rhel-7.7.1908/last_successful/" yum install -y cortx-prvsnr --nogpgcheck rm -rf /etc/yum.repos.d/cortx-storage*
NOTE: replace rpm with appropriate rpm file in above command.
-
Install SaltStack:
$yum install -y salt-master salt-minion
-
Copy Salt config files:
$ cp /opt/seagate/cortx/provisioner/srv/components/provisioner/salt_master/files/master /etc/salt/master
$ cp /opt/seagate/cortx/provisioner/srv/components/provisioner/salt_minion/files/minion /etc/salt/minion
-
Setup minion_id
$vim /etc/salt/minion_id
NOTE: Minion id for first node issrvnode-1
. For subsequent nodes it would besrvnode-n
, where n is the node count.
E.g. srvnode-2 for second node and so on. -
Set salt-master fqdn in
/etc/salt/minion
# Set the location of the salt master server. If the master server cannot be # resolved, then the minion will fail to start. master: srvnode-1 # <== Change this value to match salt-master fqdn
-
Restart Salt Minion:
$systemctl restart salt-minion
$systemctl restart salt-master
-
Register node into salt-master
$salt-key -L
$salt-key -A -y
-
Check if Salt is configured :
$salt '*' test.ping