Salt - 基础

Salt,一种全新的基础设施管理方式,部署轻松,在几分钟内可运行起来,扩展性好,很容易管理上万台服务器,速度够快,服务器之间秒级通讯。salt底层采用动态的连接总线, 使其可以用于编配, 远程执行, 配置管理等等.

SaltStack Communication

请参见:Salt Communication

SaltStack Component


  • salt master: sends commands and configurations to minions
  • salt minions: receives commands from master

  • execution modules: Execution modules are sets of related functions that perform work on minions.

  • formulas(states): representation of a system configuration, a grouping of one or more state files, possibly with pillar data and configuration files or anything else which defines a neat package for a particular application.

  • grains: static information about minions: include operating system, memory, and many other system properties.

  • pillar: secure user-defined variables stored on master and assigned to minions
  • mine: an area on the master server where the results from regularly executed commands on minions can be stored.

  • top file: matches formulas and pillar data to minions

  • runners: modules that execute on the master server instead of minions.

  • returners: Send data returned by Salt minions to another system, such as a database. Salt returners can run on the Salt minion or on the Salt master.
  • reactor: provides a mechanism for triggering actions in response to generated events.
  • salt SSH: command to run commands on systems without minions

Salt Commands

  • salt-master: This is the master daemon process. You can start the master service with this command directly, or more typically, through an init script or service file.
  • salt-minion: Likewise, this is minion daemon process, used to communicate with the master and execute commands. Most users will also start this from init scripts or service files.
  • salt-key: This tool is used to manage minion public keys. This tool is used to view current keys and to make decisions about public keys sent by prospective minions. It can also generate keys to place on minions out-of-band.
  • salt: This command is used to target minions in order to run ad-hoc execution modules. This is the main tool used for remote execution.
  • salt-ssh: This command allows you to use SSH as an alternative to ZeroMQ for the transport mechanism.
  • salt-run: This command is used to run runner modules on the master server.
  • salt-call: This command is used to run execution modules directly on a minion you are logged into. This is often used to debug problematic commands by bypassing the master.
  • salt-cloud: This command is used to control and provision cloud resources from many different providers. New minions can easily be spun up and bootstrapped.
唐胡璐 wechat