|
|
| .. code-block:: bash | | .. code-block:: bash |
| | | |
| t | wget --no-check-certificate -O - http://bootstrap.saltstack.org | sudo sh; echo | t | wget --no-check-certificate -O - http://bootstrap.saltstack.org | sudo sh; echo |
| "master: master.foxhop.net" > /etc/salt/minion.d/foxhop.conf | | "master: master.foxhop.net" >> /etc/salt/minion.d/foxhop.conf; echo "append_dom |
| | | ain: foxhop.net" >> /etc/salt/minion.d/foxhop.conf; |
| | | |
| | | |
|
|
| salt-minions do not need any special firewall rules | | salt-minions do not need any special firewall rules |
| | | |
| n | | n | |
| | | |
| Setup salt-minion on ubuntu | | Setup salt-minion on ubuntu |
| =============================== | | =============================== |
| sudo service salt-minion restart | | sudo service salt-minion restart |
| | | |
| n | | | n | or this |
| | | |
| .. code-block:: bash | | .. code-block:: bash |
| | | |
| n | wget --no-check-certificate -O - http://bootstrap.saltstack.org | sudo sh; echo | n | wget --no-check-certificate -O - http://bootstrap.saltstack.org | sudo sh; echo |
| "master: master.foxhop.net" > /etc/salt/minion.d | | "master: master.foxhop.net" > /etc/salt/minion.d/foxhop.conf |
| | | |
| | | |
| t | /foxhop.confminion log | t | minion log |
| ---------------- | | ---------------- |
| | | |
|
|
| .. code-block:: bash | | .. code-block:: bash |
| | | |
| n | wget --no-check-certificate -O - http://bootstrap.saltstack.org | sudo sh; echo | n | wget --no-check-certificate -O - http://bootstrap.saltstack.org | sudo sh; echo |
| "master: master.foxhop.net" > /etc/salt/minion.d/foxhop.confminion log | | "master: master.foxhop.net" > /etc/salt/minion.d |
| | | |
| | | |
| | | /foxhop.confminion log |
| ---------------- | | ---------------- |
| | | |
| | | |
| | | |
| t | Test | t | |
| ====== | | |
| | | |
| Running salt as root or with sudo is normally required depending on which user i | | |
| s running the salt-minion daemon on each remote host. | | |
| | | |
| salt '*' test.ping | | |
| | | |
| salt '*' sys.doc | | |
| | | |
| salt '*' cmd.which ping | | |
| | | |
| salt '*' cmd.which whois | | |
| | | |
| salt '*' cmd.run 'uname -a' | | |
| | | |
| salt '*' cmd.exec_code python 'import sys; print sys.version' | | |
|
|
| | | |
| .. code-block:: bash | | .. code-block:: bash |
| t | | t | |
| MASTER=akuma.foxhop.net; sudo apt-get -y install python-software-properties; su | | wget --no-check-certificate -O - http://bootstrap.saltstack.org | sudo sh; echo |
| do add-apt-repository -y ppa:saltstack/salt; sudo apt-get update; sudo apt-get - | | "master: master.foxhop.net" > /etc/salt/minion.d/foxhop.confminion log |
| y install salt-minion; sudo sed -i "s/#master: salt/#master: salt\nmaster: $MAST | | |
| ER/" /etc/salt/minion; sudo service salt-minion restart; | | |
| minion log | | |
| ---------------- | | ---------------- |
| | | |
|
|
| | | | | |
| | | |
| t | | t | .. code-block:: bash |
| | | |
| | | MASTER=akuma.foxhop.net; sudo apt-get -y install python-software-properties; su |
| | | do add-apt-repository -y ppa:saltstack/salt; sudo apt-get update; sudo apt-get - |
| | | y install salt-minion; sudo sed -i "s/#master: salt/#master: salt\nmaster: $MAST |
| | | ER/" /etc/salt/minion; sudo service salt-minion restart; |
| minion log | | minion log |
| ---------------- | | ---------------- |
|
|
| | | |
| sudo apt-get -y install python-software-properties | | sudo apt-get -y install python-software-properties |
| n | sudo add-apt-repository ppa:saltstack/salt | n | sudo add-apt-repository -y ppa:saltstack/salt |
| sudo apt-get update | | sudo apt-get update |
| sudo apt-get -y install salt-master | | sudo apt-get -y install salt-master |
| | | |
| sudo apt-get -y install python-software-properties | | sudo apt-get -y install python-software-properties |
| t | sudo add-apt-repository ppa:saltstack/salt | t | sudo add-apt-repository -y ppa:saltstack/salt |
| sudo apt-get update | | sudo apt-get update |
| sudo apt-get -y install salt-minion | | sudo apt-get -y install salt-minion |
|
|
| .. code-block:: bash | | .. code-block:: bash |
| | | |
| n | sudo apt-get install python-software-properties | n | sudo apt-get -y install python-software-properties |
| sudo add-apt-repository ppa:saltstack/salt | | sudo add-apt-repository ppa:saltstack/salt |
| sudo apt-get update | | sudo apt-get update |
| n | sudo apt-get install salt-master | n | sudo apt-get -y install salt-master |
| sudo apt-get install salt-minion | | sudo apt-get -y install salt-minion |
| | | |
| | | |
| MASTER=master.foxhop.net # put your master here | | MASTER=master.foxhop.net # put your master here |
| | | |
| n | sudo apt-get install python-software-properties | n | sudo apt-get -y install python-software-properties |
| sudo add-apt-repository ppa:saltstack/salt | | sudo add-apt-repository ppa:saltstack/salt |
| sudo apt-get update | | sudo apt-get update |
| t | sudo apt-get install salt-minion | t | sudo apt-get -y install salt-minion |
| | | |
| sudo sed -i "s/#master: salt/#master: salt\nmaster: $MASTER/" /etc/salt/minion | | sudo sed -i "s/#master: salt/#master: salt\nmaster: $MASTER/" /etc/salt/minion |
|
|
| --------------------- | | --------------------- |
| | | |
| n | If you have a firewall between your salt-master and salt-minions... open the fol | n | The salt-master must make the following ports available to it's salt-minions: |
| lowing ports | | |
| | | |
| * 4505 | | * 4505 |
| * 4506 | | * 4506 |
| t | | t | |
| | | salt-minions do not need any special firewall rules |
| | | |
| Setup salt-minion on ubuntu | | Setup salt-minion on ubuntu |
|
|
| sudo apt-get install salt-minion | | sudo apt-get install salt-minion |
| | | |
| n | If you have a firewall between your salt-master and salt-minions... open the fol | n | |
| lowing ports | | |
| | | |
| salt-master ports | | salt-master ports |
| --------------------- | | --------------------- |
| t | | t | |
| | | If you have a firewall between your salt-master and salt-minions... open the fol |
| | | lowing ports |
| | | |
| * 4505 | | * 4505 |
|
|
| | | |
| salt '*' cmd.which whois | | salt '*' cmd.which whois |
| t | | t | |
| | | salt '*' cmd.run 'uname -a' |
| | | |
| | | salt '*' cmd.exec_code python 'import sys; print sys.version' |
|
|
| ====== | | ====== |
| | | |
| n | | n | Running salt as root or with sudo is normally required depending on which user i |
| | | s running the salt-minion daemon on each remote host. |
| | | |
| salt '*' test.ping | | salt '*' test.ping |
| | | |
| salt '*' sys.doc | | salt '*' sys.doc |
| t | | t | |
| | | salt '*' cmd.which ping |
| | | |
| | | salt '*' cmd.which whois |
|
|
| | | |
| salt-key -A | | salt-key -A |
| t | | t | |
| | | |
| | | Test |
| | | ====== |
| | | |
| | | salt '*' test.ping |
| | | |
| | | salt '*' sys.doc |
|
|
| n | | n | |
| Pour some salt on me | | Pour some salt on me |
| ########################## | | ########################## |
| sudo service salt-minion restart | | sudo service salt-minion restart |
| | | |
| t | | t | | |
| | | |
| | | minion log |
| | | ---------------- |
| | | |
| | | /var/log/salt/minion |
| | | |
| | | |
| Salt keys | | Salt keys |
|
|
| n | | n | |
| | | |
| Pour some salt on me | | Pour some salt on me |
| =============== | | =============== |
| | | |
| t | | t | keys and ids |
| | | |
| List the accepted and unaccepted Salt keys | | List the accepted and unaccepted Salt keys |
| ---------------------------------------------- | | ---------------------------------------------- |
|
|
| n | .. contents:: | n | |
| | | |
| n | | n | |
| pour some salt on me | | Pour some salt on me |
| ########################## | | ########################## |
| | | |
| Messing with salt-stack | | Messing with salt-stack |
| | | |
| n | | n | .. contents:: |
| | | |
| Setup salt-master on ubuntu | | Setup salt-master on ubuntu |
| salt-key -a <minion id> | | salt-key -a <minion id> |
| | | |
| t | Accept all unaccepted minion keys: | t | Accept all unaccepted minion keys |
| -------------------------------------- | | -------------------------------------- |
| | | |
|
|
| | | |
| | | |
| n | | n | Salt keys |
| | | =============== |
| | | |
| List the accepted and unaccepted Salt keys | | List the accepted and unaccepted Salt keys |
| n | ============================================== | n | ---------------------------------------------- |
| | | |
| .. code-block:: bash | | .. code-block:: bash |
| | | |
| Accept a minion key | | Accept a minion key |
| n | ======================== | n | ------------------------------ |
| | | |
| .. code-block:: bash | | .. code-block:: bash |
| | | |
| Accept all unaccepted minion keys: | | Accept all unaccepted minion keys: |
| t | ====================================== | t | -------------------------------------- |
| | | |
| .. code-block:: bash | | .. code-block:: bash |
|
|
| | | |
| pour some salt on me | | pour some salt on me |
| n | ========================= | n | ########################## |
| | | |
| Messing with salt-stack | | Messing with salt-stack |
| | | |
| n | salt-master ports: | n | |
| | | |
| * 4505 | | |
| * 4506 | | |
| | | |
| Setup salt-master on ubuntu | | Setup salt-master on ubuntu |
| sudo apt-get install salt-master | | sudo apt-get install salt-master |
| sudo apt-get install salt-minion | | sudo apt-get install salt-minion |
| n | | n | |
| | | If you have a firewall between your salt-master and salt-minions... open the fol |
| | | lowing ports |
| | | |
| n | | n | salt-master ports |
| | | --------------------- |
| | | |
| n | | n | * 4505 |
| | | * 4506 |
| | | |
| t | Setup salt-minon on ubuntu | t | Setup salt-minion on ubuntu |
| =============================== | | =============================== |
| | | |
|
|
| n | | n | .. contents:: |
| | | |
| pour some salt on me | | pour some salt on me |
| ========================= | | ========================= |
| sudo apt-get install salt-minion | | sudo apt-get install salt-minion |
| | | |
| t | .. content:: | t | |
| | | |
| Setup salt-minon on ubuntu | | Setup salt-minon on ubuntu |
|
|
| sudo apt-get install salt-minion | | sudo apt-get install salt-minion |
| | | |
| n | | n | .. content:: |
| | | |
| Setup salt-minon on ubuntu | | Setup salt-minon on ubuntu |
| =============================== | | =============================== |
| | | |
| sudo service salt-minion restart | | sudo service salt-minion restart |
| t | | t | |
| | | |
| | | List the accepted and unaccepted Salt keys |
| | | ============================================== |
| | | |
| | | .. code-block:: bash |
| | | |
| | | salt-key -L |
| | | |
| | | Accept a minion key |
| | | ======================== |
| | | |
| | | .. code-block:: bash |
| | | |
| | | salt-key -a <minion id> |
| | | |
| | | Accept all unaccepted minion keys: |
| | | ====================================== |
| | | |
| | | .. code-block:: bash |
| | | |
| | | salt-key -A |
|
|
| .. code-block:: bash | | .. code-block:: bash |
| | | |
| n | | n | MASTER=master.foxhop.net # put your master here |
| | | |
| sudo apt-get install python-software-properties | | sudo apt-get install python-software-properties |
| sudo add-apt-repository ppa:saltstack/salt | | sudo add-apt-repository ppa:saltstack/salt |
| sudo apt-get install salt-minion | | sudo apt-get install salt-minion |
| | | |
| n | MASTER=master.foxhop.net # put your master here | n | sudo sed -i "s/#master: salt/#master: salt\nmaster: $MASTER/" /etc/salt/minion |
| | | |
| t | sudo sed -e "s/#master: salt/#master: salt\nmaster: $MASTER/" /etc/salt/minion | t | sudo service salt-minion restart |
|
|
| MASTER=master.foxhop.net # put your master here | | MASTER=master.foxhop.net # put your master here |
| | | |
| t | sudo sed -e 's/#master: salt/#master: salt\nmaster: $MASTER/' /etc/salt/minion | t | sudo sed -e "s/#master: salt/#master: salt\nmaster: $MASTER/" /etc/salt/minion |
|
|
| sudo apt-get update | | sudo apt-get update |
| sudo apt-get install salt-minion | | sudo apt-get install salt-minion |
| t | | t | |
| | | MASTER=master.foxhop.net # put your master here |
| | | |
| | | sudo sed -e 's/#master: salt/#master: salt\nmaster: $MASTER/' /etc/salt/minion |
|
|
| sudo apt-get install salt-minion | | sudo apt-get install salt-minion |
| | | |
| t | | t | Setup salt-minon on ubuntu |
| | | =============================== |
| | | |
| | | .. code-block:: bash |
| | | |
| | | sudo apt-get install python-software-properties |
| | | sudo add-apt-repository ppa:saltstack/salt |
| | | sudo apt-get update |
| | | sudo apt-get install salt-minion |
| | | |
|
|
| =============================== | | =============================== |
| | | |
| t | | t | .. code-block:: bash |
| | | |
| sudo apt-get install python-software-properties | | sudo apt-get install python-software-properties |
| | | sudo add-apt-repository ppa:saltstack/salt |
| | | sudo apt-get update |
| | | sudo apt-get install salt-master |
| | | sudo apt-get install salt-minion |
| | | |
|
|
| * 4505 | | * 4505 |
| * 4506 | | * 4506 |
| t | | t | |
| | | Setup salt-master on ubuntu |
| | | =============================== |
| | | |
| | | sudo apt-get install python-software-properties |
|
|
| t | | t | pour some salt on me |
| | | ========================= |
| | | |
| | | Messing with salt-stack |
| | | |
| | | salt-master ports: |
| | | |
| | | * 4505 |
| | | * 4506 |