Vagant supports many provisioning systems, ranging from the classic bash to more famous systems, such as Chef and Puppet. Saltstack was designed as an external plug-in, but, since Vagrant version 1.3.0, it is possible to use it as a native component, with no need to install external parts.
config.vm.hostname = "cwitter-dev.local" web.vm.synced_folder ".", "/srv/"
So, you need to share the folder containing your configuration files inside the “/srv” folder, then give a host name to your machine and initialize inside Vagrantfile a few configurations related to provisioning.
web.vm.provision :salt do |salt| salt.minion_config = "./minion" salt.verbose = true salt.run_highstate = true salt.install_type = "daily" end
In this case, you are defining the Saltstack version to be installed, if not already installed in your mirror (Daily), are selecting the path of Minion configuration, are asking the system to execute the highstate and to start the command in verbose mode.
You need to specify some essential parameters for the Minion configuration file:
# Set the location of the salt master server, if the master server cannot be # resolved, then the minion will fail to start. master: localhost
These two parameters are indicating to Saltstack that your master is in the local machine and there are no added nodes.
# Set the file client, the client defaults to looking on the master server for # files, but can be directed to look at the local file directory setting # defined below by setting it to local. file_client: local
This part of the configuration specifies a further reference to the section containing formulas and dev pillars, related to foldering. So, giving your machine a name consistent with the configuration, you will be able to custom services, based on the environment.