Total Pageviews

Wednesday, 26 April 2017

Chef Workstation, Server and Node -Installtion and Configuration


ominvirldcT001 - Server

ominvirldctest002 - Node

ominvirldctest003-  Workstation




Chef Woerkstation Installation

==============================

[root@ominvirldctest003 var]# rpm -ivh chefdk-1.3.43-1.el7.x86_64.rpm

warning: chefdk-1.3.43-1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY

Preparing...                          ################################# [100%]

Updating / installing...

   1:chefdk-1.3.43-1.el7              ################################# [100%]

Thank you for installing Chef Development Kit!

[root@ominvirldctest003 var]#


1.Follow the steps in the installer and install the Chef development kit to your machine. The Chef development kit is installed to /opt/chefdk/ on UNIX and Linux systems.


2.When finished, open a command window and enter the following:

$ chef verify


3. Create a .chef directory to store admin.pem and validator.pem key.

[root@ominvirldctest003 bin]# mkdir -p /root/chef-repo/.chef

===================================================================

===================================================================

===================================================================

Chef Server Installation

==========================



[root@ip-10-38-18-11 ec2-user]# wget https://packages.chef.io/files/stable/chef-server/12.14.0/el/7/chef-server-core-12.14.0-1.el7.x86_64.rpm

--2017-04-23 19:46:40--  https://packages.chef.io/files/stable/chef-server/11.1.6/el/6/chef-server-core-12.14.0-1.el7.x86_64.rpm

Resolving packages.chef.io (packages.chef.io)... 151.101.60.65

Connecting to packages.chef.io (packages.chef.io)|151.101.60.65|:443... connected.

HTTP request sent, awaiting response... 200 OK

Length: 277963090 (265M) [application/x-rpm]

Saving to: ‘chef-server-core-12.14.0-1.el7.x86_64.rpm’


100%[=========================================================================================================>] 277,963,090 27.4MB/s   in 8.6s


2017-04-23 19:47:03 (30.8 MB/s) - ‘chef-server-core-12.14.0-1.el7.x86_64.rpm’ saved [277963090/277963090]


[root@ip-10-38-18-11 ec2-user]#


[root@ip-10-38-18-11 ec2-user]# rpm -ivh chef-server-core-12.14.0-1.el7.x86_64.rpm

warning: chef-server-core-12.14.0-1.el7.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 83ef826a: NOKEY

Preparing...                          ################################# [100%]

Updating / installing...

   1:chef-server-11.1.6-1.el6         ################################# [100%]

Thank you for installing Chef Server!


The next step in the install process is to run:


sudo chef-server-ctl reconfigure



==========================

Run the following to start all of the services:

[root@ip-10-38-18-10 ~]# chef-server-ctl reconfigure


============================

[root@ip-10-38-18-10 ~]# chef-server-ctl status

run: bookshelf: (pid 15186) 1998s; run: log: (pid 15147) 2000s

run: oc_bifrost: (pid 14307) 2025s; run: log: (pid 14309) 2025s

run: oc_id: (pid 14423) 2014s; run: log: (pid 14425) 2014s

run: opscode-erchef: (pid 15400) 1989s; run: log: (pid 15399) 1989s

run: opscode-expander: (pid 14912) 2006s; run: log: (pid 15051) 2004s

run: opscode-solr4: (pid 9036) 45s; run: log: (pid 14680) 2008s

run: postgresql: (pid 13796) 2040s; run: log: (pid 13818) 2039s

run: rabbitmq: (pid 9184) 1s; run: log: (pid 10329) 2082s



===========================

Run the following command to create an administrator:

#chef-server-ctl user-create USER_NAME FIRST_NAME LAST_NAME EMAIL 'PASSWORD' --filename FILE_NAME

[root@ip-10-38-18-10 ~]# chef-server-ctl user-create barunkumar9 barun kumar9 barun.kumar9@rb.com 'qwerty' --filename /etc/chef/admin.pem

============================

Run the following command to create an organization:

$ chef-server-ctl org-create short_name 'full_organization_name' --association_user user_name --filename ORGANIZATION-validator.pem


--------------------------------------------

The name must begin with a lower-case letter or digit, may only contain lower-case letters, digits, hyphens, and underscores, and must be between 1 and 255 characters. For example: 4thcoffee.


The full name must begin with a non-white space character and must be between 1 and 1023 characters. For example: 'Fourth Coffee, Inc.'.


The --association_user option will associate the user_name with the admins security group on the Chef server.


An RSA private key is generated automatically. This is the chef-validator key and should be saved to a safe location. The --filename option will save the RSA private key to the specified absolute path.


[root@ip-10-38-18-214 chef]# chef-server-ctl org-create cloudit4tech 'CloudITTechnology.' --association_user barunkumar9 --filename /etc/chef/cloudITtech-validator.pem


=====================

Use Chef management console to manage data bags, attributes, run-lists, roles, environments, and cookbooks from a web user interface.

On the Chef server, run:

4   chef-server-ctl install chef-manage

5  chef-server-ctl reconfigure

6.[root@ominvirldcT001 ~]# chef-manage-ctl reconfigure

    To use this software, you must agree to the terms of the software license agreement.

Press any key to continue.

Type 'yes' to accept the software license agreement, or anything else to cancel.

yes

=============================

Use Chef push jobs to run jobs—an action or a command to be executed—against nodes independently of a chef-client run.

On the Chef server, run:

[root@ominvirldcT001 ~]# chef-server-ctl install opscode-push-jobs-server

then:

[root@ominvirldcT001 ~]# chef-server-ctl reconfigure

and then:

[root@ominvirldcT001 ~]# opscode-push-jobs-server-ctl reconfigure


=============================


Use Reporting to keep track of what happens during every chef-client runs across all of the infrastructure being managed by Chef. Run Reporting with Chef management console to view reports from a web user interface.

On the Chef server, run:


[root@ominvirldcT001 ~]# chef-server-ctl install opscode-reporting

then:

[root@ominvirldcT001 ~]# chef-server-ctl reconfigure

and then:

[root@ominvirldcT001 ~]# opscode-reporting-ctl reconfigure


=============================

Update config for purchased nodes¶


When using more than 25 nodes, a configuration change to your Chef server needs to be made in order for your Chef server to be properly configured and recognize your purchased licenses. You will need to edit to your chef-server.rb file by following the process below:


1.On your Chef server, if the chef-server.rb file does not exist, create it.

sudo mkdir /etc/opscode && sudo touch /etc/opscode/chef-server.rb

2.Open up the newly created chef-server.rb file in your favorite text editor.

sudo vi /etc/opscode/chef-server.rb

3.Paste or add the following text. Please note the placement of the single quotation (‘) marks.

license['nodes'] = N where N is the number of licensed nodes you have purchased

4.Save the file. Because we are using the vi editor, you can save your changes in vi with the following command:

:wq

1.Run chef-server-ctl reconfigure for the changes to be picked up by your Chef server.

sudo chef-server-ctl reconfigure




Connection to ominvirldctest003 closed.

[root@ominvirldcT001 ~]# cd /etc/ch

chef/        chef-manage/ chkconfig.d/

[root@ominvirldcT001 ~]# cd /etc/chef

[root@ominvirldcT001 chef]# ll

total 8

-rw-r--r-- 1 root root 1678 Apr 26 16:57 admin.pem

-rw-r--r-- 1 root root 1678 Apr 26 16:57 cloudITtech-validator.pem

[root@ominvirldcT001 chef]# scp -r * ominvirldctest003:/root/chef-repo/.chef

root@ominvirldctest003's password:

admin.pem                                                                                                                             100% 1678     1.6KB/s   00:00

cloudITtech-validator.pem                                                                                                             100% 1678     1.6KB/s   00:00

[root@ominvirldcT001 chef]#



=========

Login to Chef Server GUI https://10.39.22.246/login


========================
=================================
=================================





If you want to dig more please refer this link. https://docs.chef.io/install_dk.html







   


No comments:

Post a Comment