Skip to content

Instantly share code, notes, and snippets.

@rgodishela
Last active July 11, 2017 06:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rgodishela/f5c0a3306debe15c52c48b02b9bc21c8 to your computer and use it in GitHub Desktop.
Save rgodishela/f5c0a3306debe15c52c48b02b9bc21c8 to your computer and use it in GitHub Desktop.
Learn-Chef
#Install Chef DK 0.18.30
curl https://omnitruck.chef.io/install.sh | sudo bash -s -- -P chefdk -c stable -v 0.18.30
#Install Few software
yum install vim tree git -y
#Run Chef client in localmode
chef-client --local-mode webserver.rb
#Generate cookobooks
chef generate cookbook cookbooks/learn_chef_httpd
#Generate templates
chef generate template cookbooks/learn_chef_httpd index.html
#Run a cookbook in localmode
chef-client --local-mode --runlist 'recipe[learn_chef_httpd]'
Configure Chef server
# Get the Server package
wget https://packages.chef.io/files/stable/chef-server/12.15.8/el/7/chef-server-core-12.15.8-1.el7.x86_64.rpm
#Install the server package
rpm -Uvh chef-server-core-12.15.8-1.el7.x86_64.rpm
# start all of the services:
chef-server-ctl reconfigure
# Create an administrator
chef-server-ctl user-create rgodishela Ramesh Godishela iamrameshjonathan@gmail.com 'PASSWORD' --filename ~/.ssh/admin.pem
#Create an organization
chef-server-ctl org-create saltyhouse 'saltyhouse inc' --association_user rgodishela --filename saltyhouse-validator.pem
# Install chef-manage
chef-server-ctl install chef-manage
# reconfigure the services
chef-server-ctl reconfigure
chef-manage-ctl reconfigure --accept-license
#Chef push jobs
chef-server-ctl install opscode-push-jobs-server
chef-server-ctl reconfigure
opscode-push-jobs-server-ctl reconfigure
#reporting
chef-server-ctl install opscode-reporting
chef-server-ctl reconfigure
opscode-reporting-ctl reconfigure --accept-license
#
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment