Professional Documents
Culture Documents
Chef Automation
Chef Automation
What is DevOps
Why DevOps
About Chef
Chef Architecture
Classroom Environment
Chef Recipe
Chef Cookbook
Manage a Node
Resource Notifications
Chef Data Bags
Chef Exercises with AWS & Azure
What is DevOps?
“DevOpsis “DevOpsis
development treating your
and operations infrastructure
collaboration” as code”
“DevOps “DevOps
is using is feature
automation” switches”
“Kanban
“DevOps for Ops?”
is small
deployments”
Welcome to the 21st century!
CALMS
• Culture
• Automation
• Lean
• Measurement
• Sharing
HIGH TRUST
PERFORMANCE
• Unified mission
• Aligned incentives
• Little fear/failure/blame
• High quality of work life
IT capabilities = strategic
assets, not cost centers
• Projects, features and
work flow through fast
cycles times
• Systems are “anti-
fragile”
• IT processes &
capabilities are aligned
with overarching
organizational needs
Automated Mature
Deployment pipeline
• Technical phases of
projects supported by
common tools and
automation processes
• Collaboration replaces
handoffs
• IT infrastructure is agile
Continuous delivery of
software and IT value
• Features, projects and IT
work follow a regular,
iterative flow
• Cycle time is short
• Workflow favors small
frequent changes
Continuous Learning
& improvement
• Disciplined feedback
loops quickly travel back
upstream for inclusion
• Tools for monitoring,
measurement and
alerting implemented &
effective.
• Shared knowledge
repositories.
Concept / ideation
Value
Work
Delay
Cultural
Issues
Issues
OI’s
Managem
ent & Quality
Control Issues
Issues
Integration
Collaboration
Communication
The pace of change in our economy is
accelerating remorselessly
San Francisco taxi trips down 65% over past 15 months
Uber 3X Taxi Revenues in 5 Years
“There's a new trend called "devops" that is sweeping
the enterprise IT world and its become a life-or-death career
situation for many IT departments…
Like the manufacturers were in the 1970s and 1980s were
fighting for their lives,
today's IT departments are going to fight for
their survival.”
Configuration Management
Continuous Integration
Automated Testing
Metrics
Collaboration
Making smart use of smart people
Why DevOps?
DevOps – Business Agility
Time-to-Market
Acceleration
Business Experimentation
Agility Rapid Prototyping
Flexible Partnering
Effective Support
DevOps – Technical Innovation
Polyglot Enablement
DevOps Automation
Technical API Support
Innovation Micro services Architecture
Application Scaling and
Elasticity
PaaS
DevOps – Technical Innovation
Docker Foundation
Language and Stack Neutral
Business
Agility
DevOps
Technical Infrastructure
Innovation Choice
DevOps – Culture is Yoghurt
Culture is an output, not
an input
Common organization
with a nearby boss
Shared metrics foundation
of collaboration
High-level sponsorship
DevOps – Don’t Build New Legacy
Separate Organization
Accelerate Adoption of
New Technologies
Exploration via New Skills
and Employees
Integration Process
Defined
DevOps – Benefits
IT Domain Before DevOps After DevOps
Integration of
Innovation Lab with Limited Structured
mainstream IT
Attractiveness to new
Minimal Significant
developers
Efficiency - Faster time
to market
Predictability - Lower
failure rate of new
releases
Reproducibility –
Version everything
Maintainability - Faster
time to recovery in the
event of a new release
crashing or otherwise
disabling the current
system
package 'httpd'
service 'httpd' do
action [:enable, :start]
end
template '/var/www/html/index.html' do
source 'index.html.erb'
end
service 'iptables' do
action :stop
end
Now, your “index.html.erb” file should look
like below:
<html>
<body>
<h1>hello world</h1>
</body>
</html>
Now, we will run the cookbook using below
command:
mkdir data_bags/admins
A data bag item can be created manually in the
same way as the data bag, but by also specifying
the file name for the data bag item (this example
is using vi, a visual editor for UNIX):
data_bags/admins/charlie.json
data_bags/admins/charlie.json
{
"id": "charlie",
"shell": "/bin/zsh",
"comment": "Crazy Charlie"
}
data_bags/admins/stuart.json
{
"id": "stuart",
"shell": "/bin/zsh",
"comment": "smart stuart"
}
As long as a file is in the correct directory
structure, knife will be able to find the data
bag and data bag item with only the name of
the data bag and data bag item. For example:
admins.each do |login|
admin = data_bag_item('admins', login)
home = "/home/#{login}"
user(login) do
shell admin['shell']
comment admin['comment']
home home
supports :manage_home => true
end
end
Chef(Knife) Exercises
Exercise to create EC2 instance using Chef.
You must have AWS account to create minimum
on EC2 instance.
Execute below command on new VM:
https://manage.windowsazure.com/PublishSettings/index?Client=&SchemaVers
ion=&DisplayTenantSelector=true
Add following lines in .chef/knife.rb
knife[:azure_subscription_id] = "e1fe473-e94b-45d6-88d7-ae17e7bc5b4d"
knife[:azure_api_host_name] = "https://management.core.windows.net"
knife[:azure_mgmt_cert] = "management-certificate.pem"
#after executing the above command it will ask for password.Just hit enter without
typing anything.
Copy the created pem file to .chef folder and add the below
given credentials to the knife.rb file.
knife azure server list
knife azure server create
--azure-dns-name 'knifeazuredemo'
--azure-source-image
"a699494373c04fc0bc8f2bb1389d6106__Windows-Server-
2012-Datacenter-201306.01-en.us-127GB.vhd"
--winrm-password 'p@ssw0rd!'
--azure-service-location "East Asia"
Contact @ http://www.atgensoft.com/
Linkedin: @atgensoft-solutions-llp
Twitter: @skedautomation
FaceBook: @atgensoftsolutions
Register: http://www.myguruzone.com/
Our Products & Services:
◦ DevOps Training, Consulting & Implementation
◦ Sked Automation Software
◦ Ajar DBMS
◦ Automation Design & Solutions
Thank You !!