Being A DevOpser. Powered by
Obtvse, highlight.js, theme toc Creative Commons License
Seongsiks Twitter Github Email
DevOps Ruby On Rails Chef Projects Misc Movies & Drama ME

Easiest Chef Server Install on CentOS


가장 간단한 Chef Server Install 방법을 소개합니다. 저는 이 방법만 씁니다. 실은 너무 간단해서 글로 쓰기도 남사스럽네요.

rpm repo 추가

# centos 5.x 일때
$ sudo rpm -Uvh
# centos 6.x 일때
$ sudo rpm -Uvh

기존 라이브러리 업데이트

$ sudo yum update

chef server install

$ sudo yum install -y rubygem-chef-server
$ /usr/sbin/
Checking RabbitMQ...
RabbitMQ not running. Starting...
Starting rabbitmq-server: SUCCESS
Configuring RabbitMQ default Chef user...
Starting CouchDB...
Starting couchdb: [ OK ]
Enabling Chef Services...
Starting Chef Services...
Starting chef-server: [ OK ]
Starting chef-server-webui: [ OK ]
Starting chef-solr: [ OK ]
Starting chef-expander: [ OK ]

설치 확인

  • Chef Server : port=>4000, process => merb : chef-server (api) : worker (port 4000)
  • Chef Server WebUI : port=> 4040, process => merb : chef-server-webui : worker (port 4040)
  • CouchDB : port=>5984, process=> beam.smp -Bd -K true – -root /usr/local/lib/erlang -progname erl – -noshell -noinput -couch_ini /usr/local/etc/couchdb/default.ini /usr/local/etc/couchdb/local.ini -s couch
  • RabbitMQ : port=> 5672, process=> {{beam.smp -W w -K true -A30 – -root /usr/local/lib/erlang -progname erl – -noshell -noinput -s rabbit -sname rabbit -rabbit tcp_listeners [{"", 5672}]}} -Chef Solr(search engine) : port=>8983, process=> /usr/bin/java -Xmx250M -Xms250M -Dsolr.solr.home=/opscode/chef/features/data/solr/home -jar /opscode/chef/features/data/solr/jetty/start.jar
  • Chef Expander : port=>none, process=> ruby ./chef-solr/bin/chef-expander -c /etc/chef/solr.rb -l debug

knife configure

$ knife configure -i
Where should I put the config file? [/root/.chef/knife.rb]
Please enter the chef server URL: [http://localhost:4000]
Please enter a clientname for the new client: [root] chefclient
Please enter the existing admin clientname: [chef-webui]
Please enter the location of the existing admin client's private key: [/etc/chef/webui.pem]
Please enter the validation clientname: [chef-validator]
Please enter the location of the validation key: [/etc/chef/validation.pem]
Please enter the path to a chef repository (or leave blank):
Creating initial API user...
Created client[chefclient]
Configuration file written to /root/.chef/knife.rb

삽질 Tips

Cipher is not a Module

제목과 같은 오류가 나거나 아무튼 Cipher관련 오류가 날때 두가지 해결법.

  • 첫째, 걍 ruby를 다시 깐다. rvm을 이용해서 1.9.x일때 위와같은 오류는 사라진다.
  • 둘째, ruby source를 다운 받아 cipher을 설치 해준다.

    $ wget


    $ wget

    이렇게 소스를 받고 압축을 푼 후 소스에 들어가서

    $ cd ext/openssl
    $ ruby extconf.rb
    $ make && make install
comments powered by Disqus
Back to Chef