# Salt Package Manager

The Salt Package Manager, or SPM, enables Salt formulas to be packaged to simplify distribution to Salt masters. The design of SPM was influenced by other existing packaging systems including RPM, Yum, and Pacman.

Note

The previous diagram shows each SPM component as a different system, but this is not required. You can build packages and host the SPM repo on a single Salt master if you'd like.

Packaging System

The packaging system is used to package the state, pillar, file templates, and other files used by your formula into a single file. After a formula package is created, it is copied to the Repository System where it is made available to Salt masters.

See Building SPM Packages

Repo System

The Repo system stores the SPM package and metadata files and makes them available to Salt masters via http(s), ftp, or file URLs. SPM repositories can be hosted on a Salt Master, a Salt Minion, or on another system.

See Distributing SPM Packages

Salt Master

SPM provides Salt master settings that let you configure the URL of one or more SPM repos. You can then quickly install packages that contain entire formulas to your Salt masters using SPM.

See Installing SPM Packages

Contents

- Building SPM Packages
  - Package Build Overview
  - Package Installation Overview
  - Building an SPM Formula Package
  - Types of Packages
    - formula
    - reactor
    - conf
  - Technical Information
  - SPM-Specific Loader Modules
    - Package Database
    - Package Files
- Distributing SPM Packages
  - Setting up a Package Repository
  - Adding a Package to the repository
  - Generate Repo Metadata
- Installing SPM Packages
  - Configuring Remote Repositories
    - Repository Configuration Files
    - Updating Local Repository Metadata
  - Update File Roots
  - Installing Packages
    - Installing directly from an SPM file
  - Pillars
  - Removing Packages
- SPM Configuration
  - spm_logfile
  - spm_repos_config
  - spm_cache_dir
  - spm_db
  - spm_build_dir
  - spm_build_exclude
    - Types of Packages
  - formula
  - reactor
  - conf
- FORMULA File
  - Required Fields
    - name
    - os
    - os_family
    - version
    - minimum_version
    - release
    - summary
    - description
  - Optional Fields
    - top_level_dir
    - dependencies
    - optional
    - recommended
    - files
    - local States
    - tgt States
    - Templating States
- SPM Development Guide
  - SPM-Specific Loader Modules
    - Package Database
    - Package Files