Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Vagrant 101

Vagrant 101

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

Uğur Özyılmazel

April 15, 2015
Tweet

More Decks by Uğur Özyılmazel

Other Decks in Programming

Transcript

  1. EVSİZ BARKSIZ
    ADAM!

    View full-size slide

  2. Sanal Makine
    Orkestrasyon Aracı

    View full-size slide

  3. Uğur "vigo" Özyılmazel
    vigobronx vigo

    View full-size slide

  4. Hızlıca geliştirme ortamı

    kurmayı sağlayan bir araç!

    View full-size slide

  5. Mitchell Hashimoto tarafından

    Ruby ile geliştirildi ve ilk olarak

    Ruby gem'i şeklinde kullanılmaya

    başlandı.

    View full-size slide

  6. Windows
    Linux
    Mac OS X

    View full-size slide

  7. https://www.virtualbox.org/wiki/Downloads
    1
    VirtualBox ve Extention Pack

    View full-size slide

  8. http://www.vagrantup.com/downloads
    2
    1.7.2

    View full-size slide

  9. vagrant init hashicorp/precise64
    vagrant up
    vagrant ssh
    3
    Ubuntu 12.04 LTS 64-bit

    View full-size slide

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

    View full-size slide

  11. 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
    ?

    View full-size slide

  12. user
    Kullanıcı Adı
    Şifre
    vagrant
    vagrant
    Varsayılan kullanıcı adı ve şifresi

    View full-size slide

  13. 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

    View full-size slide

  14. 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

    View full-size slide

  15. provisioning
    inline
    file
    shell
    Ansible
    # isimlendirilebiliyor
    config.vm.provision "bootstrap", type: "shell" do |s|
    s.inline = "echo hello"
    end
    Chef
    Salt
    Puppet
    Docker

    View full-size slide

  16. provisioning
    inline
    file
    shell
    Ansible
    # her seferinde çalışsın
    config.vm.provision "shell",
    inline: "echo hello",
    run: "always"
    Chef
    Salt
    Puppet
    Docker

    View full-size slide

  17. 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

    View full-size slide

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

    View full-size slide

  19. provisioning

    View full-size slide

  20. linkler
    http://docs.vagrantup.com/
    https://atlas.hashicorp.com/
    http://www.vagrantbox.es/

    View full-size slide

  21. TEŞEKKÜRLER
    SORULAR?

    View full-size slide

  22. @mitchellh
    @vigobronx
    Kod.io 2014, Avusturya

    View full-size slide