SlideShare a Scribd company logo
1 of 21
DevOps
Orchestration with Chef
Presented By:
Mayank Gaikwad
04/06/16 Mayank Gaikwad
Agenda
04/06/16 Mayank Gaikwad
• Chef Provisioner
• Secret Management
• Cookbook Versioning
• Dependency Management
• Test Driven Infrastructure
Chef Provisioning
“ Allows to manage infrastructure with repeatable resource
creation/deletion on different environment from dev, QA to production
in very abstract and easy way”
This is next step forward , Chef as configuration management tool
What can be achieved-
Idempotency
Cluster Management
Parallel Provisioning
04/06/16 Mayank Gaikwad
04/06/16 Mayank Gaikwad
• with_chef_server "https://console.chef.io/organizations/mgdevstack",
:client_name => Chef::Config[:node_name],
:signing_key_filename => Chef::Config[:client_key]
• with_machine_options({
convergence_options: {
:ssl_verify_mode => :verify_none
},
bootstrap_options: {
image_id: "ami-08173648",
instance_type: "m1.small",
key_name: “mg-keypair", # If not specified, this will be used and generated
key_path: "/root/.ssh/mg-keypair.pem",
user_data: “~/chef/chef_user_data"
},
ssh_username: 'ec2-user',
security_groups: ["default"],
:transport_address_location => :private_ip,
:sudo => true
})
Secret Management
04/06/16 Mayank Gaikwad
• Data bags ( Bags to share data/secret across nodes )
• Encrypted Data bags ( Requires key management across nodes )
• Chef-Vault ( Provides 2 layer encryption decryption mechanism with
no hassle to manage keys across nodes )
Data Bags
Data Bag Creation:
Knife data bag create bag_name item_name
knife data bag from file bag_name path_to/item_name.json
Encrypting Data Bag
openssl rand -base64 512 | tr -d 'rn' > encrypted_data_bag_secret
knife data bag create bag_name item_name --secret
encrypted_data_bag_secret
{
/* This is a supported comment style */
// This style is also supported
"id": "ITEM_NAME",
"key": "value"
}
04/06/16 Mayank Gaikwad
Uses shared secret key to encrypt data.
Overhead of distributing keys and maintaining security during key share
04/06/16 Mayank Gaikwad
Client and Node’s public and private key store
04/06/16 Mayank Gaikwad
Chef-vault
When encrypted data created with chef-vault, it encrypts data-bag with
random shared secret key.
Generated Secret key then encrypted with user’s and nodes public key on
chef server.
So provides 2 layers of encryption.
With out managing secret key.
04/06/16 Mayank Gaikwad
Chef-Vault continued..
Installation
gem install chef-vault
Vault Creation
knife vault create credentials database -A mayank, meet -M client -S
‘name:poc-meetup*’ -J ./database.json
-A Users/ Nodes names
-M Mode for chef-vault
client -- if Chef-Server
solo -- if Chef-Solo
-S Node search parameter where vault can be decrypted
Vault Deletion:
knife data bag delete credentials
04/06/16 Mayank Gaikwad
Chef-Vault continued..
knife vault show credentials database
if user is admin.. Databag content will be shown else it will show
encrypted databag
Using vault within recipe
include_recipe ‘chef-vault’
vault = chef_vault_item(:credentials, ‘database’)
node.set[‘database’][‘password’] = vault[‘password’]
Edit Vault
knife vault edit credentials database
Delete item within vault
knife vault delete credentials database
04/06/16 Mayank Gaikwad
Vault Commands
Add Admin user
knife vault update credentials database -A “new-username”
Add new Node
knife vault update credentials database -S “search-query-for-nodes”
Updating users key
knife vault refresh credentials database
Removing user
knife vault remove credentials database -A “role:base”
04/06/16 Mayank Gaikwad
Test Driven Infrastructure
Convergence phases:
pre-convergence: syntax checking unit testing, lint checking
convergence:
post-convergence: verifies if node is in desired state(auditing)
Testing workflow
•Code Correctness - Foodcritic and Rubocop
•Unit Tests and testing - ChefSpec
•Integration Tests - Test Kitchen and ServerSpec
04/06/16 Mayank Gaikwad
Unit Testing
package "httpd" do
action :install
end
it "installs the httpd package" do
expect(chef_run).to install_package("httpd")
end
04/06/16 Mayank Gaikwad
Rubocop
Does Linting and convention check
Discover code style violation
Rubocop.yml
04/06/16 Mayank Gaikwad
Foodcritic
Checks cookbook for common problems
•Style
•Correctness
•Syntax
•Best practices
•Common mistakes
•Deprecations
Typically run against cookbook
Currently 61 rules to check linting, style guide and best practices
To exclude rule FC003:
foodcritic cookbooks/ --tags ~FC003
04/06/16 Mayank Gaikwad
04/06/16 Mayank Gaikwad
Foodcritic Rules
Foodcritic rules
 FC001 : accesses node attributes with
symbols
# Don't do this
package node[:cookbook][:package] do
action :install
End
package node['cookbook']['package'] do
action :install
end
FC004: Use a service resource to start and
stop services
# Don't do this
execute 'start-tomcat' do
command '/etc/init.d/tomcat6 start'
action :run
End
service 'tomcat' do
action :start
end
04/06/16 Mayank Gaikwad
Auditing cookbook
Cookbook/meetup/recipes/audit.rb
control_group 'Server Auditing:: ' do
control 'service' do
it 'should be stopped' do
expect(service('crond')).to_not be_running
end
end
end
04/06/16 Mayank Gaikwad
Questions & Answers
04/06/16 Mayank Gaikwad
Thanks You
04/06/16 Mayank Gaikwad

More Related Content

What's hot

Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Chef
 
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Software, Inc.
 
Chef-Zero & Local Mode
Chef-Zero & Local ModeChef-Zero & Local Mode
Chef-Zero & Local ModeMichael Goetz
 
Chef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Software, Inc.
 
Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )Pravin Mishra
 
Automating your infrastructure with Chef
Automating your infrastructure with ChefAutomating your infrastructure with Chef
Automating your infrastructure with ChefJohn Ewart
 
Environments - Fundamentals Webinar Series Week 5
Environments - Fundamentals Webinar Series Week 5Environments - Fundamentals Webinar Series Week 5
Environments - Fundamentals Webinar Series Week 5Chef
 
Opscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with ChefOpscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with ChefChef Software, Inc.
 
Chef Tutorial for DEVOPS Newbies
Chef Tutorial for DEVOPS NewbiesChef Tutorial for DEVOPS Newbies
Chef Tutorial for DEVOPS NewbiesMamun Rashid, CCDH
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Edureka!
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Jennifer Davis
 
Introduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitIntroduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitJennifer Davis
 
Chef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK BoxChef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK BoxChef Software, Inc.
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to ChefKnoldus Inc.
 
Chef, Devops, and You
Chef, Devops, and YouChef, Devops, and You
Chef, Devops, and YouBryan Berry
 
Common configuration with Data Bags - Fundamentals Webinar Series Part 4
Common configuration with Data Bags - Fundamentals Webinar Series Part 4Common configuration with Data Bags - Fundamentals Webinar Series Part 4
Common configuration with Data Bags - Fundamentals Webinar Series Part 4Chef
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with ChefJonathan Weiss
 
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Software, Inc.
 

What's hot (20)

Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3Node object and roles - Fundamentals Webinar Series Part 3
Node object and roles - Fundamentals Webinar Series Part 3
 
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
 
Chef-Zero & Local Mode
Chef-Zero & Local ModeChef-Zero & Local Mode
Chef-Zero & Local Mode
 
Chef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation Setup
 
Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )
 
Automating your infrastructure with Chef
Automating your infrastructure with ChefAutomating your infrastructure with Chef
Automating your infrastructure with Chef
 
Environments - Fundamentals Webinar Series Week 5
Environments - Fundamentals Webinar Series Week 5Environments - Fundamentals Webinar Series Week 5
Environments - Fundamentals Webinar Series Week 5
 
Chef introduction
Chef introductionChef introduction
Chef introduction
 
Opscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with ChefOpscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with Chef
 
Chef Tutorial for DEVOPS Newbies
Chef Tutorial for DEVOPS NewbiesChef Tutorial for DEVOPS Newbies
Chef Tutorial for DEVOPS Newbies
 
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
Chef vs Puppet vs Ansible vs SaltStack | Configuration Management Tools Compa...
 
Introduction to chef
Introduction to chefIntroduction to chef
Introduction to chef
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015
 
Introduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitIntroduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen Summit
 
Chef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK BoxChef ignited a DevOps revolution – BK Box
Chef ignited a DevOps revolution – BK Box
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
Chef, Devops, and You
Chef, Devops, and YouChef, Devops, and You
Chef, Devops, and You
 
Common configuration with Data Bags - Fundamentals Webinar Series Part 4
Common configuration with Data Bags - Fundamentals Webinar Series Part 4Common configuration with Data Bags - Fundamentals Webinar Series Part 4
Common configuration with Data Bags - Fundamentals Webinar Series Part 4
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with Chef
 
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
Chef Fundamentals Training Series Module 4: The Chef Client Run and Expanding...
 

Similar to Orchestration with Chef

PuppetConf 2016: The Long, Twisty Road to Automation: Implementing Puppet at ...
PuppetConf 2016: The Long, Twisty Road to Automation: Implementing Puppet at ...PuppetConf 2016: The Long, Twisty Road to Automation: Implementing Puppet at ...
PuppetConf 2016: The Long, Twisty Road to Automation: Implementing Puppet at ...Puppet
 
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...Timofey Turenko
 
DevOpsDaysRiga 2018: Andrew Martin - Continuous Kubernetes Security
DevOpsDaysRiga 2018: Andrew Martin - Continuous Kubernetes Security DevOpsDaysRiga 2018: Andrew Martin - Continuous Kubernetes Security
DevOpsDaysRiga 2018: Andrew Martin - Continuous Kubernetes Security DevOpsDays Riga
 
Monitoring infrastructure with prometheus
Monitoring infrastructure with prometheusMonitoring infrastructure with prometheus
Monitoring infrastructure with prometheusShahnawaz Saifi
 
Building microservices sample application
Building microservices sample applicationBuilding microservices sample application
Building microservices sample applicationAnil Allewar
 
DevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of ChefDevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of ChefAntons Kranga
 
DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursAmazon Web Services
 
Building a scalable web application by combining modern front-end stuff and A...
Building a scalable web application by combining modern front-end stuff and A...Building a scalable web application by combining modern front-end stuff and A...
Building a scalable web application by combining modern front-end stuff and A...Chris Klug
 
20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdevFrank Rousseau
 
Configuring a more secure BOSH
Configuring a more secure BOSHConfiguring a more secure BOSH
Configuring a more secure BOSHSaman Alvi
 
(DEV303) Touring Version 2 of the AWS SDK for Ruby | AWS re:Invent 2014
(DEV303) Touring Version 2 of the AWS SDK for Ruby | AWS re:Invent 2014(DEV303) Touring Version 2 of the AWS SDK for Ruby | AWS re:Invent 2014
(DEV303) Touring Version 2 of the AWS SDK for Ruby | AWS re:Invent 2014Amazon Web Services
 
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능Hyperledger Korea User Group
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberKMS Technology
 
Simple blog wall creation on Java
Simple blog wall creation on JavaSimple blog wall creation on Java
Simple blog wall creation on JavaMax Titov
 
Chef 0.8, Knife and Amazon EC2
Chef 0.8, Knife and Amazon EC2Chef 0.8, Knife and Amazon EC2
Chef 0.8, Knife and Amazon EC2Robert Berger
 
Session 3 - CloudStack Test Automation and CI
Session 3 - CloudStack Test Automation and CISession 3 - CloudStack Test Automation and CI
Session 3 - CloudStack Test Automation and CItcloudcomputing-tw
 
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty ProfileAAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty ProfileWASdev Community
 
Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef Provisioning a Chef Server Cluster - ChefConf 2015Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef Provisioning a Chef Server Cluster - ChefConf 2015Chef
 

Similar to Orchestration with Chef (20)

PuppetConf 2016: The Long, Twisty Road to Automation: Implementing Puppet at ...
PuppetConf 2016: The Long, Twisty Road to Automation: Implementing Puppet at ...PuppetConf 2016: The Long, Twisty Road to Automation: Implementing Puppet at ...
PuppetConf 2016: The Long, Twisty Road to Automation: Implementing Puppet at ...
 
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
DB proxy server test: run tests on tens of virtual machines with Jenkins, Vag...
 
SQL Server 2014 Backup to Azure - SQL Saturday CR 2015
SQL Server 2014 Backup to Azure - SQL Saturday CR 2015SQL Server 2014 Backup to Azure - SQL Saturday CR 2015
SQL Server 2014 Backup to Azure - SQL Saturday CR 2015
 
DevOpsDaysRiga 2018: Andrew Martin - Continuous Kubernetes Security
DevOpsDaysRiga 2018: Andrew Martin - Continuous Kubernetes Security DevOpsDaysRiga 2018: Andrew Martin - Continuous Kubernetes Security
DevOpsDaysRiga 2018: Andrew Martin - Continuous Kubernetes Security
 
Monitoring infrastructure with prometheus
Monitoring infrastructure with prometheusMonitoring infrastructure with prometheus
Monitoring infrastructure with prometheus
 
Building microservices sample application
Building microservices sample applicationBuilding microservices sample application
Building microservices sample application
 
Iac d.damyanov 4.pptx
Iac d.damyanov 4.pptxIac d.damyanov 4.pptx
Iac d.damyanov 4.pptx
 
DevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of ChefDevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of Chef
 
DevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office HoursDevOps for the Enterprise: Virtual Office Hours
DevOps for the Enterprise: Virtual Office Hours
 
Building a scalable web application by combining modern front-end stuff and A...
Building a scalable web application by combining modern front-end stuff and A...Building a scalable web application by combining modern front-end stuff and A...
Building a scalable web application by combining modern front-end stuff and A...
 
20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev20130528 solution linux_frousseau_nopain_webdev
20130528 solution linux_frousseau_nopain_webdev
 
Configuring a more secure BOSH
Configuring a more secure BOSHConfiguring a more secure BOSH
Configuring a more secure BOSH
 
(DEV303) Touring Version 2 of the AWS SDK for Ruby | AWS re:Invent 2014
(DEV303) Touring Version 2 of the AWS SDK for Ruby | AWS re:Invent 2014(DEV303) Touring Version 2 of the AWS SDK for Ruby | AWS re:Invent 2014
(DEV303) Touring Version 2 of the AWS SDK for Ruby | AWS re:Invent 2014
 
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능
[2019.1] 하이퍼레저 패브릭 v1.3, v1.4 새로운 기능
 
Behavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using CucumberBehavior Driven Development and Automation Testing Using Cucumber
Behavior Driven Development and Automation Testing Using Cucumber
 
Simple blog wall creation on Java
Simple blog wall creation on JavaSimple blog wall creation on Java
Simple blog wall creation on Java
 
Chef 0.8, Knife and Amazon EC2
Chef 0.8, Knife and Amazon EC2Chef 0.8, Knife and Amazon EC2
Chef 0.8, Knife and Amazon EC2
 
Session 3 - CloudStack Test Automation and CI
Session 3 - CloudStack Test Automation and CISession 3 - CloudStack Test Automation and CI
Session 3 - CloudStack Test Automation and CI
 
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty ProfileAAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
AAI-3218 Production Deployment Best Practices for WebSphere Liberty Profile
 
Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef Provisioning a Chef Server Cluster - ChefConf 2015Chef Provisioning a Chef Server Cluster - ChefConf 2015
Chef Provisioning a Chef Server Cluster - ChefConf 2015
 

Recently uploaded

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyFrank van der Linden
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdfWave PLM
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 

Recently uploaded (20)

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Engage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The UglyEngage Usergroup 2024 - The Good The Bad_The Ugly
Engage Usergroup 2024 - The Good The Bad_The Ugly
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf5 Signs You Need a Fashion PLM Software.pdf
5 Signs You Need a Fashion PLM Software.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 

Orchestration with Chef

  • 1. DevOps Orchestration with Chef Presented By: Mayank Gaikwad 04/06/16 Mayank Gaikwad
  • 2. Agenda 04/06/16 Mayank Gaikwad • Chef Provisioner • Secret Management • Cookbook Versioning • Dependency Management • Test Driven Infrastructure
  • 3. Chef Provisioning “ Allows to manage infrastructure with repeatable resource creation/deletion on different environment from dev, QA to production in very abstract and easy way” This is next step forward , Chef as configuration management tool What can be achieved- Idempotency Cluster Management Parallel Provisioning 04/06/16 Mayank Gaikwad
  • 4. 04/06/16 Mayank Gaikwad • with_chef_server "https://console.chef.io/organizations/mgdevstack", :client_name => Chef::Config[:node_name], :signing_key_filename => Chef::Config[:client_key] • with_machine_options({ convergence_options: { :ssl_verify_mode => :verify_none }, bootstrap_options: { image_id: "ami-08173648", instance_type: "m1.small", key_name: “mg-keypair", # If not specified, this will be used and generated key_path: "/root/.ssh/mg-keypair.pem", user_data: “~/chef/chef_user_data" }, ssh_username: 'ec2-user', security_groups: ["default"], :transport_address_location => :private_ip, :sudo => true })
  • 5. Secret Management 04/06/16 Mayank Gaikwad • Data bags ( Bags to share data/secret across nodes ) • Encrypted Data bags ( Requires key management across nodes ) • Chef-Vault ( Provides 2 layer encryption decryption mechanism with no hassle to manage keys across nodes )
  • 6. Data Bags Data Bag Creation: Knife data bag create bag_name item_name knife data bag from file bag_name path_to/item_name.json Encrypting Data Bag openssl rand -base64 512 | tr -d 'rn' > encrypted_data_bag_secret knife data bag create bag_name item_name --secret encrypted_data_bag_secret { /* This is a supported comment style */ // This style is also supported "id": "ITEM_NAME", "key": "value" } 04/06/16 Mayank Gaikwad
  • 7. Uses shared secret key to encrypt data. Overhead of distributing keys and maintaining security during key share 04/06/16 Mayank Gaikwad
  • 8. Client and Node’s public and private key store 04/06/16 Mayank Gaikwad
  • 9. Chef-vault When encrypted data created with chef-vault, it encrypts data-bag with random shared secret key. Generated Secret key then encrypted with user’s and nodes public key on chef server. So provides 2 layers of encryption. With out managing secret key. 04/06/16 Mayank Gaikwad
  • 10. Chef-Vault continued.. Installation gem install chef-vault Vault Creation knife vault create credentials database -A mayank, meet -M client -S ‘name:poc-meetup*’ -J ./database.json -A Users/ Nodes names -M Mode for chef-vault client -- if Chef-Server solo -- if Chef-Solo -S Node search parameter where vault can be decrypted Vault Deletion: knife data bag delete credentials 04/06/16 Mayank Gaikwad
  • 11. Chef-Vault continued.. knife vault show credentials database if user is admin.. Databag content will be shown else it will show encrypted databag Using vault within recipe include_recipe ‘chef-vault’ vault = chef_vault_item(:credentials, ‘database’) node.set[‘database’][‘password’] = vault[‘password’] Edit Vault knife vault edit credentials database Delete item within vault knife vault delete credentials database 04/06/16 Mayank Gaikwad
  • 12. Vault Commands Add Admin user knife vault update credentials database -A “new-username” Add new Node knife vault update credentials database -S “search-query-for-nodes” Updating users key knife vault refresh credentials database Removing user knife vault remove credentials database -A “role:base” 04/06/16 Mayank Gaikwad
  • 13. Test Driven Infrastructure Convergence phases: pre-convergence: syntax checking unit testing, lint checking convergence: post-convergence: verifies if node is in desired state(auditing) Testing workflow •Code Correctness - Foodcritic and Rubocop •Unit Tests and testing - ChefSpec •Integration Tests - Test Kitchen and ServerSpec 04/06/16 Mayank Gaikwad
  • 14. Unit Testing package "httpd" do action :install end it "installs the httpd package" do expect(chef_run).to install_package("httpd") end 04/06/16 Mayank Gaikwad
  • 15. Rubocop Does Linting and convention check Discover code style violation Rubocop.yml 04/06/16 Mayank Gaikwad
  • 16. Foodcritic Checks cookbook for common problems •Style •Correctness •Syntax •Best practices •Common mistakes •Deprecations Typically run against cookbook Currently 61 rules to check linting, style guide and best practices To exclude rule FC003: foodcritic cookbooks/ --tags ~FC003 04/06/16 Mayank Gaikwad
  • 18. Foodcritic rules  FC001 : accesses node attributes with symbols # Don't do this package node[:cookbook][:package] do action :install End package node['cookbook']['package'] do action :install end FC004: Use a service resource to start and stop services # Don't do this execute 'start-tomcat' do command '/etc/init.d/tomcat6 start' action :run End service 'tomcat' do action :start end 04/06/16 Mayank Gaikwad
  • 19. Auditing cookbook Cookbook/meetup/recipes/audit.rb control_group 'Server Auditing:: ' do control 'service' do it 'should be stopped' do expect(service('crond')).to_not be_running end end end 04/06/16 Mayank Gaikwad

Editor's Notes

  1. Stretegy: Use of Linting tools to adhere conventions provides uniformity, portability Use of Testing tools to verify cookbook is accomplishing intended goals