SaltStack: Installing an older Salt Master or Minion for compatibility

If your Salt Minion version is too far removed from the Salt Master version, you may find yourself with unexplained errors.

This problem can be faced when the OS template you are deploying was packaged years earlier with an older Salt minion while the Salt Master has been kept up to date.

But it can also happen with a relatively recent version Master like 2016.11, if you use the latest 2017.7 Minion which has major changes in the fileclient.

In this article I will show you how to use apt-get to install an earlier version of the Salt Master or Salt Minion.

If you want to install the latest version of the Salt Master, see my article here instead.

Chose earlier version

If you wanted to install the latest version of SaltStack, you would point apt at https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/

At the time of this writing, this would get you the Salt 2017.7.1 release.  But if wanted an earlier release, you could browse to this location:

https://repo.saltstack.com/apt/ubuntu/14.04/amd64/

And pick one of the earlier versions, for this example we are going to pick 2016.11.

Point apt to earlier version

Just like in a previous article, we add the Salt public key, install any dependencies, and then point the apt source to the “2016.11” we identified earlier (instead of ‘latest’).

$ wget -qO - https://repo.saltstack.com/apt/ubuntu/14.04/amd64/latest/SALTSTACK-GPG-KEY.pub | sudo apt-key add -

$ sudo apt-get install apt-transport-https ca-certificates -y

$ echo "deb http://repo.saltstack.com/apt/ubuntu/14.04/amd64/2016.11 $(lsb_release -cs) main" | sudo tee -a /etc/apt/sources.list.d/saltstack.list

Install older Salt Master

Then refresh the repository, validate that 2016.11 is the candidate version, and install the SaltStack master:

$ sudo apt-get update
$ sudo apt-cache policy salt-master
salt-master:
 Installed: (none)
 Candidate: 2016.11.7+ds-1
 Version table:
 2016.11.7+ds-1 0
 500 https://repo.saltstack.com/apt/ubuntu/14.04/amd64/2016.11/ trusty/main amd64 Packages
 0.17.5+ds-1 0
 500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

$ sudo apt-get install salt-common="2016.11.7+ds-1" salt-master="2016.11.7+ds-1"

Now verify that you got the proper version:

$ salt --version

salt 2016.11.7 (Carbon)

For the steps required after this, see my first article where I fully explain the post-installation steps and validation of pillars/states.

Install older Salt Minion

The steps are similar for installing an older Minion.

Refresh the repository, validate that 2016.11 is the candidate version, and install the SaltStack minion:

$ sudo apt-get update
$ sudo apt-cache policy salt-minion
salt-minion:
 Installed: 2016.11.7+ds-1
 Candidate: 2016.11.7+ds-1
 Version table:
 *** 2016.11.7+ds-1 0
 500 https://repo.saltstack.com/apt/ubuntu/14.04/amd64/2016.11/ trusty/main amd64 Packages
 100 /var/lib/dpkg/status
 0.17.5+ds-1 0
 500 http://archive.ubuntu.com/ubuntu/ trusty/universe amd64 Packages

$ sudo apt-get install salt-common="2016.11.7+ds-1" salt-minion="2016.11.7+ds-1"

Now verify that you got the proper version:

$ salt-call --version

salt-call 2016.11.7 (Carbon)

 

 

REFERENCES

/2017/05/12/saltstack-installing-a-salt-master-on-ubuntu-14-04/