Bootstrap installation¶
The Salt Project provides public repositories for packages on the public Broadcom Artifactory endpoint:
The preferred method for installing Salt is using distribution packages. This method ensures that:
All dependencies are met.
Salt is installed in a tested and distribution-aligned way.
Note
Salt is often distributed in split packages, but only the salt-master
and salt-minion
packages are required for Salt to function.
About the Salt bootstrap installation¶
The Salt Bootstrap project maintains a
Bash shell script that installs Salt on any Linux/Unix platform. The script
installs salt-master
and salt-minion
system packages and enables Salt
services automatically.
This script only works on Unix-like operating systems such as FreeBSD and Linux.
For most installation, the best options are typically stable
and a version.
-P
is also needed for Ubuntu-based distributions. If the bootstrap script
can’t find a package for a needed file, -P
then installs it through pip.
For example:
bootstrap-salt.sh -P stable 3006.9
For more information, see:
The source code and reference documentation for the bootstrap script is on the salt-bootstrap repository.
Warning
The bootstrap script can only install packages that are on repo.saltproject.io. It will not work with packages on archive.repo.saltproject.io, which contains the old packages for unsupported versions.
Install using the bootstrap script¶
The bootstrap script can be used to install specific services:
Download the install script using the following command:
curl -o bootstrap-salt.sh -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh
Note
Alternatively, to download the bash script and run it immediately, use:
curl -L https://github.com/saltstack/salt-bootstrap/releases/latest/download/bootstrap-salt.sh | sudo sh -s --
Warning
By default, the bootstrap script installs classic packages of Salt 3005 unless you use the
onedir
option. See Installation types for more information.Optional: Use the following command to make the bootstrap script executable:
chmod +x bootstrap-salt.sh
Run the bash script to install Salt services. Add option flags as needed to customize the installation. See Commonly used bootstrap script options and Additional bootstrap script options for more information.
For example, to run the default, which only installs the minion service:
./bootstrap-salt.sh
To install both the Salt master and minion services:
./bootstrap-salt.sh -M
To install just the Salt master service:
./bootstrap-salt.sh -M -N
To perform a pip-based installation:
./bootstrap-salt.sh -P
Tip
The Salt bootstrap README provides additional examples for a variety of installation scenarios. Consider reading it for more information.
Installation types¶
Type |
Description |
Arguments |
---|---|---|
|
Installs the latest stable release, which is the default installation type. |
If you don’t provide an argument, the latest stable release is used by default. Example: bootstrap-salt.sh stable
|
|
Install a specific version. Only supported for packages available at
repo.saltproject.io. To pin a 3xxx
minor version, specify it as |
Pass the version number of Salt release that you want to install. Example: bootstrap-salt.sh -P stable 3006.9 bootstrap-salt.sh stable v3004.2 |
|
Install the onedir version of the Salt 3005 release. By default, the bootstrap script installs classic packages of Salt 3005. See Upgrade to onedir for more information about onedir. |
Pass the onedir option to install onedir packages. Example: bootstrap-salt.sh -P onedir
|
|
This installation type is specific to the RHEL-family of operating systems. Use this to configure EPEL testing repository. |
No arguments. Example: bootstrap-salt.sh testing
|
|
Install from the head of the default branch (master or main). |
If you don’t provide an argument, the latest head from the default branch is used by default. Example: bootstrap-salt.sh git
bootstrap-salt.sh git develop
|
|
Install from any git reference (such as a branch, tag, or commit). |
Pass in a git reference, such as a branch, tag, or commit to install from. Example: bootstrap-salt.sh git 3003.3
bootstrap-salt.sh git v3002.7
|
Commonly used bootstrap script options¶
You can combine options that don’t take arguments together, if needed. For example:
./bootstrap-salt.sh -MNP
The following are the most commonly used bootstrap options:
Option |
Description |
Arguments |
---|---|---|
|
Install the |
No arguments. |
|
Install from packages. Use |
No arguments. |
|
Update all packages through the operating systems package manager before installing. NOTE: Running this operation may take a long time. |
No arguments. |
|
Declares the IP address or FQDN of the Salt master that the Salt minion will connect to and be eventually managed by. When the Salt minion service first starts, the minion will send its key to the Salt master at this IP address or hostname (FQDN) for acceptance. |
The Example: bootstrap-salt.sh -A 192.0.2.1 stable 3006.9 bootstrap-salt.sh -A fqdn.example.com stable 3006.9 |
|
The |
Most strings are allowed. If you decide to customize your minion IDs, try to keep the ID brief but descriptive of its role. Example: bootstrap-salt.sh -i apache-server-1 stable 3006.9 bootstrap-salt.sh -i center-3-rack-2 stable 3006.9 |
|
Specify a custom repository URL if you have created a mirror repository
for your Salt packages. This option assumes the custom repository URL
points to a repository that mirrors Salt packages located at
https://repo.saltproject.io/. The option passed
with |
Pass the URL of the mirror repository that the node should use for Salt packages. This option assumes the repository exists. Example: bootstrap-salt.sh -R repo.example.com
|
|
Disable all repository configurations performed by this script. This option assumes all the necessary repository configurations are already present on the system. |
No arguments. |
Additional bootstrap script options¶
For a slightly more comprehensive list of options, see the source code and reference documentation on the salt-bootstrap repo.
Option |
Description |
Arguments |
---|---|---|
|
Pip install all Python pkg dependencies for Salt. Must be used with |
No arguments. |
|
Assume that dependencies are already installed and software sources are
set up. If the |
No arguments. |
|
Temporary configuration directory. Used with -k and -K. |
Pass in a directory path. |
|
Only run the configuration function. Implies |
No arguments. |
|
Disables checking if Salt services are enabled to start on system boot.
You can also do this by touching |
No arguments. |
|
Show the debug output in the CLI. |
No arguments. |
|
Only used for git installation types. This option forces shallow cloning
for git installations. Rather than cloning an entire repository, it only
includes the portion of the repository that you are interested in to
improve performance. Note that this option may result in an |
No arguments. |
|
Allow copied files to overwrite existing (config, init.d, etc.). |
No arguments. |
|
Salt Git repository URL. It defaults to the Salt repository at https://repo.saltproject.io/. |
No arguments. |
|
Use the specified HTTP proxy for all download URLs (including https://). |
Pass in the URL for the HTTP proxy. For example:
|
|
If set, allow insecure connections while downloading any files. For
example, pass |
No arguments. |
|
Replace the minion configuration file with data passed in as a JSON
string. If a minion configuration file is found, a reasonable effort will
be made to save the file with a |
Include a JSON string. For example: |
|
Replace the master configuration file with data passed in as a JSON
string. If a master configuration file is found, a reasonable effort will
be made to save the file with a |
Include a JSON string. For example: |
|
Temporary directory holding the minion keys which will pre-seed the master. |
Pass in a path for a directory that has minion keys in it. |
|
If set, keep the temporary files in the temporary directories specified
with |
No arguments. |
|
Disable ssl checks. When passed, switches |
No arguments. |
|
Also install salt-cloud and required python-libcloud package. |
No arguments. |
|
No colors. |
No arguments. |
|
Do not install salt-minion. |
No arguments. |
|
Extra-package to install while installing Salt dependencies. One package
per |
Provide the virtual package name for the system you are using. |
|
Quiet salt installation from git: |
No arguments. |
|
Sleep time used when waiting for daemons to start/restart and when checking for the services running. The default is 3. |
Pass in a number (in seconds) for how long the sleep time should be. |
|
Also install salt-syndic. |
No arguments. |
|
Display script version. |
No arguments. |
|
Install Salt into virtualenv. Only available for Ubuntu-based distributions. |
No arguments. |
|
Do not start daemons after installation. |
No arguments. |