Add a deploy script tot he writing deploy components section

This commit is contained in:
Thomas S Hatch 2012-08-01 09:29:15 -06:00
parent 0134c379bb
commit 54b1bea60f

View File

@ -23,3 +23,23 @@ A good, well commented, example of this process is the Fedora deployment
script:
https://github.com/saltstack/salt-cloud/blob/master/saltcloud/deploy/Fedora.sh
.. code-block:: bash
#!/bin/bash
# Install the salt-minion package from yum. This is easy for Fedora because
# Salt packages are in the Fedora package repos
yum install -y salt-minion
# Save in the minion public and private RSA keys before the minion is started
mkdir -p /etc/salt/pki
echo '{{ vm['priv_key'] }}' > /etc/salt/pki/minion.pem
echo '{{ vm['pub_key'] }}' > /etc/salt/pki/minion.pub
# Copy the minion configuration file into place before starting the minion
echo '{{ minion }}' > /etc/salt/minion
# Set the minion to start on reboot
systemctl enable salt-minion.service
# Start the minion!
systemctl start salt-minion.service