Status: Technical Review
SPM packages are installed to your Salt master, where they are available to Salt minions using all of Salt's package management functions.
Before SPM can use a repository, two things need to happen. First, the Salt master needs to know where the repository is through a configuration process. Then it needs to pull down the repository metadata.
Repositories are configured by adding each of them to the
/etc/salt/spm.repos.d/spm.repo file on each Salt master. This file contains
the name of the repository, and the link to the repository:
my_repo:
url: https://spm.example.com/
For HTTP/HTTPS Basic authorization you can define credentials:
my_repo:
url: https://spm.example.com/
username: user
password: pass
Beware of unauthorized access to this file, please set at least 0640 permissions for this configuration file:
The URL can use http, https, ftp, or file.
my_repo:
url: file:///srv/spm_build
After the repository is configured on the Salt master, repository metadata is
downloaded using the spm update_repo command:
spm update_repo
Note
A file for each repo is placed in /var/cache/salt/spm on the Salt master
after you run the update_repo command. If you add a repository and it
does not seem to be showing up, check this path to verify that the
repository was found.
SPM packages are installed to the srv/spm/salt folder on your Salt master.
This path needs to be added to the file roots on your Salt master
manually.
file_roots:
base:
1. /srv/salt
2. /srv/spm/salt
Restart the salt-master service after updating the file_roots setting.
To install a package, use the spm install command:
spm install apache
Warning
Currently, SPM does not check to see if files are already in place before installing them. That means that existing files will be overwritten without warning.