CHEF SERVER

chef-server-ctl uninstall

opcode-analytics-ctl uninstall

 

Download the package from https://downloads.chef.io/chef-server/.

rpm -Uvh chef-server-core-12.11.1-1.el7.x86_64.rpm

chef-server-ctl reconfigure

chef-server-ctl user-create hallapa paul halla p.h@email.com ‘admin123’ –filename /home/hallapa/ph.pem
chef-server-ctl org-create phh ‘phh_at_Cashflows’ –association_user hallapa –filename /home/hallapa/phh_validator.pem

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

chef-server-ctl reconfigure

chef-manage-ctl reconfigure
Use Chef push jobs to run jobs, an action or a command to be executed, against nodes independantly of a chef-client run.
chef-server-ctl install opscode-push-jobs-server
chef-server-ctl reconfigure

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.

chef-server-ctl install opscode-reporting
chef-server-ctl reconfigure

opscode-reporting-ctl reconfigure

chef-server-ctl user-list


https:///login

 

$ sudo su – root

# cd ~

# curl -L https://www.opscode.com/chef/install.sh | bash

# chef-solo -v

# wget http://github.com/opscode/chef-repo/tarball/master

# tar -zxf master
# mv chef-chef-repo* chef-repo
# rm master
# cd chef-repo
# mkdir .chef
# echo “cookbook_path [ ‘/root/chef-repo/cookbooks’ ] “> .chef/knife.rb
# chef generate cookbook phpapp

 

cd ~/chef-repo/cookbooks
knife cookbook site download apache2
tar zxf apache2*
rm apache2*.tar.gz
knife cookbook site download apt etc
knife cookbook site download iptables etc
knife cookbook site download logrotate etc
knife cookbook site download pacman etc
knife cookbook site download compat_resource etc
TO INSTALL APACHE2 USING MY COOKBOOK
cd phpapp
vi metadata.rb # and addthe line
depends “apache2”
vi recipes/default.rb # add the lines
include_recipe “apache2”
apache_site “default” do
enable true
end
cd ..
create solo.rb
vi solo.rb
file_cache_path “/root/chef-solo”
cookbook_path “/root/chef-repo/cookbooks”
create web.json
vi web.json
{
“run_list”: [ “recipe[apt]”, “recipe[phpapp]” ]
}
chef-solo -c solo.rb -j web.json
APACHE2 NOW INSTALLED