Difference between revisions of "Salt"
Jump to navigation
Jump to search
Line 37: | Line 37: | ||
test the upgrade against a single box | test the upgrade against a single box | ||
− | + | <syntaxHighlight lang=bash> | |
− | + | sudo salt 'sally.ad.pumpingstationone.org' pkg.upgrade | |
+ | sudo salt 'sally.ad.pumpingstationone.org' cmd.run 'reboot' | ||
+ | </syntaxHighlight> | ||
After rebooting the test box, log back in and make sure everything appears to work correctly. | After rebooting the test box, log back in and make sure everything appears to work correctly. | ||
Once you are satisfied you are not going to have a long night repairing the network, deploy upgrades everywhere. | Once you are satisfied you are not going to have a long night repairing the network, deploy upgrades everywhere. | ||
− | + | <syntaxHighlight lang=bash> | |
+ | sudo salt '*' pkg.upgrade | ||
+ | </syntaxHighlight> |
Revision as of 00:55, 20 March 2015
salt, or saltstack, is a provisioning system like puppet or chef. It's the provisions system PS:One Systems Group uses to manage and maintain the servers.
Adding a new box
When you install salt-minion on a client box, you will need to
sudo salt-key -L sudo salt-key -a foobox sudo salt 'foobox' state.highstate
Changeing salt config
- Make your changes in /srv/salt/
Test your changes
Test your changes. Testing against a single box is wiser than testing against the entire network
sudo salt 'sally.ad.pumpingstationone.org' state.highstate test=True
If you are satisfied, run the command for real
sudo salt 'sally.ad.pumpingstationone.org' state.highstate
reboot the box and make sure it still comes back up and works correctly.
Deploying changes
sudo salt --state-output=mixed '*' state.highstate test=True
sudo salt '*' state.highstate
Upgrading Everything
test the upgrade against a single box
sudo salt 'sally.ad.pumpingstationone.org' pkg.upgrade
sudo salt 'sally.ad.pumpingstationone.org' cmd.run 'reboot'
After rebooting the test box, log back in and make sure everything appears to work correctly. Once you are satisfied you are not going to have a long night repairing the network, deploy upgrades everywhere.
sudo salt '*' pkg.upgrade