The top file & highstate
Mapping states to minions.
Individual states are useful, but the real model is the highstate: the complete desired state of a minion, assembled from a top file that maps which states apply to which minions. top.sls lives in the state tree and uses targeting (globs, grains) to assign state files to groups of minions. Run state.highstate and each minion applies everything the top file says it should be.
base:'*':- base # every minion gets the base state'web*':- nginx- app'G@os_family:Debian':- apt_config
Applying the highstate
state.highstate compiles each targeted minion’s complete state from the top file and applies it — the equivalent of a Puppet catalog run or an Ansible playbook covering the whole node. This is what you run routinely (often on a schedule) to keep minions converged. Environments (base, prod, dev) in the top file let you promote changes through stages, and the same test=True dry run applies.
$ salt 'web1' state.highstate test=True # preview the FULL desired state$ salt 'web*' state.highstate # converge the web tier to everything top.sls assignsSummary for web1: Succeeded: 14 (changed=3) Failed: 0