Vagrantï¼ãã¤ã°ã©ã³ãï¼ã®ã¤ã³ã¹ãã¼ã«
çããããã«ã¡ã¯
ãå
æ°ã§ãããç§ã¯å
æ°ã§ãã
ä»æ¥ã¯Vargantã¨å¼ã°ããã½ãããã¤ã³ã¹ãã¼ã«ãã¦ã¿ã¾ããã
Vargantã¨ã¯ï¼
ä»®æ³ç°å¢ãæ§ç¯ããã½ããã¦ã§ã¢ã§ãã
å®éã®éçºã§äººã«ãã£ã¦ç°å¢ãç°ãªãã¨ãæ¬çªç°å¢ã§åããªããã¨ãæãã¾ãã
ãããªæã«ä»®æ³ç°å¢ãä½ãåºãããã§ãã
ã¤ã³ã¹ãã¼ã«
ä»ã«Virtual Boxãå¿
è¦ãªã®ã§ãäºåã«ã¤ã³ã¹ãã¼ã«ãã¦ãã ããã
Virtual Boxを使ってみよう! - のんびりしているエンジニアの日記
Vagrantãã¤ã³ã¹ãã¼ã«ãã¦ã¿ã¾ãã
èªåã使ã£ã¦ããOSã®ããã±ã¼ã¸ããã¦ã³ãã¼ãããå±éããã°åé¡ãªãã§ãã
$ vagrant --version
Vagrant 1.6.5
å©ç¨ãã¦ã¿ã¾ããã
ã¾ããVagrantã«templateãç»é²ãããã¦ã³ãã¼ããéå§ãã¾ãã
vagrant box add [name] [url]
$ vagrant box add ubuntu1404 https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-i386-vagrant-disk1.box ==> box: Adding box 'ubuntu1404' (v0) for provider: box: Downloading: https://cloud-images.ubuntu.com/vagrant/trusty/current/trusty-server-cloudimg-i386-vagrant-disk1.box ==> box: Successfully added box 'ubuntu1404' (v0) for 'virtualbox'!
ä»ã®ãå¿
è¦ãªå ´åã¯ä»¥ä¸ããæ¢ãã¦ãã ããã
A list of base boxes for Vagrant - Vagrantbox.es
èµ·åãã¦ã¿ã¾ã
$ vagrant init ubuntu1404 $ vagrant up
ç¶æ ãè¦ããããªå ´åã¯
$ vagrant status
sshã§vagrantä¸ã®ãã·ã³ã«ãã°ã¤ã³ãã¾ãã
$ vagrant ssh Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.13.0-39-generic i686) ç¥ vagrant@vagrant-ubuntu-trusty-32:~$ ls
ãããã¯ã¼ã¯
è¨å®ãã¡ã¤ã«ãå¼ã£ãå¾ã«pingã§ç¢ºèªãã¾ãã
å ã¿ã«27è¡ç®ã«è¨å®ãåå¨ãã¾ãããããã³ã¡ã³ãã¢ã¦ããã¾ãã以ä¸ã«ããã«å¤æ´ãã¾ãã
$vim Vagrantfile config.vm.network "private_network", ip: "192.168.33.10" $ping 192.168.33.10
Shutdown
$vagrant suspend