Amazon Linux 2#
These instructions explain how to install Salt on Amazon Linux 2 operating systems:
- Install onedir packages of Salt on Amazon Linux 2
- Install classic packages of Salt on Amazon Linux 2
What is onedir?
Onedir is the Salt Project’s new packaging system. Beginning with the release of Salt 3005 (Phosphorus), the Salt Project will begin replacing the old packaging system with the onedir packaging system.
Onedir packages of Salt include the version of Python needed to run Salt and Salt’s required dependencies.
The Salt Project will support the old packaging system until the 3006 release. See Upgrade to onedir for more information.
Before you start#
Before installing Salt on your operating system, ensure that you first:
Install onedir packages of Salt on Amazon Linux 2#
To install the Onedir packages of Salt on Amazon Linux 2:
Run the following commands to install the Salt Project repository and key:
To pin your Salt upgrades to the Latest Onedir package of Salt for Amazon Linux 2:
sudo rpm --import https://repo.saltproject.io/salt/py3/amazon/2/x86_64/latest/SALTSTACK-GPG-KEY.pub curl -fsSL https://repo.saltproject.io/salt/py3/amazon/2/x86_64/latest.repo | sudo tee /etc/yum.repos.d/salt-amzn.repo
To pin your Salt upgrades to the Major Onedir package of Salt for Amazon Linux 2:
sudo rpm --import https://repo.saltproject.io/salt/py3/amazon/2/x86_64/3005/SALTSTACK-GPG-KEY.pub curl -fsSL https://repo.saltproject.io/salt/py3/amazon/2/x86_64/3005.repo | sudo tee /etc/yum.repos.d/salt-amzn.repo
To pin your Salt upgrades to the Minor Onedir package of Salt for Amazon Linux 2:
sudo rpm --import https://repo.saltproject.io/salt/py3/amazon/2/x86_64/minor/3005.1-1/SALTSTACK-GPG-KEY.pub curl -fsSL https://repo.saltproject.io/salt/py3/amazon/2/x86_64/minor/3005.1-1.repo | sudo tee /etc/yum.repos.d/salt-amzn.repo
Run
sudo yum clean expire-cache
to clear the repository metadata.Install the salt-minion, salt-master, or other Salt components:
sudo yum install salt-master sudo yum install salt-minion sudo yum install salt-ssh sudo yum install salt-syndic sudo yum install salt-cloud sudo yum install salt-api
Enable and start service for salt-minion, salt-master, or other Salt components:
sudo systemctl enable salt-master && sudo systemctl start salt-master sudo systemctl enable salt-minion && sudo systemctl start salt-minion sudo systemctl enable salt-syndic && sudo systemctl start salt-syndic sudo systemctl enable salt-api && sudo systemctl start salt-api
After installing Salt on your operating system, you need to complete the following post-installation steps:
Install classic packages of Salt on Amazon Linux 2#
Warning
The Salt Project will support the classic, non-onedir packaging system until the 3006 release. After that time, onedir will become the standard packaging system for the Salt Project. The following instructions explain how to install Salt using the classic packaging system, but you should consider upgrading to onedir soon. See Upgrade to onedir for more information.
In order to prevent problems running classic Salt packages, you should run Salt with the default version of Python that was originally packaged with that operating system. For example, RedHat 8 and CentOS 8 should use Python 3.6. Using any other version could prevent Salt from working properly.
To install Salt on Amazon Linux 2 using the old packaging system:
Run the following commands to install the Salt Project repository and key:
To pin your Salt upgrades to the Latest Classic package of Salt for Amazon Linux 2:
sudo rpm --import https://repo.saltproject.io/py3/amazon/2/x86_64/latest/SALTSTACK-GPG-KEY.pub curl -fsSL https://repo.saltproject.io/py3/amazon/2/x86_64/latest.repo | sudo tee /etc/yum.repos.d/salt-amzn.repo
To pin your Salt upgrades to the latest Major Classic package of Salt for Amazon Linux 2:
sudo rpm --import https://repo.saltproject.io/py3/amazon/2/x86_64/3005/SALTSTACK-GPG-KEY.pub curl -fsSL https://repo.saltproject.io/py3/amazon/2/x86_64/3005.repo | sudo tee /etc/yum.repos.d/salt-amzn.repo
To pin your Salt upgrades to the latest Minor Classic package of Salt for Amazon Linux 2:
sudo rpm --import https://repo.saltproject.io/py3/amazon/2/x86_64/archive/3005.1/SALTSTACK-GPG-KEY.pub curl -fsSL https://repo.saltproject.io/py3/amazon/2/x86_64/archive/3005.1.repo | sudo tee /etc/yum.repos.d/salt-amzn.repo
Run
sudo yum clean expire-cache
to clear the repository metadata.Install the salt-minion, salt-master, or other Salt components:
sudo yum install salt-master sudo yum install salt-minion sudo yum install salt-ssh sudo yum install salt-syndic sudo yum install salt-cloud sudo yum install salt-api
Enable and start service for salt-minion, salt-master, or other Salt components:
sudo systemctl enable salt-master && sudo systemctl start salt-master sudo systemctl enable salt-minion && sudo systemctl start salt-minion sudo systemctl enable salt-syndic && sudo systemctl start salt-syndic sudo systemctl enable salt-api && sudo systemctl start salt-api
After installing Salt on your operating system, you need to complete the following post-installation steps: