Wednesday, August 2, 2017

Knife bootstrap story (when you bootstrap on the node)

knife commands:

What happens during a knife bootstrap?

knife  bootstrap   <IP>  / <FQDN>   --sudo  -x chef    -P   chef   -N  “mynodename”

FQDN - FULLY QUALIFIED DOMAIN NAME




# Essentials  (example)

1load balancer (and the elb rely the traffic to the two nodes).  (node2)
2web nodes (it contains the apache and web producing contents). (node1 and node3).

chef server stores the information in the postgre SQL database.
we use the SOLR,Where we can search the index and get what we required in no time.

Anytime, u send any information to the server.there is may be  5s to 10s of the delay between the searching the content.(there is a little bit of time between them).

what happened during subsequent chef-client runs?
Chef and all of its dependencies installed.
Installation  includes 
The Ruby language  - used by chef
ohai   -  System profiler
and more

we packages everything in to called omnibus installer(omnibus installer is nothing but the entire ruby language).
(once you install omnibus,noneed to worry about the ruby dependencies).

the chefdk is the omni bus installer +  test kitchen and these are the tools.


what we have to see on the nodes?

After bootstrapping we will see the following on our node:

go to the path :  cd  /etc/chef
                                 client.pem
                                  client.rb
                                  first-boot.json
                                   ohai

(the above following keys, will help us to communicate with the chef-server).

we have one more path:

        cd   /var/chef     

we have the backup and cache directory.


The backup directory contains number of backup files,
we keep backups inside of the directory.
(whatever we installed, it gets the backup of the file, with the timestamp).

the another directory is the cache directory:

all the cookbooks that are stored after the sync process.

Another important directory is (where we install all our chef tools).

cd /opt /chefdk

(where you can find all of the tools installed with the help of chefdk).

it has the following inside the directory:
bin
embedded
version-manifest.json
version-manifest.txt

inside the  /bin directory:
(it contains the number of tools used for running).
we have the following:
berks
chef
chef-apply
chef-client
chef-service-manager
chef-shell
chef-solo
chef-vault
chef-windows-service
foodcritic
kitchen
knife
ohai
rubocop 

inside the embedded directory we have the  /bin directory.

Inside this,we have the lot of tools, which helps us to maintain all the toolset on any platform.
(we have the ruby projects, chef projects and other operating system related information inside this directory).


No comments:

Post a Comment