These are notes for using the "Salt in 60 seconds" tutorial with DigitalOcean - http://www.saltstat.es/posts/quickstart.html
After creating a droplet via their web interface, login with you IP address and the password that is emailed to you.
export IP=your-ip
ssh root@$IP
Install saltstack
curl -L http://bootstrap.saltstack.org | sudo sh -s -- -M stable
Add a deployer
user
adduser deployer
sudo usermod -aG sudo deployer
Create required directories for salt and make the deployer
owner of the directory
mkdir -p /srv/salt && chown deployer -R /srv/salt
Create saltstack config
echo '''### This is controlled by the hosts file
master: localhost
id: localhost
file_roots:
base:
- /srv/salt/states
log_file: /var/log/salt/minion
log_level: debug
log_level_logfile: garbage
''' > /etc/salt/minion
sed -i 's/#master: salt/master: localhost/' /etc/salt/minion
Start saltstack
salt-minion -d
Exit from root
and login as deployer
for rest of the tutorial.
The rsync
deploy command for the rest of the tutorial is now the following:
rsync -azve ssh `pwd`/deploy/salt/ deployer@$IP:/srv/salt