Chef CentOS v11: различия между версиями

Материал из noname.com.ua
Перейти к навигацииПерейти к поиску
(Новая: =Chef сервер под CentOS 6.3= <B>Все очень призрачно...</B> <BR> За пару месяцев что я работаю с шефом произошли заме...)
 
Строка 5: Строка 5:
 
<BR>
 
<BR>
   
  +
Я делаю установку внутри линукс-контейнера, потому я допускаю что есть отличия от установки на "нормальную" систему.
   
  +
==Скачать==
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
 
 
 
 
  +
Я брал здесь:
 
  +
<PRE>
 
rpm -Uvh https://opscode-omnitruck-release.s3.amazonaws.com/el/6/x86_64/chef-server-11.0.4-1.el6.x86_64.rpm
 
rpm -Uvh https://opscode-omnitruck-release.s3.amazonaws.com/el/6/x86_64/chef-server-11.0.4-1.el6.x86_64.rpm
  +
</PRE>
  +
Но вообще-то узнать последнюю версию можно тут: http://www.opscode.com/chef/install/
  +
<BR>
  +
Мне не очень нравится идея комбайна - эта РПМка тянет внутри себя кучу всего, включая Postgress, RabbitMQ и т.д.
  +
Управляется все через новый механизм initctl
  +
<BR>
  +
Немного забегая вперед, вот мой вывод:
  +
<PRE>
  +
initctl list
  +
rc stop/waiting
  +
lxc-sysinit stop/waiting
  +
tty (/dev/tty3) start/running, process 452
  +
tty (/dev/tty2) start/running, process 450
  +
tty (/dev/tty1) start/running, process 448
  +
tty (console) start/running, process 10
  +
tty (/dev/tty4) start/running, process 454
  +
opscode-runsvdir start/running, process 699
  +
plymouth-shutdown stop/waiting
  +
control-alt-delete stop/waiting
  +
rcS-emergency stop/waiting
  +
kexec-disable stop/waiting
  +
quit-plymouth stop/waiting
  +
rcS stop/waiting
  +
prefdm stop/waiting
  +
init-system-dbus stop/waiting
  +
splash-manager stop/waiting
  +
start-ttys stop/waiting
  +
rcS-sulogin stop/waiting
  +
serial stop/waiting
  +
</PRE>
   
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
 
% chef-server-ctl reconfigure

Версия 23:09, 16 февраля 2013

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

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

Я делаю установку внутри линукс-контейнера, потому я допускаю что есть отличия от установки на "нормальную" систему.

Скачать

Я брал здесь:

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

Но вообще-то узнать последнюю версию можно тут: http://www.opscode.com/chef/install/
Мне не очень нравится идея комбайна - эта РПМка тянет внутри себя кучу всего, включая Postgress, RabbitMQ и т.д. Управляется все через новый механизм initctl
Немного забегая вперед, вот мой вывод:

initctl list
rc stop/waiting
lxc-sysinit stop/waiting
tty (/dev/tty3) start/running, process 452
tty (/dev/tty2) start/running, process 450
tty (/dev/tty1) start/running, process 448
tty (console) start/running, process 10
tty (/dev/tty4) start/running, process 454
opscode-runsvdir start/running, process 699
plymouth-shutdown stop/waiting
control-alt-delete stop/waiting
rcS-emergency stop/waiting
kexec-disable stop/waiting
quit-plymouth stop/waiting
rcS stop/waiting
prefdm stop/waiting
init-system-dbus stop/waiting
splash-manager stop/waiting
start-ttys stop/waiting
rcS-sulogin stop/waiting
serial stop/waiting



Конфигурация

% 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.