Salt: Difference between revisions

From Pumping Station One
No edit summary
 
(5 intermediate revisions by 3 users not shown)
Line 1: Line 1:
salt, or [http://www.saltstack.com/ 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.
salt, or [http://www.saltstack.com/ 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 ==
== Adding a new box ==
Line 15: Line 15:


=== Test your changes ===
=== Test your changes ===
Test your changes. Testing against a single box is wiser than testing against the entire network
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
     sudo salt 'sally.ad.pumpingstationone.org' state.highstate test=True
Line 28: Line 28:


=== Deploying changes ===
=== Deploying changes ===
    sudo salt --state-output=mixed '*' state.highstate test=True


     sudo salt '*' state.highstate
     sudo salt '*' state.highstate


== Upgrading Everything ==
== Upgrading Everything ==
Line 37: Line 37:
test the upgrade against a single box
test the upgrade against a single box


    sudo salt 'sally.ad.pumpingstationone.org' pkg.upgrade
<syntaxHighlight lang=bash>
    sudo salt 'sally.ad.pumpingstationone.org' cmd.run 'reboot'
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.


    sudo salt '*' pkg.upgrade
<syntaxHighlight lang=bash>
sudo salt '*' pkg.upgrade
</syntaxHighlight>
 
== Adding someone's SSH key to root access ==
 
1. Get an SSH key. Here are some simple instructions:
*[https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2 Linux]
*[https://www.ssh.com/ssh/putty/windows/puttygen Windows]
 
 
It would be nice if this was better documented.