ã¡ã¤ã³ã®éçºç°å¢ã¨ãã¦ä½¿ã£ã¦ãubuntuããããã14.10ã«ã¢ãããã¼ããã¾ãããååã®14.04ã®æããpackerã使ã£ã¦ã¿ã¦ã¦ããæãã ã£ããã§ãããæé ãã¡ã¢ã£ã¦ãªãã¦è¦å´ããã®ã§ä»åº¦ããã¡ã¢ã ubuntuã®vagrant boxèªä½ã¯ããã©ã«ãã®ãã¤ãvagrantcloud.comã¨ãããµã¤ãã«ä¸ãã£ã¦ãããã§ããããã£ã¹ã¯å®¹éãã¡ã£ã¡ããã®ã¨ã14.04ã®æã¯guest additionããã¾ãåãã¦ãªãã£ãã®ã§å¥éå ¥ããªããããã«ãã¦èªåã®boxãä½ã£ã¦ã¾ããï¼14.10ã§ã¯è©¦ãã¦ã¾ããï¼ å®æåã¯ãã¡ãã«ã¢ãããã¦ããã®ã§ãã¨ãããã欲ããæ¹ã¯æã£ã¦ã£ã¦ãã ããã Packerã使ã£ãvagrant boxã®ä½ããã Packerãã¤ã³ã¹ãã¼ã«ããããPackerã®ãã«ããã¡ã¤ã«ããã©ã¼ã¯ãã¾ãã -> æç°ãã©ã¼ã¯ ååã®ä¿®æ£ãåèã«ãubuntu1410.jso
Packer ã¯JSONã§è¨è¿°ããæ§æãã¡ã¤ã«ã«å¾ã£ã¦ $ packer build ã³ãã³ãä¸çºã§VMã¤ã¡ã¼ã¸ãä½æã§ããããã«Vagrant BoxãAmazon EC2ã®ã¤ã¡ã¼ã¸ã«ã¨ã¯ã¹ãã¼ãã§ããè¶ ã¯ã¼ã«ãªãã¼ã«ã§ããã¡ãªã¿ã«éçºè ã¯Vagrantã®éçºè ã§æåãªMitchell Hashimotoæ°ã§ãã ä»åã¯Packerã§Vagrant Boxã®ä½æã®èªååããããã¨ããéã«ããã£ããã¤ã³ãã¨ãã®è§£æ±ºæ¹æ³ã«ã¤ãã¦å ±åãã¾ãã ãã©ãã«ãã®1: SSHã«æ¥ç¶ã§ããã¿ã¤ã ã¢ã¦ããã packer build ã®å®è¡ä¸ã« ==> virtualbox: Waiting for SSH to become available... ã¨è¡¨ç¤ºãããã¾ã¾ã¿ã¤ã ã¢ã¦ããã¦ãã«ã失æã«ãªãå ´åããvagrant up å®è¡ä¸ã« [default] Booting VM... [default]
ä»æ´ãªããããã®è¾ºã®ä»®æ³ç°å¢ãæ§ç¯ããããã³ã³ãã£ã®ã¥ã¬ã¼ã·ã§ã³ãè¡ããã¼ã«ãå¤ããã¦ããããããªããªã£ã¦ããã®ã§ããªããããªæãã§ã¾ã¨ãã¦ã¿ãã Vagrant è¨ããã¨ç¥ããVagrantã2010å¹´ãMitchell Hashimotoæ°ã«ãã£ã¦ã¹ã¿ã¼ãããã*1 æåã®é ã¯ãVirtualBoxã®CLIã¤ã³ã¿ã¼ãã§ã¼ã¹ã¨ããæãã ã£ãããæè¿ã¯Vmware, AWSããµãã¼ããã¦ãã*2 Disposableãªéçºç°å¢ãæä¾ãã¦ãããã Packer Vagrantã®ä½è ã®Mitchell Hashimotoæ°ãä½æãããåä¸ã®configurationãã¡ã¤ã«ã§è¤æ°ã®ãã©ãããã©ã¼ã åãã«åä¸ã®ã¤ã¡ã¼ã¸ãä½æãããã¨ãç®çã¨ãããã¼ã«ã*3 Vagrantåãã®æ©è½ã¯å®è£ ããã¦ããããVagrantã¨ã¯å®å ¨ã«ç¬ç«ãã¦ããã*4 Vagrantä¸ã«æ§ç¯ããéçºç°å¢ã¨AWSç°å¢ä¸ã«ç¨
æè¬ç¾©ã§Fedora19ã®Boxãä½ããã¨ãã課é¡ãããã Packerã§Vagrantç¨ã®Boxãä½æããã¨ãã®ã¡ã¢ ãåèã«ãboxãä½ããã¨ããæ,è²ã ã¤ã¾ã¥ããã®ã§ã¡ã¢ å®è¡ç°å¢ VirtualBox 4.2.18 Vagrant 1.3.3,1.3.4 packer 0.3.9 ã±ã¼ã¹1 : vagrant up ããWaiting for VM to boot. This can take a few minutes.ãã®ã¾ã¾åããªããªã ãªããVMèªä½ã¯ç«ã¡ä¸ãã£ã¦ããsshãã§ãããVagrantã®å ¬ééµãç»é²ããªãã£ãã®ãåå ããã,éµãç»é²ããã¨ã¡ããã¨åããã $ wget âno-check-certificate âhttps://raw.github.com/mitchellh/vagrant/master/keys/vagrant.pubâ -O /hom
å¿ è¦ã¨ãªãCentOSã®ãã¼ã¸ã§ã³ãæå ã§è¦ã¤ãããªãã£ãã®ã§ãVagrantã®boxãæ¹ãã¦ä½ã£ã¦ã¿ãã ãã®éãä¹ ãã¶ãã ã£ãã®ã§Vagrant boxã®ä½ææé ãå確èªã ãã®æé ã¯ç¹ã«PackerãVeeWeeã使ããã«æä½æ¥ã§è¡ãã ä»åãå¿ è¦ãªCentOSã®ãã¼ã¸ã§ã³ã6.4ãªã®ã§ãäºãMirror siteã確èªãã¦ããã ããã§ã¯ã以ä¸ã®ãã®ãå©ç¨ã http://ftp.riken.jp/Linux/centos/6.4/isos/x86_64/CentOS-6.4-x86_64-minimal.iso äºããã¦ã³ãã¼ããã¦ãããã¨ã ä¸è¨ã«ã¯ãªããã¼ã¸ã§ã³ãããã®ã§ãCentOSã®Mirror siteä¸è¦§ãã確èªããã®ãããã http://www.centos.org/download/mirrors/ 次ã«ãVirtualBoxã®è¨å® â»åè¨å®ã«é¢ãã¦ã¯ãç°å¢ã«å¿
æè¿è²ã ãªæ¤è¨¼ã«VirtualBoxã使ã£ã¦ãã¾ãããVMãæ¯åä½ãã®ãè¾ãã®ã§ãVagrantã¨Packerã試ãã¦ã¿ãã¨ãã®ã¡ã¢ã§ãã ä»å試ããç°å¢ã¯ä»¥ä¸ã®éãã§ãã Windows7 Enterprise ServicePack1 64bitç VirtualBox 4.3.6-91406 Vagrant 1.4.1 Packer 0.4.1 Packerã§ä½æããVMã¯CentO6.5ã®64bitçãé¸å®ãã¾ããã ç°å¢æ§ç¯ ã¾ãã¯ãã¼ã¹ã«ãªãç°å¢ãä½ãã¾ãã VirtualBoxã®ã¤ã³ã¹ãã¼ã« ãããããææ°çã®VirtualBoxããã¦ã³ãã¼ãããã¤ã³ã¹ãã¼ã«ãã¾ãã Vagrantã®ã¤ã³ã¹ãã¼ã« ãããããææ°çã®Vagrantããã¦ã³ãã¼ãããã¤ã³ã¹ãã¼ã«ãã¾ãã Packerã®ã¤ã³ã¹ãã¼ã« ãããããææ°çã®Packerããã¦ã³ãã¼ããã¾ãã ãã¦ã³ãã¼ãããZipãã¡
ãã³ãã¬ã¼ããèªåã§ä½ãã®ãã©ãã«ãé¢åã«æãã¦ãªããªãæãåºããã«ãã Packer ã§ããã調ã¹ã¦ã¿ããçµæ§ãã³ãã¬ã¼ããå ¬éãã¦ããã¦ããæ¹ãããããã§ãã misheska/basebox-packer https://github.com/misheska/basebox-packer shiguredo/packer-templates https://github.com/shiguredo/packer-templates hnakamur/my-packer-template-files https://github.com/hnakamur/my-packer-template-files nickchappell/packer-templates https://github.com/nickchappell/packer-templates ã¨ãã訳ã§ä»æ´ãªãã試ã
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}