Personal Vagrantfile for SaltStack Development in Ubuntu 14.04 LTS
-
Run the following commands in a terminal. Git, VirtualBox and Vagrant must already be installed.
git clone [email protected]:abednarik/saltdev-ubuntu.git cd saltdev-ubuntu
-
Edit Vagrantfile to update your local salt repository path and launch ubuntu instance
vagrant up
-
Finally login as vagrant user and install salt using pip in editable module
vagrant ssh sudo su - cd salt pip install -e .
-
For developing and debugging I use tmux to run salt-master and salt-minion in foreground in error mode [ I mostly add log.error when I want to debug something ]
sudo salt-master -l error sudo salt-minion -l error
-
Check if everything went fine
salt '*' test.ping
There is a placeholder state in /srv/salt called default.sls. Just put the content you want to test and run
salt 'salt' state.apply default
This is heavily based on salt-vagrant-demo following official Salt Development Docs