fuel-web/dhcp-checker/Vagrantfile
2013-09-23 15:59:40 +04:00

47 lines
2.0 KiB
Ruby

# -*- 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 = "centos"
config.vm.box_url = "http://developer.nrel.gov/downloads/vagrant-boxes/CentOS-6.4-i386-v20130427.box"
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--memory", 348]
end
config.vm.define :develop do |config|
config.vm.provision :shell, :path => "test_env/epel_scapy.sh"
config.vm.network :private_network, ip: "192.168.0.2"
config.vm.network :private_network, ip: "10.10.0.5"
config.vm.provision :shell, :inline => "cd /vagrant && python setup.py develop"
end
config.vm.define :dhcp2 do |config|
config.vm.network :private_network, ip: "10.10.0.8"
config.vm.provision :shell, :inline => "sudo yum -y install dhcp"
config.vm.provision :shell, :inline => "sudo route add -host 255.255.255.255 dev eth1"
config.vm.provision :shell, :inline => "sudo cp /vagrant/test_env/dhcpd.conf.sample2 /etc/dhcp/dhcpd.conf"
config.vm.provision :shell, :inline => "sudo /usr/sbin/dhcpd eth1"
end
config.vm.define :dhcp_relay do |config|
config.vm.network :private_network, ip: "10.10.0.10"
config.vm.provision :shell, :inline => "sudo yum -y install dhcp"
config.vm.provision :shell, :inline => "cp /vagrant/test_env/dhcp_relay.conf /etc/sysconfig/dhcrelay"
config.vm.provision :shell, :inline => "service dhcrelay start"
end
config.vm.define :dhcp1 do |config|
config.vm.network :private_network, ip: "192.168.0.5"
config.vm.provision :shell, :inline => "sudo yum -y install dhcp"
config.vm.provision :shell, :inline => "sudo route add -host 255.255.255.255 dev eth1"
config.vm.provision :shell, :inline => "sudo cp /vagrant/test_env/dhcpd.conf.sample /etc/dhcp/dhcpd.conf"
config.vm.provision :shell, :inline => "sudo /usr/sbin/dhcpd eth1"
end
end