vagrant 101

26
EVSİZ BARKSIZ ADAM!

Upload: ugur-oezyilmazel

Post on 18-Jul-2015

57 views

Category:

Technology


4 download

TRANSCRIPT

Page 1: Vagrant 101

EVSİZ BARKSIZ ADAM!

Page 2: Vagrant 101

Sanal Makine Orkestrasyon Aracı

Page 3: Vagrant 101

Uğur "vigo" Özyılmazel

vigobronx vigo

Page 4: Vagrant 101

Hızlıca geliştirme ortamıkurmayı sağlayan bir araç!

Page 5: Vagrant 101

Mitchell Hashimoto tarafındanRuby ile geliştirildi ve ilk olarakRuby gem'i şeklinde kullanılmayabaşlandı.

Page 6: Vagrant 101

Windows Linux Mac OS X

Page 7: Vagrant 101

https://www.virtualbox.org/wiki/Downloads

1

VirtualBox ve Extention Pack

Page 8: Vagrant 101

http://www.vagrantup.com/downloads

2

1.7.2

Page 9: Vagrant 101

vagrant init hashicorp/precise64 vagrant up vagrant ssh

3

Ubuntu 12.04 LTS 64-bit

Page 10: Vagrant 101

Vagrantfile

Page 11: Vagrant 101
Page 12: Vagrant 101

HOST

GUEST

Page 13: Vagrant 101

config.vm.box = "hashicorp/precise64" config.vm.network "forwarded_port", guest: 80, host: 8080 # http://localhost:8080 => box'da:80

config.vm.network "private_network", ip: "192.168.33.101" config.vm.synced_folder ".", "/var/www"

/vagrantDefault mount

Page 14: Vagrant 101

vagrant -v | --version vagrant -h | --help

vagrant ssh vagrant up vagrant halt vagrant destroy vagrant package vagrant global-status vagrant plugin list vagrant plugin install vagrant-vbguest vagrant box list vagrant box add USER/Box

?

Page 15: Vagrant 101

user

Kullanıcı Adı Şifre

vagrant vagrant

Varsayılan kullanıcı adı ve şifresi

Page 16: Vagrant 101

providerVirtualBox

VMWare

AWS

Digital Ocean

Rackspace

Docker *

Hyper-V *

vagrant up --provider=vmware_fusion

vagrant box list - hashicorp/precise64 (virtualbox, 1.1.0)

* Ek konfigürasyon işlemleri gerekiyor

Page 17: Vagrant 101

provisioning

inline

file

shell

Ansible

config.vm.provision "shell", inline: "echo hello"

config.vm.provision "shell" do |s| s.inline = "echo hello" end

Chef

Salt

Puppet

Docker

Page 18: Vagrant 101

provisioning

inline

file

shell

Ansible

# isimlendirilebiliyor

config.vm.provision "bootstrap", type: "shell" do |s| s.inline = "echo hello" end

Chef

Salt

Puppet

Docker

Page 19: Vagrant 101

provisioning

inline

file

shell

Ansible

# her seferinde çalışsın

config.vm.provision "shell", inline: "echo hello", run: "always"

Chef

Salt

Puppet

Docker

Page 20: Vagrant 101

provisioning

inline

file

shell

Ansible

# Host'daki .gitconfig'i, Guest'deki vagrant# kullanıcısının home'a kopyala...

config.vm.provision "file", source: "~/.gitconfig", destination: ".gitconfig"

Chef

Salt

Puppet

Docker

Page 21: Vagrant 101

provisioning

inline

file

shell

Ansible

# script.sh'deki komutları çalıştır

Vagrant.configure("2") do |config| config.vm.provision "shell", path: "script.sh" end

Chef

Salt

Puppet

Docker

Page 22: Vagrant 101

provisioning

Page 23: Vagrant 101

linkler

http://docs.vagrantup.com/

https://atlas.hashicorp.com/

http://www.vagrantbox.es/

Page 24: Vagrant 101

TEŞEKKÜRLER SORULAR?

Page 25: Vagrant 101

@mitchellh

@vigobronx

Kod.io 2014, Avusturya

Page 26: Vagrant 101

DEMO