2012年9月16日日曜日

Install chef-sole on CentOS6.3


このエントリーをはてなブックマークに追加


CentOS6.3 で chef-solo を使えるようにする。


# yum install gcc make git \
ruby ruby-devel rubygems ruby-rdoc

# gem install knife-solo --no-rdoc --no-ri

# gem list
*** LOCAL GEMS ***
archive-tar-minitar (0.5.2)
bunny (0.7.9)
chef (10.14.2)
erubis (2.7.0)
highline (1.6.15)
ipaddress (0.8.0)
json (1.6.1)
knife-solo (0.0.13)
librarian (0.0.24)
mime-types (1.19)
mixlib-authentication (1.3.0)
mixlib-cli (1.2.2)
mixlib-config (1.1.2)
mixlib-log (1.4.1)
mixlib-shellout (1.1.0)
moneta (0.6.0)
net-ssh (2.2.2)
net-ssh-gateway (1.1.0)
net-ssh-multi (1.1)
ohai (6.14.0)
polyglot (0.3.3)
rest-client (1.6.7)
systemu (2.5.2)
thor (0.16.0)
treetop (1.4.10)
uuidtools (2.1.3)
yajl-ruby (1.1.0)

# mkdir /root/.chef/
# vim /root/.chef/knife.rb
current_dir = File.dirname(__FILE__)
user = ENV['OPSCODE_USER'] || ENV['USER']
node_name                "chef-solo"
client_key               ""
validation_client_name   ""
validation_key           "#{ENV['HOME']}/.chef/#{ENV['ORGNAME']}-validator.pem"
chef_server_url          ""
cache_type               'BasicFile'
cache_options( :path => "#{ENV['HOME']}/.chef/checksums" )
cookbook_path            "/etc/chef/cookbooks"
cookbook_copyright       "Your Company, Inc."
cookbook_license         "apachev2"
cookbook_email           "cookbooks@yourcompany.com"

# knife kitchen /etc/chef
# knife cookbook create httpd
# ll /etc/chef/cookbooks/httpd/
合計 44
-rw-r--r-- 1 root root  410  9月 16 02:48 2012 CHANGELOG.md
-rw-r--r-- 1 root root   88  9月 16 02:48 2012 README.md
drwxr-xr-x 2 root root 4096  9月 16 02:48 2012 attributes
drwxr-xr-x 2 root root 4096  9月 16 02:48 2012 definitions
drwxr-xr-x 3 root root 4096  9月 16 02:48 2012 files
drwxr-xr-x 2 root root 4096  9月 16 02:48 2012 libraries
-rw-r--r-- 1 root root  256  9月 16 02:48 2012 metadata.rb
drwxr-xr-x 2 root root 4096  9月 16 02:48 2012 providers
drwxr-xr-x 2 root root 4096  9月 16 02:48 2012 recipes
drwxr-xr-x 2 root root 4096  9月 16 02:48 2012 resources
drwxr-xr-x 3 root root 4096  9月 16 02:48 2012 templates

0 件のコメント:

コメントを投稿