mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Add a deploy script tot he writing deploy components section
This commit is contained in:
parent
0134c379bb
commit
54b1bea60f
@ -23,3 +23,23 @@ A good, well commented, example of this process is the Fedora deployment
|
|||||||
script:
|
script:
|
||||||
|
|
||||||
https://github.com/saltstack/salt-cloud/blob/master/saltcloud/deploy/Fedora.sh
|
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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user