Chef CentOS v11

Материал из noname.com.ua
Версия от 22:01, 16 февраля 2013; Sirmax (обсуждение | вклад) (Новая: =Chef сервер под CentOS 6.3= <B>Все очень призрачно...</B> <BR> За пару месяцев что я работаю с шефом произошли заме...)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к навигацииПерейти к поиску

Chef сервер под CentOS 6.3

Все очень призрачно...
За пару месяцев что я работаю с шефом произошли заметные изменения в процедуре установки. Точнее, новая процедура отличается от старой практически на 100%.


First, navigate to the Chef install page to get the package download URL. Use the form on the “Chef Server” tab to select the appropriate drop-down items for your system.

Install the package from the given URL.

1


rpm -Uvh https://opscode-omnitruck-release.s3.amazonaws.com/el/6/x86_64/chef-server-11.0.4-1.el6.x86_64.rpm

The package just puts the bits on disk (in /opt/chef-server). The next step is to configure the Chef Server and start it.

1


% chef-server-ctl reconfigure

This runs the embedded chef-solo with the included cookbooks, and sets up everything required - Erchef, RabbitMQ, PostgreSQL, etc.

Next, run the Opscode Pedant test suite. This will verify that everything is working.

1


% chef-server-ctl test

Copy the default admin user’s key and the validator key to your local workstation system that you have Chef client installed on, and create a new user for yourself with knife. You’ll need version 11.2.0. The key files on the Chef Server are readable only by root.

1 2


scp root@chef-server:/etc/chef-server/admin.pem . scp root@chef-server:/etc/chef-server/chef-validator.pem .

Use knife configure -i to create an initial ~/.chef/knife.rb and new administrative API user for yourself. Use the FQDN of your newly installed Chef Server, with HTTPS. The validation key needs to be copied over from the Chef Server from /etc/chef-server/chef-validator.pem to ~/.chef to use it for automatically bootstrapping nodes with knife bootstrap.

1


% knife configure -i

The .chef/knife.rb file should look something like this:

1 2 3 4 5 6 7 8


log_level :info log_location STDOUT node_name 'jtimberman' client_key '/home/jtimberman/.chef/jtimberman.pem' validation_client_name 'chef-validator' validation_key '/home/jtimberman/.chef/chef-validator.pem' chef_server_url 'https://chef-server.example.com' syntax_check_cache_path '/home/jtimberman/.chef/syntax_check_cache'

Your Chef Server is now ready to use. Test connectivity as your user with knife:

1 2 3 4 5 6


% knife client list chef-validator chef-webui % knife user list admin jtimberman

In previous versions of Open Source Chef Server, users were API clients. In Chef 11, users are separate entities on the Server.

The chef-server-ctl command is used on the Chef Server system for management. It has built-in help (-h) that will display the various sub-commands.