Pages

Friday, September 7, 2018

Configuring a Chef Environment - Chef Nodes

Share it Please
Now that we configure chef-server and chef-workstation, lets see what needs to be done on the chef-node side.

[root@manja17-I14020 .chef]# knife bootstrap chefclient.nova.com -x root -P redhat -N firstnode --sudo
Node firstnode exists, overwrite it? (Y/N) y
Client firstnode exists, overwrite it? (Y/N) y
Creating new client for firstnode
Creating new node for firstnode
Connecting to chefclient.nova.com
chefclient.nova.com -----> Installing Chef Omnibus (-v 12)
chefclient.nova.com downloading https://omnitruck-direct.chef.io/chef/install.sh
chefclient.nova.com   to file /tmp/install.sh.24962/install.sh
chefclient.nova.com trying wget...
chefclient.nova.com el 7 x86_64
chefclient.nova.com Getting information for chef stable 12 for el...
chefclient.nova.com downloading https://omnitruck-direct.chef.io/stable/chef/metadata?v=12&p=el&pv=7&m=x86_64
chefclient.nova.com   to file /tmp/install.sh.24967/metadata.txt
chefclient.nova.com trying wget...
chefclient.nova.com sha1        949d2c42c0852d564874fde4cb1428a5f52e294b
chefclient.nova.com sha256      9ed78527ff7d85b846a491d240305150a760e57416feb5232e80c2923946863e
chefclient.nova.com url https://packages.chef.io/files/stable/chef/12.22.5/el/7/chef-12.22.5-1.el7.x86_64.rpm
chefclient.nova.com version     12.22.5
chefclient.nova.com downloaded metadata file looks valid...
chefclient.nova.com downloading https://packages.chef.io/files/stable/chef/12.22.5/el/7/chef-12.22.5-1.el7.x86_64.rpm
chefclient.nova.com   to file /tmp/install.sh.24967/chef-12.22.5-1.el7.x86_64.rpm
chefclient.nova.com trying wget...
chefclient.nova.com Comparing checksum with sha256sum...
chefclient.nova.com Installing chef 12
chefclient.nova.com installing with rpm...
chefclient.nova.com warning: /tmp/install.sh.24967/chef-12.22.5-1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY
chefclient.nova.com Preparing...                          ################################# [100%]
chefclient.nova.com Updating / installing...
chefclient.nova.com    1:chef-12.22.5-1.el7               ################################# [100%]
chefclient.nova.com Thank you for installing Chef!
chefclient.nova.com Starting the first Chef Client run...
chefclient.nova.com [2018-09-03T05:43:28-04:00] INFO: Forking chef instance to converge...
chefclient.nova.com Starting Chef Client, version 12.22.5
chefclient.nova.com [2018-09-03T05:43:28-04:00] INFO: *** Chef 12.22.5 ***
chefclient.nova.com [2018-09-03T05:43:28-04:00] INFO: Platform: x86_64-linux
chefclient.nova.com [2018-09-03T05:43:28-04:00] INFO: Chef-client pid: 25057
chefclient.nova.com [2018-09-03T05:43:28-04:00] INFO: The plugin path /etc/chef/ohai/plugins does not exist. Skipping...
chefclient.nova.com [2018-09-03T05:43:33-04:00] INFO: Setting the run_list to [] from CLI options
chefclient.nova.com [2018-09-03T05:43:33-04:00] INFO: Run List is []
chefclient.nova.com [2018-09-03T05:43:33-04:00] INFO: Run List expands to []
chefclient.nova.com [2018-09-03T05:43:33-04:00] INFO: Starting Chef Run for firstnode
chefclient.nova.com [2018-09-03T05:43:33-04:00] INFO: Running start handlers
chefclient.nova.com [2018-09-03T05:43:33-04:00] INFO: Start handlers complete.
chefclient.nova.com [2018-09-03T05:43:33-04:00] INFO: HTTP Request Returned 404 Not Found:
chefclient.nova.com [2018-09-03T05:43:33-04:00] INFO: HTTP Request Returned 404 Not Found:
chefclient.nova.com [2018-09-03T05:43:33-04:00] INFO: Error while reporting run start to Data Collector. URL: https://chefserver.nova.com/organizations/nova/data-collector Exception: 404 -- 404 "Not Found"  (This is normal if you do not have Chef Automate)
chefclient.nova.com resolving cookbooks for run list: []
chefclient.nova.com [2018-09-03T05:43:33-04:00] INFO: Loading cookbooks []
chefclient.nova.com Synchronizing Cookbooks:
chefclient.nova.com Installing Cookbook Gems:
chefclient.nova.com Compiling Cookbooks...
chefclient.nova.com [2018-09-03T05:43:33-04:00] WARN: Node firstnode has an empty run list.
chefclient.nova.com [2018-09-03T05:43:33-04:00] INFO: HTTP Request Returned 404 Not Found:
chefclient.nova.com Converging 0 resources
chefclient.nova.com [2018-09-03T05:43:33-04:00] INFO: Chef Run complete in 0.276968064 seconds
chefclient.nova.com
chefclient.nova.com Running handlers:
chefclient.nova.com [2018-09-03T05:43:33-04:00] INFO: Running report handlers
chefclient.nova.com Running handlers complete
chefclient.nova.com [2018-09-03T05:43:33-04:00] INFO: Report handlers complete
chefclient.nova.com Chef Client finished, 0/0 resources updated in 04 seconds

root is the username, redhat is the password and firstnode is the name of the node that we are giving to that macine in chef.

Run the below command to make sure the nodes are configured,
[root@manja17-I14020 .chef]# knife node list
firstnode

[root@manja17-I14020 .chef]# knife client show firstnode
admin:     false
chef_type: client
name:      firstnode

validator: false





No comments :

Post a Comment