SaltStack Salt Package Manager - SaltStack

What is Salt Package Manager?

Salt equations are packaged and circulated to Salt bosses utilizing the package chief. This idea was affected from RPM, Yum and Pacman bundling systems. Salt state, pillar, file formats and different Files are utilized by the equation and after that packaged into a solitary File.

After a formula package is made, it is duplicated to the Repository System to make it to use for Salt bosses. Prior to moving to the package administrator, let us view how to install a "nginx" package utilizing the Salt essential command.

he following syntax is used to install a “nginx” package.

Here, the pkg.install nginx command is used to install a package. After execution, you will see the following response.

It will produce the following output –

Now, you have installed a package. To start the services for that package, use the command given below.

After running this command, the result looks as shown in the code block below.

Along these lines, we have installd and begun the administrations for the "nginx" package utilizing the essential command. Give us now a chance to examine how to fabricate and install packages in the Salt package administrator.

Building Packages

Packages can be based on any system where you can install Salt. There are three kind of packages and they are pursues.

  • Formula
  • Reactor
  • Conf

Give us now a chance to see how to fabricate packages utilizing the Fomula File.

Formula File

Most files from the package are situated at the –/srv/spm/salt/registry as a matter of course, however the pillar File can be set in the –/srv/spm/pillar/index. The Formula File depicts the package.



  • Name − The name of the package. Here, the package name is apache.
  • os − It is utilized to realize which operating systems can bolster this package.
  • os_family − It is utilized to realize which operating system families can bolster this package.
  • Version − The form of the package. It is indicated in a YYYYMM format.
  • Release− This field alludes fundamentally to an arrival of a version.
  • Summary − Short lines depiction of the package.
  • Description − An increasingly point by point depiction of the package.


The reactor files lives in the/srv/spm/reactor/registry.


The files in this kind of a package are configuration Files for Salt, which regularly live in the/and so forth/salt/index. Configuration files for packages other than Salt can and ought to be taken care of with a Salt State (utilizing an equation sort of package).

Give us a chance to proceed with the below steps to manufacture a package.

Make a FORMULA File and place it in the foundation of the package organizer.

Collect the formula Files in an folder on the assemble system.

Run spm fabricate. The package is constructed and set in the/srv/spm_build folder. The below command is utilized to assemble a package.

Presently, duplicate the .spm file to an folder on the store system.

You can share the srv/spm_build organizer on the system, or duplicate the Files to your FTP or the Webserver.

Create repo metadata utilizing the below command.

Installing Packages

This segment clarifies about Installing Salt package director packages.

Configure Remote Repositories

To Configure remote archives, the Salt Master has to know where the store is through a configuration procedure.

Files are in the/and so on/salt/spm.repos.d/spm.repo registry.


Here, the file contains the name of the store and the connection to the archive. You can likewise utilize http, https, ftp, or the file path. To utilize File path, you can get to it utilizing the URL: file://srv/spm_build.

Update Metadata

After the vault is designed on the Salt master, archive metadata is downloaded utilizing the command below.

Update File Roots

The SPM packages are situated in the srv/spm/salt registry. Add the below path to the File roots on the Salt master,

Presently, restart the salt master.

Install Apache Package

To install the package apache, utilize the below command.

You can likewise install straightforwardly from the SPM file utilizing the command below.

Removing a Package

To remove a package, for instance – apache, utilize the below command,

Note that, if any files have been altered, they won't be removed.

All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd Protection Status

SaltStack Topics