Created
February 23, 2016 18:24
-
-
Save ssmythe/7b85f2abbfc71e6b9a71 to your computer and use it in GitHub Desktop.
Vagrantfile to create p4d on CentOS6
This file contains hidden or 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
VAGRANTFILE_API_VERSION = "2" | |
BRIDGE = 'en3: Thunderbolt Ethernet' | |
CENTOS67_BOX_URL = 'http://boxes.local.tld/virtualbox/updated_centos_6.7_20160215.box' | |
CENTOS67_BOX_NAME = 'updated/centos-6.7' | |
INSTALL_BASE_CENTOS6 = 'https://gist.githubusercontent.com/ssmythe/f88142c80076df5fac9b/raw/0574b105d06728dd1383460441375cbaa536684b/install-base-centos6.sh' | |
INSTALL_P4D_CENTOS6 = 'https://gist.githubusercontent.com/ssmythe/08803405033335a75f3e/raw/5219b4e5b221098f9147a7297a308a28fcf3c4bb/install-p4d-centos6.sh' | |
servers = { | |
:cdp4 => { | |
:box_url => CENTOS67_BOX_URL, | |
:box => CENTOS67_BOX_NAME, | |
:cpu => '1', | |
:ram => '2048', | |
:provision_shells => [ | |
INSTALL_BASE_CENTOS6, | |
INSTALL_P4D_CENTOS6 | |
] | |
} | |
} | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
servers.each_pair do |name, spec| | |
box_url, box, cpu, ram, provision_shells = spec[:box_url], spec[:box], spec[:cpu], spec[:ram], spec[:provision_shells] | |
config.vm.define name do |node| | |
node.vm.box_url = box_url | |
node.vm.box = box | |
node.vm.hostname = name | |
node.vm.network "public_network", :bridge => BRIDGE | |
node.vm.provider "virtualbox" do |v| | |
v.cpus = cpu | |
v.memory = ram | |
end | |
provision_shells.each do |provision_shell| | |
node.vm.provision "shell", path: "#{provision_shell}" | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment