Skip to content

Commit

Permalink
remove unnecessary cookbook and fix stupid CentOS 7 box issue: hashic…
Browse files Browse the repository at this point in the history
  • Loading branch information
windperson committed Mar 27, 2016
1 parent a20a4fd commit c164a1e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 36 deletions.
18 changes: 6 additions & 12 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,16 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vbguest.installer_arguments = %w{--nox11}
config.vbguest.auto_reboot = true

if Vagrant.has_plugin?("vagrant-cachier")
config.cache.scope = :box
end

config.vm.box = "#{VG_BOX_NAME}"

if config.vm.box.to_s == "centos/7"
#turn off default rsync sharing in offical CentOS 7 vagrant box
config.vm.synced_folder '.', '/home/vagrant/sync', disabled: true
config.vm.synced_folder '.', '/vagrant', disabled: false
end
config.ssh.insert_key = false

config.vm.hostname = 'dockerhost'
config.vm.define "dockerhost"
#config.ssh.insert_key = false
#config.vm.hostname = 'dockerhost'
#config.vm.define "dockerhost"
config.vm.network :private_network, :ip => "#{VM_IP}"
file_disk = "docker_data.vdi"
attach_dir = "disk_data"
Expand Down Expand Up @@ -95,14 +90,13 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.omnibus.chef_version = :latest

config.vm.provision "chef_solo" do |chef|

if config.vm.box.to_s == "centos/7"
chef.add_recipe "centos7nic-patch"
# firewalld built-in in CentOS 7 has a issue with docker:
# https://github.com/docker/docker/issues/16137
chef.add_recipe "firewall"
end

chef.add_recipe "firewall"
chef.add_recipe "htop"

chef.add_recipe "docker"
chef.add_recipe "docker::compose"
chef.add_recipe "docker::machine"
Expand Down
5 changes: 4 additions & 1 deletion cookbooks/centos7nic-patch/recipes/default.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
if %w{rhel}.include?(node['platform_family']) and 7 <= node['platform_version'].to_i
# CentOS box stupid bug:
# https://github.com/mitchellh/vagrant/issues/2614#issuecomment-108050799
bash 'make-fake-nic-detect-rule' do
code "ln -s /dev/null /etc/udev/rules.d/70-persistent-net.rules"
code "rm /etc/udev/rules.d/70-persistent-net.rules
&& ln -sf /dev/null /etc/udev/rules.d/70-persistent-net.rules"
end
end
Binary file not shown.
3 changes: 0 additions & 3 deletions cookbooks/htop/metadata.rb

This file was deleted.

20 changes: 0 additions & 20 deletions cookbooks/htop/recipes/default.rb

This file was deleted.

0 comments on commit c164a1e

Please sign in to comment.