So today we will learn how to set up our battleground or chef environment. After finishing this tutorial you will end up
- Configuring fully functional Chef server
- Configuring Your workstation
- Adding test nodes to your Chef environment.
- Basic experience with chef and knife tools
So lets hit the track and spin up the environment.
Below is the briefing about the environment that I am going to configure here.
|Workstation||Ubuntu 16.4 .1.5 GB RAM||workstation.devops.com|
The Chef server is the central location which acts as an artifact repository or “hub” that stores cookbooks, cookbook versions, facts about the node, data bags and metadata information about nodes.
All metadata of a node, when it is registered with Chef server, is stored on the Chef server.The metadata is populated and sent to the server with chef-client, which is an application that runs on the node. (Covered in later lessons.)
Configuration enforcement is not handled by the Chef server, instead, the desired state configuration is enforced when chef-client runs and a “convergence” happens, allowing for easy scalability.
Chef Server Components
Clients: Nodes and workstations which access the Chef server for either configuration enforcement or uploading and the management of cookbooks and other Chef data.
Load balancer: All requests to the Chef server are routed through the Nginx front-end load balancer.
Chef manage : Chef manage is the GUI-/Rails-based web application for managing Chef server.
Chef Server: The server engine which powers Chef server.
Bookshelf: Used to store cookbook content such as files, recipes, templates, etc.
Message Queues: Are used (using RabbitMQ) to send data to the search index and data stores.(Search indexes covered in later tutorials.)
PostgreSQL: The data storage repository for Chef server.
Step1: Download chef server RPM
Step 2: Install the rpm
rpm -Uvh chef-server-core-12.16.14-1.el7.x86_64.rpm
Step3: Run Chef reconfigure using command
This will reconfigure our chef server
Step 4: Create a user to connect with the chef server
chef-server-ctl user-create <username> <firstname> <lastname> <emailid> ‘<password>’ –filename <file_to_store_rsa>
Step 5: Create an organization and associate user with same
chef-server-ctl org-create devops ‘devops Batch’ –association_user akash –filename devops-validator.pem
Step 6: Bring up chef GUI
chef-server-ctl install chef-manage
Step 7: Run chef-server-ctl reconfigure again
Step 8: Reconfigure chef manage [press enter when asked to accept license, then press q and write yes and hit enter]
Step9: Once chef manage is installed, access the chef console on your browser. If not accessible make sure firewall is turned off.
Step 10: Login with the same username and password that we created in step 4, if some error occurs during login, refresh the page.
will be published tomorrow…