Alexis Seigneurin - @aseigneurin
Ippon Technologies - @ippontech
(Flèches droite/gauche et haut/bas pour naviguer, ESC pour tout afficher)
Orchestration de machines virtuelles
VMs redistribuables : Vagrantfile + base box
Plutôt orienté développeur
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "saucy-server-amd64"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/saucy/current/saucy-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.provision "shell", path: "scripts/provision.sh"
end
VM headless
Up & running en 30 secondes
Provisioning
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "saucy-server-amd64"
config.vm.box_url = "http://cloud-images.ubuntu.com/vagrant/saucy/current/saucy-server-cloudimg-amd64-vagrant-disk1.box"
config.vm.provision "shell", path: "scripts/provision-shared.sh"
config.vm.define "back-end-1" do |backend1|
backend1.vm.network "private_network", ip: "192.168.1.11", virtualbox__intnet: "network1"
backend1.vm.network "forwarded_port", guest: 80, host: 8011
backend1.vm.provision "shell", path: "scripts/provision-backend-1.sh"
end
config.vm.define "back-end-2" do |backend2|
backend2.vm.network "private_network", ip: "192.168.1.12", virtualbox__intnet: "network1"
backend2.vm.network "forwarded_port", guest: 80, host: 8012
backend2.vm.provision "shell", path: "scripts/provision-backend-2.sh"
end
config.vm.define "front-end" do |frontend|
frontend.vm.network "private_network", ip: "192.168.1.10", virtualbox__intnet: "network1"
frontend.vm.network "forwarded_port", guest: 80, host: 8010
frontend.vm.provision "shell", path: "scripts/provision-frontend.sh"
end
end
3 VMs "isolées ensemble"
Up & running en 2 minutes 30
3 VMs = 3 provisioning
3 x apt-get update
2 x installation Apache
Boxes :
$ vagrant box list
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.define "back-end-1" do |backend1|
backend1.vm.box = "back-end-1"
backend1.vm.network "private_network", ip: "192.168.1.11", virtualbox__intnet: "network2"
backend1.vm.network "forwarded_port", guest: 80, host: 9011
end
config.vm.define "back-end-2" do |backend2|
backend2.vm.box = "back-end-2"
backend2.vm.network "private_network", ip: "192.168.1.12", virtualbox__intnet: "network2"
backend2.vm.network "forwarded_port", guest: 80, host: 9012
end
config.vm.define "front-end" do |frontend|
frontend.vm.box = "front-end"
frontend.vm.network "private_network", ip: "192.168.1.10", virtualbox__intnet: "network2"
frontend.vm.network "forwarded_port", guest: 80, host: 9010
end
end
Up & running en 1 minutes 30
Pas automatisé
Pas de contrôle sur la box d'origine
-> Packer