Cloud Computing & MSA

CHEF를 소스로 설치하기 (1)

강철지그·2014년 4월 3일·조회 4,810

CHEF 설치는 보통 Ubuntu 환경에서 apt-get을 이용하면 편리하게 진행할 수 있습니다. 다만 기능을 수정하거나 내부 동작을 확인해야 한다면 소스를 내려받아 설치하는 방법도 사용할 수 있습니다.

git 설치

우선 git을 통해 소스를 다운로드해야 하므로, git부터 설치합니다.

# apt-get install git
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  git-man liberror-perl
Suggested packages:
  git-daemon-run git-daemon-sysvinit git-doc git-el git-arch git-cvs git-svn git-email git-gui gitk gitweb
The following NEW packages will be installed:
  git git-man liberror-perl
0 upgraded, 3 newly installed, 0 to remove and 51 not upgraded.
Need to get 6,741 kB of archives.
After this operation, 15.2 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://kr.archive.ubuntu.com/ubuntu/ precise/main liberror-perl all 0.17-1 [23.8 kB]
Get:2 http://kr.archive.ubuntu.com/ubuntu/ precise/main git-man all 1:1.7.9.5-1 [630 kB]
Get:3 http://kr.archive.ubuntu.com/ubuntu/ precise/main git amd64 1:1.7.9.5-1 [6,087 kB]
Fetched 6,741 kB in 1s (5,123 kB/s)
Selecting previously unselected package liberror-perl.
(Reading database ... 49099 files and directories currently installed.)
Unpacking liberror-perl (from .../liberror-perl_0.17-1_all.deb) ...
Selecting previously unselected package git-man.
Unpacking git-man (from .../git-man_1%3a1.7.9.5-1_all.deb) ...
Selecting previously unselected package git.
Unpacking git (from .../git_1%3a1.7.9.5-1_amd64.deb) ...
Processing triggers for man-db ...
Setting up liberror-perl (0.17-1) ...
Setting up git-man (1:1.7.9.5-1) ...
Setting up git (1:1.7.9.5-1) ...

CHEF 소스 다운로드

이제 CHEF 소스를 다운로드합니다.

# git clone https://github.com/opscode/chef.git
Cloning into 'chef'...
remote: Reusing existing pack: 89314, done.
remote: Counting objects: 280, done.
remote: Compressing objects: 100% (272/272), done.
remote: Total 89594 (delta 135), reused 1 (delta 0)
Receiving objects: 100% (89594/89594), 70.12 MiB | 2.17 MiB/s, done.
Resolving deltas: 100% (60674/60674), done.

다운로드가 끝나면 chef 디렉터리가 생성됩니다. 이후 작업은 이 디렉터리 안에서 진행해야 합니다.

# cd chef

bundler 설치

chef 디렉터리에서 의존성 설치를 위해 bundle install을 실행하려고 합니다.

# bundle install
The program 'bundle' is currently not installed.  You can install it by typing:
apt-get install ruby-bundler

bundle 명령이 없다는 메시지가 출력되었습니다. Ruby 프로젝트의 의존성을 설치하려면 Bundler가 필요하므로 ruby-bundler 패키지를 설치합니다.

# apt-get install ruby-bundler
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  ruby-bundler
0 upgraded, 1 newly installed, 0 to remove and 122 not upgraded.
Need to get 0 B/102 kB of archives.
After this operation, 664 kB of additional disk space will be used.
Selecting previously unselected package ruby-bundler.
(Reading database ... 50480 files and directories currently installed.)
Unpacking ruby-bundler (from .../ruby-bundler_1.0.15-0ubuntu2_all.deb) ...
Setting up ruby-bundler (1.0.15-0ubuntu2) ...

설치 후에는 bundle 명령이 정상적으로 잡히는지 간단히 확인해 볼 수 있습니다.

# bundle --version

일단 여기까지 진행했고, 다음 글에서 계속 이어서 설치 과정을 진행해 보겠습니다.

댓글 0

로그인 후 댓글을 남길 수 있습니다.

아직 댓글이 없습니다.