Archiwa kategorii: Chef

Chef – instalacja klienta i dodanie go przez użycie knife

Instalacja klienta jest prosta: wykonujemy jeden skrypt, który ściągnie i zainstaluje wszystko:

[root@server1 ~]# curl -L https://www.opscode.com/chef/install.sh | sudo bash
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 19602  100 19602    0     0  16096      0  0:00:01  0:00:01 --:--:-- 16106
el 6 i686
Getting information for chef stable  for el...
downloading https://omnitruck-direct.chef.io/stable/chef/metadata?v=&p=el&pv=6&m=i686
  to file /tmp/install.sh.1537/metadata.txt
trying wget...
sha1    d85315adde9ff0889358ea96341a1e38aabe4e36
sha256  db1dd569f3f99f56d2446b30f5f75b2bf6b7d786f93e6b3be60b14c297639acc
url     https://packages.chef.io/stable/el/6/chef-12.11.18-1.el6.i386.rpm
version 12.11.18
downloaded metadata file looks valid...
downloading https://packages.chef.io/stable/el/6/chef-12.11.18-1.el6.i386.rpm
  to file /tmp/install.sh.1537/chef-12.11.18-1.el6.i386.rpm
trying wget...
Comparing checksum with sha256sum...

WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING

You are installing an omnibus package without a version pin.  If you are installing
on production servers via an automated process this is DANGEROUS and you will
be upgraded without warning on new releases, even to new major releases.
Letting the version float is only appropriate in desktop, test, development or
CI/CD environments.

WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING

Installing chef
installing with rpm...
ostrzeżenie: /tmp/install.sh.1537/chef-12.11.18-1.el6.i386.rpm: Nagłówek V4 DSA/SHA1 Signature, identyfikator klucza 83ef826a: NOKEY
Przygotowywanie…                    ################################# [100%]
Aktualizowanie/instalowanie…
   1:chef-12.11.18-1.el6              ################################# [100%]
Thank you for installing Chef!

Gdy mamy skonfigurowany knife, dodanie kolejnego klienta nie stanowi problemu:

[root@server1 ~]# knife bootstrap server1.localnet -N sevrrver1
Creating new client for server1
Creating new node for server1
Connecting to server1.localnet
root@server1.localnet's password: 
server1.localnet -----> Existing Chef installation detected
server1.localnet Starting the first Chef Client run...
server1.localnet Starting Chef Client, version 12.11.18
server1.localnet resolving cookbooks for run list: []
server1.localnet Synchronizing Cookbooks:
server1.localnet Installing Cookbook Gems:
server1.localnet Compiling Cookbooks...
server1.localnet [2016-06-10T21:20:44+02:00] WARN: Node server1 has an empty run list.
server1.localnet Converging 0 resources
server1.localnet 
server1.localnet Running handlers:
server1.localnet Running handlers complete
server1.localnet Chef Client finished, 0/0 resources updated in 08 seconds