Saltstack concepts: Difference between revisions
From wikinotes
Line 25: | Line 25: | ||
<source lang="bash"> | <source lang="bash"> | ||
../ | ../ | ||
#======= | #======= | ||
pillars/ | pillars/ |
Latest revision as of 05:34, 12 July 2022
Overview
Salt Components
master: # central server. pushes configuration to minions. states: # *.sls files containing program/system setup recipes pillar: # *.sls files containing secrets, passwords, keys minion: # receives instructions from master, applies configuration to current machine. grains: # facts about a machine (ostype, hostname, processor-type, ...)External Components
gpg: # program to encrypt/decrypt things jinja: # templating engine (use python/dictionary substitution within configfiles)
Project Structure Overview
../ #======= pillars/ #======= passwd/ hostname1.sls ## passwords for users by hostname hostname2.sls ssh/ ## public/private keys, and a dictionary hostname1_pub.sls ## of hostnames, and which users will hostname1_prv.sls ## receive it's sshkey hostname2_pub.sls hostname2_prv.sls user_keyfiles.sls progs/ ## any program specific keyfiles taskwarrior/ tarsnap/ top.sls ## which hostnames receive which pillar ## variables #====== states/ #====== docs/ ## offline copies of API documentation python/ pyside.sls python2.sls python3.sls ... progs/ ## individual programs, and configurations editors/ ## categorized by group vim/ emacs/ eclipse/ system/ media/ messaging/ organization/ ... roles/ ## files that simply include other state-files unix_base.sls ## these can be applied to machines as starting-points unix_dev.sls ## before server-specific configuration is applied to it unix_home.sls win32_base.sls win32_home.sls hosts/ ## host-specific instructions and configfiles wintermute/ mordin/ melody/ velma/ top.sls ## determines what statefiles are applied automatically ## to each hostname. ## ## ex: ## wintermute and mordin should both have ## 'unix_base', 'unix_dev', and 'unix_home' ## state-files applied to them.