Vagrant 101

Vagrant 101

Sanal makine orkestrasyon aracı Vagrant'a genel bakış.

033485f7e18823d4ccabb24e5cb4935f?s=128

Uğur Özyılmazel

April 15, 2015
Tweet

Transcript

  1. 11.
  2. 13.

    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" /vagrant Default mount
  3. 14.

    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 ?
  4. 16.

    provider VirtualBox 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
  5. 17.

    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
  6. 18.

    provisioning inline file shell Ansible # isimlendirilebiliyor config.vm.provision "bootstrap", type:

    "shell" do |s| s.inline = "echo hello" end Chef Salt Puppet Docker
  7. 19.

    provisioning inline file shell Ansible # her seferinde çalışsın config.vm.provision

    "shell", inline: "echo hello", run: "always" Chef Salt Puppet Docker
  8. 20.

    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
  9. 21.

    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
  10. 26.