All about learnings of chef
- Make a workstation
- chef generate cookbook lamp_stack
- cd lamp_stack
- chef generate recipe lamp_recipe
- cd ..
- vi apache-cookbook/recipes/apache-recipe.rb
---- Added code to run ----
- chef exec ruby -c apache-cookbook/recipes/apache-recipe.rb
- sudo chef-client -zr "recipe[apache-cookbook::server-recipe]"
Chef-attribute It is like props in react.js.
Priority of Chef Attribute
- default
- force-default
- normal
- override
- force-override
- automatic
Error: Connection time out Connection can't be established.
Language used to script : Ruby for writing configuration
Hit with the following command sudo knife bootstrap 172.31.2.183 -U ec2-user --sudo -i node1.pem -N node1
Chef is broken down into three main components: the workstation, the server, and the nodes.
The workstation is the system where the admin sits. The system creates the code for configuring and managing the infrastructure, and that code (which is written in Ruby) is called a recipe. Multiple recipes in a collection are called cookbooks. The cookbooks are uploaded to the server by means of the Knife command line.
The Chef server is accessed primarily by nodes that are under management by Chef, as the chef-client runs occur. It is also accessed by individuals who maintain cookbooks and policy that is stored on the Chef server, typically from a workstation. And also by individual users with credentials to Chef server components, such as the Chef management console.
Nginx is an open-source HTTP and reverse proxy server that is used as the front-end load balancer for the Chef server. All requests to the Chef server API are routed through Nginx.
- Chef supports multiple platforms like AIX, RHEL/CentOS, FreeBSD, OS X, Solaris, Microsoft Windows and Ubuntu. Additional client platforms include Arch Linux, Debian and Fedora.
- Chef can be integrated with cloud-based platforms such as Internap, Amazon EC2, Google Cloud Platform, OpenStack, SoftLayer, Microsoft Azure and Rackspace to automatically provision and configure new machines.
- Accelerating software delivery, when your infrastructure is automated all the software requirements like testing, creating new environments for software deployments etc. becomes faster.