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

Vagrant勉強会 at ペパボ (2014/2/27)

Vagrant勉強会 at ペパボ (2014/2/27)

2014/2/27にペパボで開催されたVagrant勉強会の資料です。
なぜかPackerで箱作った話をしています。

Okumura Takahiro

March 02, 2014
Tweet

More Decks by Okumura Takahiro

Other Decks in Programming

Transcript

  1. Vagrant.configure("2") do |config|! config.vm.define "centos5-i386" do |c|! c.vm.box = "CentOS5.10-i386"!

    c.vm.box_url = “./builds/centos5.10-i386.box"! end! end JUVTFT/05CPY@VSM #65dWBHSBOUE$FOU04J
  2. $ vagrant box list CentOS5.10-i386 (virtualbox) $ vagrant box remove

    CentOS5.10-i386 Removing box 'CentOS5.10-i386' ...
  3. $ vagrant box list CentOS5.10-i386 (virtualbox) $ vagrant box remove

    CentOS5.10-i386 Removing box 'CentOS5.10-i386' ... $ vagrant up CentOS5.10-i386 Bringing machine 'CentOS5.10-i386' up ...
  4. $ vagrant box list CentOS5.10-i386 (virtualbox) $ vagrant box remove

    CentOS5.10-i386 Removing box 'CentOS5.10-i386' ... $ vagrant up CentOS5.10-i386 Bringing machine 'CentOS5.10-i386' up ... $ vagrant box list \ | awk '{print $1}' \ | xargs -I% vagrant box remove %
  5. --- http/ks-centos-5.10.cfg +++ http/ks-centos-6.5.cfg @@ -14,7 +14,7 @@ skipx zerombr

    -clearpart --all --initlabel +clearpart --all autopart auth --useshadow --enablemd5
  6. --- http/ks-centos-5.10.cfg +++ http/ks-centos-6.5.cfg @@ -44,5 +45,6 @@ useradd vagrant

    -g vagrant -G wheel -u 1001 echo "vagrant" | passwd --stdin vagrant # sudo -echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> / etc/sudoers +echo "vagrant ALL=(ALL) NOPASSWD: ALL" >> / etc/sudoers.d/vagrant sed -i "s/^.*requiretty/#Defaults requiretty/" /etc/sudoers +%end