0% found this document useful (0 votes)
3 views5 pages

Dev Ops 2

The document provides instructions for managing GitHub projects, including deleting releases and setting up email notifications. It also details the installation and configuration of Chef, a configuration management tool, including steps for server, node, and workstation installations, as well as writing and uploading cookbooks. Additionally, it includes examples of creating user groups and managing users within Chef recipes.

Uploaded by

Vo Tinh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views5 pages

Dev Ops 2

The document provides instructions for managing GitHub projects, including deleting releases and setting up email notifications. It also details the installation and configuration of Chef, a configuration management tool, including steps for server, node, and workstation installations, as well as writing and uploading cookbooks. Additionally, it includes examples of creating user groups and managing users within Chef recipes.

Uploaded by

Vo Tinh
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

>> git push –u myproject --delete versionnumber = Delete the release in the git

hub
Email Notification

>> Whatever happens in the github will be notified through email

>> Steps to activate email notification

>> Login into Git Hub - myproject – Settings – Notifications – Add - Email
Address
Backup and Restore
>> For taking the backup of the files of the git bucket .It is a hidden folder.
>> ls –a (View hidden files)
>> open the .gitbucket fil
>> There we can see the files which were pushed

CHEF:-
Chef is a company and the name of a configuration management tool written
in Ruby and Erlang. It uses a pure-Ruby, domain-specific language (DSL) for
writing system configuration "recipes". Chef is used to streamline the task of
configuring and maintaining a company's servers.
The user writes "recipes" that describe how Chef manages server applications
and utilities (such as Apache HTTP Server, MySQL, or Hadoop) and how they are
to be configured. These recipes (which can be grouped together as a
"cookbook" for easier management) describe a series of resources that should
be in a particular state: packages that should be installed, services that should
be running, or files that should be written. These various resources can be
configured to specific versions of software to run and can ensure that software
is installed in the correct order based on dependencies.
Chef can run in client/server mode, or in a standalone configuration named
"chef-solo". In client/server mode, the Chef client sends various attributes
about the node to the Chef server. The server uses Elasticsearch to index these
attributes and provides an API for clients to query this information. Chef recipes
can query these attributes and use the resulting data to help configure the
node.

Chef-server installation:-
>> hostname -f
>> cd ~
wget [Link]
[Link]/ubuntu/12.04/x86_64/chef-server_11.0.10-
[Link].12.04_amd64.deb
>> sudo dpkg -i chef-server*
>> sudo chef-server-ctl reconfigure
>> [Link]
>> Default Username: admin
>> Default Password: p@ssw0rd1
>> mkdir -p ~/chef-repo/.chef
>> [Link]
>> #chef-manage-ctl reconfigure
>> #chef-server-ctl user-create student student student "student@[Link]"
"redhat" -f [Link]
>> #chef-server-ctl org-create myorg "pivotalsoft" -a student -f myorg-
[Link]
>> #chef-server-ctl restart (for restart)
>> #chef-server-ctl start (for start)
>> #chef-server-ctl stop (for stop)
chef node installation:-
>> updat ip & hostadd
>> #dpkg -i chef-client.....
>> mkdir -p /etc/chef
copy both .pem files
>> cd /etc/chef
>> vi [Link]
log_level :info
log_location STDOUT
chef_server_url '[Link]
validation_client_name 'myorg-validator'
validation_key '/etc/chef/[Link]'
client_key '/etc/chef/[Link]'
trusted_certs_dir '/etc/chef/trusted_certs'

>> knife ssl fetch -s [Link]


>> knife ssl check -s [Link]
>> useradd rishi
>> passwd rishi
>> usermod -aG sudo rishi
>> apt-get install ssh
>> ssh-keygen
Chef workstation installation:-
>> update ip and host address
>> dpkg -i chef-work.......
>> cd /root/chef-repo/.chef
copy both .pem files into .chef folder
>> ls
>> vi [Link]
log_level :info
log_location STDOUT
node_name 'student'
client_key '/root/chef-repo/.chef/[Link]'
validation_client_name 'myorg-validator'
validation_key '/root/chef-repo/.chef/[Link]'
chef_server_url '[Link]
cookbook_path ['/root/chef-repo/cookbooks']
>> knife ssl fetch / knife ssl fetch -s [Link]
>> knife ssl check / knfie ssl check -s [Link]
>> knife bootstrap [Link] --ssh-user rishi --sudo --identity-file
~/.ssh/id_rsa --node-name [Link]
#knife node list
Chef cookbooks:-
Writing cookbooks/recipes
sample cookbooks:-
>> chef generate cookbook sample_file
>> vi /chef/cookbook/sample_file/recipes/[Link]
file "/tmp/[Link]" do
owner "root"
group "root"
mode "0644"
content "haiii this is test file"
action :create
end
>> knife cookbook upload sample_file
>> knife node run_list add [Link] sample_file
>> go to chefnode add type "chef-client"
Creates the sysadmin group and users:-
users_manage 'sysadmin' do
group_id 2300
action [:create]
end

Creates the testgroup group, and users


users_manage 'testgroup' do
group_id 3000
action [:create]
data_bag 'test_home_dir'
end

Creates the nfsgroup group, and users


users_manage 'nfsgroup' do
group_id 4000
action [:create]
data_bag 'test_home_dir'
manage_nfs_home_dirs false
end

You might also like