(c) 2013 MasashiShinbara @shin1x1
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos64_ja"
config.vm.provider :virtualbox do |v|
v.gui = true
end
config.vm.network :private_network, ip: "192.168.33.100"
config.vm.provision :shell,
:inline => "yum install -y httpd && /sbin/service httpd
start"
end
$ vim Vagrantfile
demo1
19.
(c) 2013 MasashiShinbara @shin1x1
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos64_ja"
config.vm.provider :virtualbox do |v|
v.gui = true
end
config.vm.network :private_network, ip: "192.168.33.100"
config.vm.provision :shell,
:inline => "yum install -y httpd && /sbin/service httpd
start"
end
$ vim Vagrantfile
demo1
VMイメージ
20.
(c) 2013 MasashiShinbara @shin1x1
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos64_ja"
config.vm.provider :virtualbox do |v|
v.gui = true
end
config.vm.network :private_network, ip: "192.168.33.100"
config.vm.provision :shell,
:inline => "yum install -y httpd && /sbin/service httpd
start"
end
$ vim Vagrantfile
demo1
GUI表示
21.
(c) 2013 MasashiShinbara @shin1x1
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos64_ja"
config.vm.provider :virtualbox do |v|
v.gui = true
end
config.vm.network :private_network, ip: "192.168.33.100"
config.vm.provision :shell,
:inline => "yum install -y httpd && /sbin/service httpd
start"
end
$ vim Vagrantfile
demo1
IPアドレス
22.
(c) 2013 MasashiShinbara @shin1x1
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "centos64_ja"
config.vm.provider :virtualbox do |v|
v.gui = true
end
config.vm.network :private_network, ip: "192.168.33.100"
config.vm.provision :shell,
:inline => "yum install -y httpd && /sbin/service httpd
start"
end
$ vim Vagrantfile
demo1
プロビジョニング
Chef / Puppet / Shell
23.
(c) 2013 MasashiShinbara @shin1x1
$ vagrant up
Bringing machine 'default' up with 'virtualbox' provider...
[default] Importing base box 'centos64_ja'...
demo1
(c) 2013 MasashiShinbara @shin1x1
$ open http://192.168.33.100/
demo1
26.
(c) 2013 MasashiShinbara @shin1x1
$ vagrant ssh
Welcome to your Vagrant-built virtual machine.
[vagrant@localhost ~]$
$ vagrant destory
Are you sure you want to destroy the 'default' VM? [y/N] y
[default] Forcing shutdown of VM...
Connection to 127.0.0.1 closed by remote host.
[default] Destroying VM and associated drives...
demo1