Difference between revisions of "SaltStack Install"
Jump to navigation
Jump to search
Line 17: | Line 17: | ||
lxc exec sftp3 -- script /dev/null -c "sudo sh install_salt.sh -P -x python3 -D" | lxc exec sftp3 -- script /dev/null -c "sudo sh install_salt.sh -P -x python3 -D" | ||
``` | ``` | ||
+ | |||
+ | Create envs | ||
+ | ``` | ||
+ | mkdir /srv/salt/dev | ||
+ | mkdir /srv/salt/qa | ||
+ | mkdir /srv/salt/prod | ||
+ | ``` | ||
+ | |||
+ | /srv/salt/dev/top.sls | ||
+ | ``` | ||
+ | dev: | ||
+ | 'sftp*.uvoo.io': | ||
+ | - sftp | ||
+ | ``` | ||
+ | |||
+ | salt -l debug 'myhost.uvoo.io' state.apply saltenv=dev test=True |
Revision as of 04:42, 13 April 2020
Examples using LXD
Master
lxc launch ubuntu:18.04 salt lxc exec sftp3 -- script /dev/null -c "curl -L https://bootstrap.saltstack.com -o install_salt.sh" lxc exec sftp3 -- script /dev/null -c "sudo sh install_salt.sh -M -x python3 -D"
Minion
lxc launch ubuntu:18.04 sftp3 lxc exec sftp3 -- script /dev/null -c "curl -L https://bootstrap.saltstack.com -o install_salt.sh" lxc exec sftp3 -- script /dev/null -c "sudo sh install_salt.sh -P -x python3 -D"
Create envs
mkdir /srv/salt/dev mkdir /srv/salt/qa mkdir /srv/salt/prod
/srv/salt/dev/top.sls
dev: 'sftp*.uvoo.io': - sftp
salt -l debug 'myhost.uvoo.io' state.apply saltenv=dev test=True