Salt Master Installation
We will perform these install processes on the Master server. The first step is to make sure our system packages are up to date
[root@host ~]# apt-get update
Hit:1 http://by.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://by.archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:3 http://by.archive.ubuntu.com/ubuntu bionic-backports InRelease
Get:4 http://security.ubuntu.com/ubuntu bionic-security InRelease [88,7 kB]
Get:5 http://repo.saltstack.com/py3/ubuntu/18.04/amd64/latest bionic InRelease [2.126 B]
Get:6 http://repo.saltstack.com/py3/ubuntu/18.04/amd64/latest bionic/main amd64 Packages [3.200 B]
Ign:7 https://dl.bintray.com/tetrate/getenvoy-deb bionic InRelease
Get:8 https://dl.bintray.com/tetrate/getenvoy-deb bionic Release [5.356 B]
Get:10 http://security.ubuntu.com/ubuntu bionic-security/main amd64 DEP-11 Metadata [38,5 kB]
Get:11 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 48x48 Icons [17,6 kB]
Get:12 http://security.ubuntu.com/ubuntu bionic-security/main DEP-11 64x64 Icons [41,5 kB]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 DEP-11 Metadata [42,1 kB]
Get:14 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 48x48 Icons [16,4 kB]
Get:15 http://security.ubuntu.com/ubuntu bionic-security/universe DEP-11 64x64 Icons [111 kB]
Get:16 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 DEP-11 Metadata [2.464 B]
Fetched 369 kB in 1s (258 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
[root@host ~]#
Now, we need to download the repository key for SaltStack and import it into our system.
[root@host ~]# wget -O- https://repo.saltstack.com/py3/ubuntu/18.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add -
--2020-03-08 19:00:32-- https://repo.saltstack.com/py3/ubuntu/18.04/amd64/latest/SALTSTACK-GPG-KEY.pub
Resolving repo.saltstack.com (repo.saltstack.com)... 54.192.230.5, 54.192.230.104, 54.192.230.29, ...
Connecting to repo.saltstack.com (repo.saltstack.com)|54.192.230.5|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1727 (1,7K) [application/octet-stream]
Saving to: 'STDOUT'
- 100%[==================>] 1,69K --.-KB/s in 0s
2020-03-08 19:00:34 (374 MB/s) - written to stdout [1727/1727]
OK
[root@host ~]#
Next, we can add the repository itself.
echo "deb http://repo.saltstack.com/py3/ubuntu/18.04/amd64/latest bionic main" | sudo tee /etc/apt/sources.list.d/saltstack.list
deb http://repo.saltstack.com/py3/ubuntu/18.04/amd64/latest bionic main
[root@host ~]#
Now, we need to update our repo list so our available system packages are up to date.
Next, lets install SaltStack Master packages.
Salt Master Configuration
Using the nano or vim text editor, open the file /etc/salt/master.
Now, find the following line.
Once the value is located, uncomment it out and then specify the servers IP replacing the 0.0.0.0 IP address. In this example, we will use <xxx.xxx.xxx.xxx>. This will be the IP address from which we will control the minion servers.
Use :wq to save the file and exit. After editing, we should restart the service.
Next, we need to create a key that will be used by the minions to connect to the master nodes. We generated a unique key, so yours will be different.
You will want to make note of the master.pub key as we will need to add it into the configuration on the salt minion shortly.
Lastly, we will want to open the default ports in the firewall. By default, Salt uses ports 4505 and 4506.
Â