-
Notifications
You must be signed in to change notification settings - Fork 418
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #53 from ZetaBit/vagrant
Vagrant
- Loading branch information
Showing
6 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.vagrant/ | ||
.idea/ | ||
top.sls |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- mode: ruby -*- | ||
# vi: set ft=ruby : | ||
|
||
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | ||
VAGRANTFILE_API_VERSION = "2" | ||
|
||
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | ||
config.vm.box = "ubuntu/trusty64" | ||
config.vm.hostname = "salt" | ||
config.vm.synced_folder "./", "/srv/salt", id: "vagrant-root" | ||
|
||
config.ssh.forward_agent = true | ||
|
||
config.vm.provider :virtualbox do |vb| | ||
# Use VBoxManage to customize the VM. For example to change memory: | ||
vb.customize ["modifyvm", :id, "--memory", "1024"] | ||
end | ||
if Vagrant.has_plugin?("vagrant-cachier") | ||
config.cache.scope = :box | ||
end | ||
|
||
# Set up salt-master and minion | ||
config.vm.provision "shell", path: "dev/setup-salt.sh" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
base: | ||
'salt': | ||
- salt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
sudo add-apt-repository ppa:saltstack/salt -y | ||
sudo apt-get update -y | ||
sudo apt-get install salt-master -y | ||
sudo apt-get install salt-minion -y | ||
# setup top files to test the formula | ||
sudo mkdir -p /srv/pillar | ||
sudo ln -s /srv/salt/pillar.example /srv/pillar/salt.sls | ||
sudo ln -s /srv/salt/dev/pillar_top.sls /srv/pillar/top.sls | ||
# this file will be copied to make a running config. it should not be checked in. | ||
sudo cp /srv/salt/dev/state_top.sls /srv/salt/top.sls | ||
# Accept all keys# | ||
sleep 15 #give the minion a few seconds to register | ||
sudo salt-key -y -A |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
base: | ||
'salt': | ||
- salt.master | ||
- salt.minion | ||
- salt.cloud |