Friday, July 31, 2015

Chef Server Overview

Currently we are leaving in digital world and IT Infrastructure is increasing day by day. In such situation it becomes difficult to manage number of servers, especially when we need to install or configure same thing on multiple systems.

                         
    So, chef is going to make your task easy to manage whole infrastructure without much effort. Chef is used as automation framework with which we can install/deploy servers and applications to any VM, cloud and physical servers. 

There were terms which we are going to use more often as we proceed:

  1. chef-client  :  This is the tool which is being installed on all the system managed by chef. It'll perform all task specified by runlist and also fetch any updated contents if any from chef-server.
  2. Workstation : Workstation are the nodes/system configure to author changes and push them to server. We can also bootstrap new nodes and apply changes to those from workstation.
  3. chef-server : The main server(hub/store) :), used to centralize and store all information at one place. Everything i.e. cookbooks, roles and policy setting will be uploaded to chef server from workstation. We also have user friendly Chef management console from where we can manage data bags, attributes, runlists, roles etc.
  4. Nodes : Node is any system where we have to install or configure anything. A node may be physical, virtual or cloud system. These are being configured by chef-client, so we should have chef-client installed on each node need to be managed by chef-server.
  5. Cookbooks : A cookbook is the mail part of whole configuration. It defines the scenarios and contains all information and configuration that needed to support that scenario:
    1. Recipes: which specifies the things(resources)  we can use and execution steps for those resources.
    2. Attribute: special values which can be referred in recipes.
    3. Files : Some static files/data which is needed as it is.
    4. Template: to store dynamic or common data with some changes.
  6. knife : knife is the mail tool used for interaction between local repo on workstation and the chef-server. We push data to chef-server using knife, then it can be used by different number of nodes managed by chef-server. Below are things knife help us to manage:
    1. Nodes
    2. Cookbooks and Recipes
    3. Roles
    4. Envrionments
    5. Data bags 
  7. Bookshelf: This component of chef server is used to store and manage cookbook data - templates, files with version. All cookbook contents will be stored by doing checksum of contents. So, if two different version of cookbook or different cookbook have same file or template, then bookshelf will store that file/template only once.
  8. Message Queues : Search Index fetch messages with the help of below components:
    1. RabbitMQ : used as messaging server for chef-server. All item in search indexes are first added the queue on RabbitMQ messaging server.
    2. chef-expander: used for fetching messages from RabbitMQ queue, then process to required format and forward them to chef-solr for indexing.
    3. chef-solr: contains Apache-solr and then expose its REST api for doing indexing and search.
  9. Nginx : Open Source HTTP Web and Reverse Proxy Server used as front-end load balancer. Nginx serve all requests coming to chef-server.
  10. PostgreSQL : used for storing all repository data for chef-server.



In next article, we will try to create setup with chef server, one node and one workstation.



Integrate Jenkins with Azure Key Vault

Jenkins has been one of the most used CI/CD tools. For every tool which we are using in our daily life, it becomes really challenges when ...