Create an Account in Chef Server and Attach Workstation to Chef Server
In this article,we will see Create an Account in Chef Server and Attach Workstation to Chef Server.
Chef Server
chef server is going to be a hub for the code (cookbooks).
Nodes pull code from chef server.
As the center of operations, the Chef server stores, manages, and provides configuration data to all other Chef components.
The Chef server acts as a hub for configuration data.
The Chef server stores cookbooks, the policies that are applied to nodes, and metadata that describes each registered node that is being managed by Chef. Nodes use the Chef client to ask the Chef server for configuration details, such as recipes, templates, and file distributions.
Steps to follow
Create an Account in chef server
- Go to chef server official website.
- Provide Required Details.
- Verify your Email.
- Create New Organization.
Establish communication between Workstation and Chef Server
- Download Starter Kit.
- Unzip Starter Kit.
- Copy chef-repo to your Workstation”Chef-Workstation” through WinScp.
- Verify the directory “chef-repo” in your workstation “Chef-Workstation”.
- Verify the connection between workstation and chef server (be inside chef-repo).
Create an Account in chef server
Go to chef server official website
We need to go chef server official website by using below link.
Click on click here to get started to create a new account.
Provide Required Details
Provide required details and click on Get started.
Verify your Email
Go to your mail and click confirmation link.
Provide password and click on Create User.
Create New Organization
Click on Create New Organization.
Specify Full Name and Short Name for you organization then click on Create Organization.
We can see the your organization “ramesh-chef-ktexperts” which was created earlier.
Establish communication between Workstation and Chef Server
Download Starter Kit
Go to Administration and select your organization “ramesh-chef-ktexperts”
Go to Starter Kit and click on Download Starter Kit.
Click on Proceed.
The starter kit has been downloaded successfully.
Unzip Starter Kit
After unzip,we can see onde folder with name of chef-repo.
Go inside chef-repo,
we can see there folders .chef,cookbooks and roles.
we can 2 files inside the .chef folder.
Once open the PEM file”ramesh-ktexperts.pem” ,we can find one URL regarding to chef server.
Copy chef-repo to your Workstation”Chef-Workstation” through WinScp
Select your workstation and click on connect.
Copy username and DNS of your workstation.
Open WinScp,paste the username and DNS in the Hostname field then click on Advanced.
Go to Authentication,upload your workstation ppk file and click on ok.
Click on Login.
Select chef-repo and drag to your workstation (/home/ec2-user).
Verify the directory “chef-repo” in your workstation “Chef-Workstation”
Connect to your workstation “Chef-Workstation” through Putty
Open workstation Linux Terminal
1 2 3 4 5 6 7 8 9 |
Using username "ec2-user". Authenticating with public key "imported-openssh-key" Last login: Fri Dec 27 09:02:29 2019 from 124.123.103.5 __| __|_ ) _| ( / Amazon Linux 2 AMI ___|\___|___| https://aws.amazon.com/amazon-linux-2/ |
Switch to root user
1 2 3 |
[ec2-user@ip-172-31-42-243 ~]$ sudo su [root@ip-172-31-42-243 ec2-user]# |
To see the list of files/directories
we can see the chef-repo directory which was copied from local machine(windows) through WinScp Tool.
1 2 |
[root@ip-172-31-42-243 ec2-user]# ls chef-repo cookbooks nodes |
Verify the connection between workstation and chef server
Go inside chef-repo
1 2 |
[root@ip-172-31-42-243 ec2-user]# cd chef-repo/ [root@ip-172-31-42-243 chef-repo]# |
Run below command to verify the connection
The communication has been established successfully.
1 2 3 |
[root@ip-172-31-42-243 chef-repo]# knife ssl check Connecting to host api.chef.io:443 Successfully verified certificates from `api.chef.io' |
Thank you for giving your valuable time to read the above information. Please click here to subscribe for further updates
KTEXPERTS is always active on below social media platforms.
Facebook : https://www.facebook.com/ktexperts/
LinkedIn : https://www.linkedin.com/company/ktexperts/
Twitter : https://twitter.com/ktexpertsadmin
YouTube : https://www.youtube.com/c/ktexperts
Instagram : https://www.instagram.com/knowledgesharingplatform