Skip to content

Commit 3dfe59c

Browse files
author
Gabriel Monroy
committed
install etcd gem prior to chef run, cleanup cruft
1 parent 98296b7 commit 3dfe59c

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

Vagrantfile

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,17 @@ Vagrant.configure("2") do |config|
1515
vb.customize ["modifyvm", :id, "--memory", "2048"]
1616
end
1717

18-
# 'deis provider:discover' detects the host machine's user and IP address, however, that command cannot
19-
# be guareteed to run inside the deis codebase. Therefore we can't use that opportunity to discover
20-
# the path of the codebase on the host machine. Therefore we do it now as this Vagrantfile has to exist
21-
# inside the codebase.
22-
nodes_dir = File.dirname(__FILE__) + '/contrib/vagrant/nodes'
23-
2418
config.vm.provision :shell, inline: <<-SCRIPT
2519
# install latest stable chef for subsequent provision blocks
2620
sudo apt-get install -yq curl
2721
chef-client -v | grep 10.14.2 && curl -L https://www.opscode.com/chef/install.sh | sudo bash
22+
# install 'etcd' gem using the vagrant chef runtime
23+
sudo /opt/chef/embedded/bin/gem install etcd --no-ri --no-rdoc
2824
# Avahi-daemon broadcasts the machine's hostname to local DNS.
2925
# Therefore 'deis-controller.local' in this case.
3026
sudo apt-get install -yq avahi-daemon
31-
# Make a record of where the deis code base is on the host machine
32-
echo "#{nodes_dir}" > /home/vagrant/.host_nodes_dir
3327
SCRIPT
34-
28+
3529
# load chef config from ~/.chef/knife.rb (requires `vagrant plugin install chef`)
3630
Chef::Config.from_file(File.join(ENV['HOME'], '.chef', 'knife.rb'))
3731

@@ -49,9 +43,6 @@ Vagrant.configure("2") do |config|
4943
}
5044
# define the run list
5145
chef.add_recipe 'deis::controller'
52-
# cleanup records on teardown
53-
chef.delete_node = true
54-
chef.delete_client = true
5546
end
5647

5748
end

0 commit comments

Comments
 (0)