Vagrant ํ๊ฒฝ ๋ณต์ฌ
Vagrant ํ๊ฒฝ ๋ณต์ฌ
๋ฐ๋ก ๊ทธ ๋ชจ์์ ๋๋ค.Vagrant์ box๋ก ์ค๋น๋ OS๋ ์๊ฐ๋๊ฐ UTC์ด๊ธฐ ๋๋ฌธ์ JST๋ก ๋ณ๊ฒฝํ๊ณ ์ฌ์ฉ์๋ฅผ ์ถ๊ฐํฉ๋๋ค... VM์ ๋ง๋ค ๋๋ง๋ค ์ค์ ์ด ๋ฒ๊ฑฐ๋ก์ด ์ํฉ์์ ๋ณต์ ๋ ๊ฐ๋จํฉ๋๋ค.๊ทธ๋ฐ ๋ ธํธ.
๊ทธ๋์ ๋ ์ ๋ง๋ vm๋ฅผ ํฌ์ฅํด๋ ๋ผ์. ์ด ์ผ๋์ ์์ ๋๊ฐ ๋๋ค๊ณ ์๊ฐํด์. ํ์ง๋ง ์์ ์๋ํ์ ์ต์ ํ๋ฅผ ์ํ๋ค๋ฉด Chef Solo ์ฌ์ฉํ๋ ๋ฐฉ๋ฒ๋ ์์ด์.
๋จ๊ณ๋ ๋ค์๊ณผ ๊ฐ๋ค.
Vagrantfile
์ด ์๋ ํด๋๋ก ์ด๋ํฉ๋๋ค.vagrant package
๋๋ vagrant package [vm name] --output [output.box]
์ ์คํํฉ๋๋ค.vagrant box add
ํฉ๋๋ค.box_url
์์ ์ ํจํค์ง๋ฅผ ์ง์ ํฉ๋๋ค.๊ตฌ์ฒด์ ์ธ ์ ์ฐจ
๋จผ์ Vagrant์ box์์ ๊ธฐ์ด๋ก ํ๋ OS๋ฅผ ์ ํํ ๋ค์์ ์์ ์ ๋ง์ถคํ ๋ฌผ๊ฑด์ ํฌ์ฅ(boxํ) โ box๋ฅผ ์ฌ์ฉํ๋ ์ ์ฐจ์ ๋๋ค.
๊ธฐ๋ณธ vm ์์ฑ ๋ฐ ์ค์
์ฐธ์กฐ ๋น ๋ฅธ ์ค์ Chocolatey+VirtualBox+Vagrant(Windows) ๊ธฐ์ด vm๋ฅผ ๋ง๋ญ๋๋ค.์์ฑ์ด ์๋ฃ๋๋ฉด ์๊ฐ๋๋ฅผ JST๋ก ๋ณ๊ฒฝํ๊ฑฐ๋ ์ฌ์ฉ์
yum -y update
๋ฅผ ์ถ๊ฐํ๊ฑฐ๋ ํ๊ฒฝ ์ค์ ์ ์ํํฉ๋๋ค.ํจํค์ง ๋ช ๋ น ์คํ
vagrant package
๋ช
๋ น์ผ๋ก ํจํค์ง๋ฅผ ๋ด๋ณด๋
๋๋ค.๊ธฐ์ด๋ก ํ๋ vm์ ์ด๋ฆ์ centos65base๋ก ์ด์ผ๊ธฐํ๋ค.
command
c:\> vagrant package centos65base --output centos65base.box
==> redm: Clearing any previously set forwarded ports...
==> redm: Exporting VM...
์ฐธ๊ณ ๋ก ์ฌ๋ฌ vm๋ฅผ ์์ํ๋ ๊ฒฝ์ฐ This command requires a specific VM name to target in a multi-VM environment.
์ด๋ฌํ ์ค๋ฅ๊ฐ ๋ฐ์ํ๊ธฐ ๋๋ฌธ์base๋ฅผ ์ง์ ํฉ๋๋ค.command
c:\> vagrant package basecentos66 centos66base --output centos66base.box
==> redm: Clearing any previously set forwarded ports...
==> redm: Exporting VM...
๋ฑ๋ก ์์
command
c:\> vagrant box add centos65base c:\<boxใฎๅ ดๆ>\centos65base.box
c:\> vagrant box list
cantos65base (virtualbox, 0)
์์ ์ฌ์ฉ
์ฌ๊ธฐ์๋ถํฐ๋ ์ฌ๋ ๋์ ๊ฐ๋ค.
command
c:\> vagrant init centos65base
๋๋ config.vm.box = "centos65base"
.ํธ์คํธ ์ด๋ฆ "_"ํ๋ฉด, ๋ง์ฝ, ๋ง์ฝ...
vm์ ํธ์คํธ ์ด๋ฆ์ "centos6_5_base"
vagrant up
๋ก ์ง์ ํ๋ฉด ์์ ๋จน์ต๋๋ค.
error
Bringing machine 'default' up with 'virtualbox' provider...
There are errors in the configuration of this machine. Please fix
the following errors and try again:
vm:
* The hostname set for the VM should only contain letters, numbers,
hyphens or dots. It cannot start with a hyphen or dot.
Reference
์ด ๋ฌธ์ ์ ๊ดํ์ฌ(Vagrant ํ๊ฒฝ ๋ณต์ฌ), ์ฐ๋ฆฌ๋ ์ด๊ณณ์์ ๋ ๋ง์ ์๋ฃ๋ฅผ ๋ฐ๊ฒฌํ๊ณ ๋งํฌ๋ฅผ ํด๋ฆญํ์ฌ ๋ณด์๋ค https://qiita.com/murachi1208/items/99daa3ca069d907a7b50ํ ์คํธ๋ฅผ ์์ ๋กญ๊ฒ ๊ณต์ ํ๊ฑฐ๋ ๋ณต์ฌํ ์ ์์ต๋๋ค.ํ์ง๋ง ์ด ๋ฌธ์์ URL์ ์ฐธ์กฐ URL๋ก ๋จ๊ฒจ ๋์ญ์์ค.
์ฐ์ํ ๊ฐ๋ฐ์ ์ฝํ
์ธ ๋ฐ๊ฒฌ์ ์ ๋
(Collection and Share based on the CC Protocol.)
์ข์ ์นํ์ด์ง ์ฆ๊ฒจ์ฐพ๊ธฐ
๊ฐ๋ฐ์ ์ฐ์ ์ฌ์ดํธ ์์ง
๊ฐ๋ฐ์๊ฐ ์์์ผ ํ ํ์ ์ฌ์ดํธ 100์ ์ถ์ฒ ์ฐ๋ฆฌ๋ ๋น์ ์ ์ํด 100๊ฐ์ ์์ฃผ ์ฌ์ฉํ๋ ๊ฐ๋ฐ์ ํ์ต ์ฌ์ดํธ๋ฅผ ์ ๋ฆฌํ์ต๋๋ค