SlideShare a Scribd company logo
1 of 35
Download to read offline
Ned Harris
Solutions Engineer, CHEF
ned@chef.io
@nedward777
• https://github.com/nedward/socaldevops-realworld
Agenda
•  Overview
•  Chef Software Platform
•  Building Blocks
•  Chef Patterns and Techniques
Overview
•  Chef is an automation framework that enables Infrastructure as Code
•  Chef leverages reusable definitions to automate desired state
•  Chef is API driven
•  Chef supports Linux variants, Unix variants, AIX and Windows, all as first class
citizens.
The Chef Software Platform
Chef Analytics Chef Delivery
Management
console
High availability
and replication
Chef Provisioning
Chef
Development Kit
Cookbook and
policy authoring
Test-driven
infrastructure
Containers
Cloud
VMs
Devices
Chef ServerChef Solo
Ecosystem
(content,plugins,etc.)
Search & Discovery
Chef Success Engineering
Building Blocks
Cookbooks
Recipes
Resources
Building Blocks: What is a Resource?
•  A Resource is a system state you define
  Example: Package installed, state of a service, configuration file existing
•  You declare what the state of the resource is
  Chef automatically determine HOW that state is achieved
package "httpd" do
action :install
end
windows_feature "IIS-WebServerRole" do
action :install
end
Building Blocks: What is a Recipe?
•  A recipe is a collection of Resources
•  Resources are executed in the order they are listed
On Linux based OSes:
package "httpd" do
action :install
end
template ”/var/www/index.html" do
source ”index.html.erb”
mode "0644"
end
service "httpd" do
action [ :enable, :start ]
end
windows_feature "IIS-WebServerRole" do
action :install
end
template 'c:inetpubwwwrootDefault.htm' do
source "Default.htm.erb"
rights :read, "Everyone"
end
service "w3svc" do
action [ :enable, :start ]
end
Building Blocks: What is a Cookbook?
•  A cookbook is a set of recipes
•  A cookbook is a defined set of items
and different outcomes that you expect
to address
  A cookbook could have a recipe to install
apache2/httpd but also another set of
recipes to activate modules required.
./attributes
./attributes/default.rb
./CHANGELOG.md
./metadata.rb
./README.md
./recipes
./recipes/application.rb
./recipes/balancer.rb
./recipes/database.rb
./recipes/default.rb
./recipes/webserver.rb
./templates
./templates/default
./templates/default/mysite.conf.erb
•  Application cookbooks should map 1 to 1 to an application or piece of software
•  Data abstracted from policy, using attributes over hard coded values
A lot of the following patterns assume these tenants are being applied.
Environments
Building Blocks
Roles
Cookbooks
Recipes
Resources
Building Blocks: What is a role?
•  Define reusable roles for Infrastructure Code
chef_type: role
default_attributes:
my-app:
application:
version: 1.5.6
description: Role for my application
json_class: Chef::Role
name: my_application_role
run_list:
role[base]
recipe[my-app::application]
Building Blocks: What is an Environment?
•  Define a reusable environments for Infrastructure Code
chef_type: environment
cookbook_versions:
database: 2.2.0
default_attributes:
myapp:
application:
version: 1.2.3
description: Our production environment
json_class: Chef::Environment
name: production
By pinning certain attributes to an environment, you can assure these
attributes are global to all nodes within the environment.
This allows a single point of control over service configuration to a wide
range of servers.
You can also pin a cookbook version to an environment, preventing newer
versions of that cookbook from being applied to nodes in that
environment.
Roles are global in scope, so a change
to them can effect any node assigned to
that role in any environment.
This can lead to unintended
consequences.
Pinning attributes to roles.
Because no one
organization is the same
as another, there is no
generic answer to this
question.
• What I can do is provide a set of
proven patterns and techniques that
have been battle tested over time,
along with some commonly accepted
anti-patterns to avoid.
• By selectively applying these patterns
and techniques you can address
some of your organization's unique
requirements
Note: These patterns are based on
tribal knowledge, but not all tribes
share the same views. You should
look at these patterns objectively
based on how they may (or may not)
fit for your organization.
Someone has already built 90% of what I want in a community
cookbook.
It’d be nice to benefit from all that work that has already been done.
It’s not 100% the way I need it though.
As its name implies, a wrapper cookbook is one which wraps itself around
an existing cookbook, typically an application cookbook.
A wrapper cookbook may extend functionality not found in an existing
cookbook.
In most use cases however it is generally used as a means of changing
attributes found in an application cookbook.
This often leads to drift as each version
of the cookbook evolves separately.
At some point you just own a redundant
cookbook, with all the original value of
reuse lost.
Copying or forking the application cookbook.
It gets tiring, making sure I’ve added recipes like iptables, dns, ldap etc.
to all the different run-lists.
I’d like to consolidate all these recipes into a role, but I have been told
roles can’t be versioned like cookbooks .
This can lead to an untenable
management situation as this base
policy evolves over time.
Adding this common base policies ala-cart into many different roles and / or run-
lists.
Inside my environment I have a good number of cookbooks that need to
be deployed with some variation from one to the next.
I’ve been told not to pin attributes to roles though… what do I do?
Roles can apply to all environments
within the chef organization. This makes
them dangerous.
Roles cannot be versioned the way
cookbooks can.
Pinning attributes to roles
Thank You – Questions?
2015 08-11-scdo-meetup

More Related Content

What's hot

Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with ChefJonathan Weiss
 
Continous delivery with Jenkins and Chef
Continous delivery with Jenkins and ChefContinous delivery with Jenkins and Chef
Continous delivery with Jenkins and Chefdefrag2
 
Server Installation and Configuration with Chef
Server Installation and Configuration with ChefServer Installation and Configuration with Chef
Server Installation and Configuration with ChefRaimonds Simanovskis
 
Chef, Vagrant and Friends
Chef, Vagrant and FriendsChef, Vagrant and Friends
Chef, Vagrant and FriendsBen McRae
 
Chef - Administration for programmers
Chef - Administration for programmersChef - Administration for programmers
Chef - Administration for programmersmrsabo
 
Managing Servers with Chef
Managing Servers with ChefManaging Servers with Chef
Managing Servers with ChefJoe Kepley
 
Building a PaaS using Chef
Building a PaaS using ChefBuilding a PaaS using Chef
Building a PaaS using ChefShaun Domingo
 
Cooking chef
Cooking chefCooking chef
Cooking chefranjithar92
 
CLUG 2014-10 - Cookbook CI with Jenkins
CLUG 2014-10 - Cookbook CI with JenkinsCLUG 2014-10 - Cookbook CI with Jenkins
CLUG 2014-10 - Cookbook CI with JenkinsZachary Stevens
 
2013-08-27 Chef-Boston Meetup - Using Berkshelf
2013-08-27 Chef-Boston Meetup - Using Berkshelf2013-08-27 Chef-Boston Meetup - Using Berkshelf
2013-08-27 Chef-Boston Meetup - Using Berkshelfkevinkarwaski
 
Jenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated DeploymentJenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated DeploymentDan Stine
 
The unintended benefits of Chef
The unintended benefits of ChefThe unintended benefits of Chef
The unintended benefits of ChefChef Software, Inc.
 
Chef in a nutshell
Chef in a nutshellChef in a nutshell
Chef in a nutshellRoberto Gaiser
 
Chef - managing yours servers with Code
Chef - managing yours servers with CodeChef - managing yours servers with Code
Chef - managing yours servers with Codem_richardson
 
Testing for infra code using test-kitchen,docker,chef
Testing for infra code using  test-kitchen,docker,chefTesting for infra code using  test-kitchen,docker,chef
Testing for infra code using test-kitchen,docker,chefkamalikamj
 
Chef Tutorial for DEVOPS Newbies
Chef Tutorial for DEVOPS NewbiesChef Tutorial for DEVOPS Newbies
Chef Tutorial for DEVOPS NewbiesMamun Rashid, CCDH
 
Getting more-chefs-in-the-kitchen
Getting more-chefs-in-the-kitchenGetting more-chefs-in-the-kitchen
Getting more-chefs-in-the-kitchenAndrew Gross
 
Configuration Management Camp 2015
Configuration Management Camp 2015Configuration Management Camp 2015
Configuration Management Camp 2015Sean OMeara
 
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Software, Inc.
 

What's hot (20)

Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with Chef
 
Continous delivery with Jenkins and Chef
Continous delivery with Jenkins and ChefContinous delivery with Jenkins and Chef
Continous delivery with Jenkins and Chef
 
Server Installation and Configuration with Chef
Server Installation and Configuration with ChefServer Installation and Configuration with Chef
Server Installation and Configuration with Chef
 
Chef, Vagrant and Friends
Chef, Vagrant and FriendsChef, Vagrant and Friends
Chef, Vagrant and Friends
 
Chef - Administration for programmers
Chef - Administration for programmersChef - Administration for programmers
Chef - Administration for programmers
 
Introduction to chef
Introduction to chefIntroduction to chef
Introduction to chef
 
Managing Servers with Chef
Managing Servers with ChefManaging Servers with Chef
Managing Servers with Chef
 
Building a PaaS using Chef
Building a PaaS using ChefBuilding a PaaS using Chef
Building a PaaS using Chef
 
Cooking chef
Cooking chefCooking chef
Cooking chef
 
CLUG 2014-10 - Cookbook CI with Jenkins
CLUG 2014-10 - Cookbook CI with JenkinsCLUG 2014-10 - Cookbook CI with Jenkins
CLUG 2014-10 - Cookbook CI with Jenkins
 
2013-08-27 Chef-Boston Meetup - Using Berkshelf
2013-08-27 Chef-Boston Meetup - Using Berkshelf2013-08-27 Chef-Boston Meetup - Using Berkshelf
2013-08-27 Chef-Boston Meetup - Using Berkshelf
 
Jenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated DeploymentJenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated Deployment
 
The unintended benefits of Chef
The unintended benefits of ChefThe unintended benefits of Chef
The unintended benefits of Chef
 
Chef in a nutshell
Chef in a nutshellChef in a nutshell
Chef in a nutshell
 
Chef - managing yours servers with Code
Chef - managing yours servers with CodeChef - managing yours servers with Code
Chef - managing yours servers with Code
 
Testing for infra code using test-kitchen,docker,chef
Testing for infra code using  test-kitchen,docker,chefTesting for infra code using  test-kitchen,docker,chef
Testing for infra code using test-kitchen,docker,chef
 
Chef Tutorial for DEVOPS Newbies
Chef Tutorial for DEVOPS NewbiesChef Tutorial for DEVOPS Newbies
Chef Tutorial for DEVOPS Newbies
 
Getting more-chefs-in-the-kitchen
Getting more-chefs-in-the-kitchenGetting more-chefs-in-the-kitchen
Getting more-chefs-in-the-kitchen
 
Configuration Management Camp 2015
Configuration Management Camp 2015Configuration Management Camp 2015
Configuration Management Camp 2015
 
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
Chef Fundamentals Training Series Module 6: Roles, Environments, Community Co...
 

Viewers also liked

Solo Backpacking Through Southern Africa
Solo Backpacking Through Southern AfricaSolo Backpacking Through Southern Africa
Solo Backpacking Through Southern AfricaPaul Kuhne
 
Introduction to Stacki - World's fastest Linux server provisioning Tool
Introduction to Stacki - World's fastest Linux server provisioning ToolIntroduction to Stacki - World's fastest Linux server provisioning Tool
Introduction to Stacki - World's fastest Linux server provisioning ToolSuresh Paulraj
 
Traveling Argentina & Chile On a Budget
Traveling Argentina & Chile On a BudgetTraveling Argentina & Chile On a Budget
Traveling Argentina & Chile On a BudgetPaul Kuhne
 
SoCalDevOpsUserGroup-PresentationPuppetLabs
SoCalDevOpsUserGroup-PresentationPuppetLabsSoCalDevOpsUserGroup-PresentationPuppetLabs
SoCalDevOpsUserGroup-PresentationPuppetLabsSuresh Paulraj
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentationdeezeekoy
 
Accelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWSAccelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWSSuresh Paulraj
 
Sony India Pvt. Ltd
Sony India Pvt. LtdSony India Pvt. Ltd
Sony India Pvt. LtdAjinkya Dev
 
Getting started with salt stack
Getting started with salt stackGetting started with salt stack
Getting started with salt stackSuresh Paulraj
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to ChefSuresh Paulraj
 
Getting started with salt stack
Getting started with salt stackGetting started with salt stack
Getting started with salt stackSuresh Paulraj
 
kiraan nadi PJK
kiraan nadi PJKkiraan nadi PJK
kiraan nadi PJKfaez_pau1986
 
Does Automation reduce costs incurred by a company?
Does Automation reduce costs incurred by a company?Does Automation reduce costs incurred by a company?
Does Automation reduce costs incurred by a company?Sudha Madhavi
 
Entry Stratergy of Dabur
Entry Stratergy of DaburEntry Stratergy of Dabur
Entry Stratergy of DaburSudha Madhavi
 
Entry Stratergy of Dabur
Entry Stratergy of DaburEntry Stratergy of Dabur
Entry Stratergy of DaburSudha Madhavi
 

Viewers also liked (16)

Solo Backpacking Through Southern Africa
Solo Backpacking Through Southern AfricaSolo Backpacking Through Southern Africa
Solo Backpacking Through Southern Africa
 
Introduction to Stacki - World's fastest Linux server provisioning Tool
Introduction to Stacki - World's fastest Linux server provisioning ToolIntroduction to Stacki - World's fastest Linux server provisioning Tool
Introduction to Stacki - World's fastest Linux server provisioning Tool
 
Military Transition News
Military Transition NewsMilitary Transition News
Military Transition News
 
Traveling Argentina & Chile On a Budget
Traveling Argentina & Chile On a BudgetTraveling Argentina & Chile On a Budget
Traveling Argentina & Chile On a Budget
 
SoCalDevOpsUserGroup-PresentationPuppetLabs
SoCalDevOpsUserGroup-PresentationPuppetLabsSoCalDevOpsUserGroup-PresentationPuppetLabs
SoCalDevOpsUserGroup-PresentationPuppetLabs
 
Untitled Presentation
Untitled PresentationUntitled Presentation
Untitled Presentation
 
Accelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWSAccelerating DevOps Pipelines with AWS
Accelerating DevOps Pipelines with AWS
 
Sony India Pvt. Ltd
Sony India Pvt. LtdSony India Pvt. Ltd
Sony India Pvt. Ltd
 
Getting started with salt stack
Getting started with salt stackGetting started with salt stack
Getting started with salt stack
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
Getting started with salt stack
Getting started with salt stackGetting started with salt stack
Getting started with salt stack
 
Introduction to Franchising-IFA
Introduction to Franchising-IFAIntroduction to Franchising-IFA
Introduction to Franchising-IFA
 
kiraan nadi PJK
kiraan nadi PJKkiraan nadi PJK
kiraan nadi PJK
 
Does Automation reduce costs incurred by a company?
Does Automation reduce costs incurred by a company?Does Automation reduce costs incurred by a company?
Does Automation reduce costs incurred by a company?
 
Entry Stratergy of Dabur
Entry Stratergy of DaburEntry Stratergy of Dabur
Entry Stratergy of Dabur
 
Entry Stratergy of Dabur
Entry Stratergy of DaburEntry Stratergy of Dabur
Entry Stratergy of Dabur
 

Similar to 2015 08-11-scdo-meetup

Introduction to Cooking with Chef
Introduction to Cooking with ChefIntroduction to Cooking with Chef
Introduction to Cooking with ChefJohn Osborne
 
Chef Cookbook Design Patterns
Chef Cookbook Design PatternsChef Cookbook Design Patterns
Chef Cookbook Design PatternsEric Krupnik
 
Kickstarter - Chef Opswork
Kickstarter - Chef OpsworkKickstarter - Chef Opswork
Kickstarter - Chef OpsworkHamza Waqas
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Software, Inc.
 
Introducing Chef | An IT automation for speed and awesomeness
Introducing Chef | An IT automation for speed and awesomenessIntroducing Chef | An IT automation for speed and awesomeness
Introducing Chef | An IT automation for speed and awesomenessRamit Surana
 
Habitat Managed Chef
Habitat Managed ChefHabitat Managed Chef
Habitat Managed ChefChef
 
Chef for Openstack
Chef for OpenstackChef for Openstack
Chef for OpenstackMohit Sethi
 
Chef for openstack
Chef for openstackChef for openstack
Chef for openstackopenstackindia
 
DOO-009_Powering High Velocity Development for your Infrastructure
DOO-009_Powering High Velocity Development for your InfrastructureDOO-009_Powering High Velocity Development for your Infrastructure
DOO-009_Powering High Velocity Development for your Infrastructuredecode2016
 
Introduction to chef
Introduction to chefIntroduction to chef
Introduction to chefKrishna Kishore
 
AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)
AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)
AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)Amazon Web Services
 
What is Chef and how we use it at tripsta
What is Chef and how we use it at tripstaWhat is Chef and how we use it at tripsta
What is Chef and how we use it at tripstaGiedrius Rimkus
 
AWS OpsWorks for Chef Automate
AWS OpsWorks for Chef AutomateAWS OpsWorks for Chef Automate
AWS OpsWorks for Chef AutomateAmazon Web Services
 
Chef at EIS
Chef at EISChef at EIS
Chef at EIScarpnick
 
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!
 

Similar to 2015 08-11-scdo-meetup (20)

Introduction to Cooking with Chef
Introduction to Cooking with ChefIntroduction to Cooking with Chef
Introduction to Cooking with Chef
 
Chef Cookbook Design Patterns
Chef Cookbook Design PatternsChef Cookbook Design Patterns
Chef Cookbook Design Patterns
 
Chef
ChefChef
Chef
 
Kickstarter - Chef Opswork
Kickstarter - Chef OpsworkKickstarter - Chef Opswork
Kickstarter - Chef Opswork
 
Chef: Smart infrastructure automation
Chef: Smart infrastructure automationChef: Smart infrastructure automation
Chef: Smart infrastructure automation
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of Chef
 
Introducing Chef | An IT automation for speed and awesomeness
Introducing Chef | An IT automation for speed and awesomenessIntroducing Chef | An IT automation for speed and awesomeness
Introducing Chef | An IT automation for speed and awesomeness
 
Chef fundamentals
Chef fundamentalsChef fundamentals
Chef fundamentals
 
Habitat Managed Chef
Habitat Managed ChefHabitat Managed Chef
Habitat Managed Chef
 
Chef for Openstack
Chef for OpenstackChef for Openstack
Chef for Openstack
 
Chef for openstack
Chef for openstackChef for openstack
Chef for openstack
 
Learning chef
Learning chefLearning chef
Learning chef
 
DOO-009_Powering High Velocity Development for your Infrastructure
DOO-009_Powering High Velocity Development for your InfrastructureDOO-009_Powering High Velocity Development for your Infrastructure
DOO-009_Powering High Velocity Development for your Infrastructure
 
Introduction to chef
Introduction to chefIntroduction to chef
Introduction to chef
 
AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)
AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)
AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)
 
What is Chef and how we use it at tripsta
What is Chef and how we use it at tripstaWhat is Chef and how we use it at tripsta
What is Chef and how we use it at tripsta
 
AWS OpsWorks for Chef Automate
AWS OpsWorks for Chef AutomateAWS OpsWorks for Chef Automate
AWS OpsWorks for Chef Automate
 
Chef at EIS
Chef at EISChef at EIS
Chef at EIS
 
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...
 
DevOps and Chef improve your life
DevOps and Chef improve your life DevOps and Chef improve your life
DevOps and Chef improve your life
 

Recently uploaded

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamUiPathCommunity
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceIES VE
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityVictorSzoltysek
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformWSO2
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governanceWSO2
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaWSO2
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingWSO2
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 

Recently uploaded (20)

DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Decarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational PerformanceDecarbonising Commercial Real Estate: The Role of Operational Performance
Decarbonising Commercial Real Estate: The Role of Operational Performance
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
ChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps ProductivityChatGPT and Beyond - Elevating DevOps Productivity
ChatGPT and Beyond - Elevating DevOps Productivity
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data PlatformLess Is More: Utilizing Ballerina to Architect a Cloud Data Platform
Less Is More: Utilizing Ballerina to Architect a Cloud Data Platform
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
API Governance and Monetization - The evolution of API governance
API Governance and Monetization -  The evolution of API governanceAPI Governance and Monetization -  The evolution of API governance
API Governance and Monetization - The evolution of API governance
 
Modernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using BallerinaModernizing Legacy Systems Using Ballerina
Modernizing Legacy Systems Using Ballerina
 
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
TrustArc Webinar - Unified Trust Center for Privacy, Security, Compliance, an...
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
WSO2 Micro Integrator for Enterprise Integration in a Decentralized, Microser...
 
Quantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation ComputingQuantum Leap in Next-Generation Computing
Quantum Leap in Next-Generation Computing
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 

2015 08-11-scdo-meetup

  • 1.
  • 2. Ned Harris Solutions Engineer, CHEF ned@chef.io @nedward777
  • 4. Agenda •  Overview •  Chef Software Platform •  Building Blocks •  Chef Patterns and Techniques
  • 5. Overview •  Chef is an automation framework that enables Infrastructure as Code •  Chef leverages reusable definitions to automate desired state •  Chef is API driven •  Chef supports Linux variants, Unix variants, AIX and Windows, all as first class citizens.
  • 6. The Chef Software Platform Chef Analytics Chef Delivery Management console High availability and replication Chef Provisioning Chef Development Kit Cookbook and policy authoring Test-driven infrastructure Containers Cloud VMs Devices Chef ServerChef Solo Ecosystem (content,plugins,etc.) Search & Discovery Chef Success Engineering
  • 8. Building Blocks: What is a Resource? •  A Resource is a system state you define   Example: Package installed, state of a service, configuration file existing •  You declare what the state of the resource is   Chef automatically determine HOW that state is achieved package "httpd" do action :install end windows_feature "IIS-WebServerRole" do action :install end
  • 9. Building Blocks: What is a Recipe? •  A recipe is a collection of Resources •  Resources are executed in the order they are listed On Linux based OSes: package "httpd" do action :install end template ”/var/www/index.html" do source ”index.html.erb” mode "0644" end service "httpd" do action [ :enable, :start ] end windows_feature "IIS-WebServerRole" do action :install end template 'c:inetpubwwwrootDefault.htm' do source "Default.htm.erb" rights :read, "Everyone" end service "w3svc" do action [ :enable, :start ] end
  • 10. Building Blocks: What is a Cookbook? •  A cookbook is a set of recipes •  A cookbook is a defined set of items and different outcomes that you expect to address   A cookbook could have a recipe to install apache2/httpd but also another set of recipes to activate modules required. ./attributes ./attributes/default.rb ./CHANGELOG.md ./metadata.rb ./README.md ./recipes ./recipes/application.rb ./recipes/balancer.rb ./recipes/database.rb ./recipes/default.rb ./recipes/webserver.rb ./templates ./templates/default ./templates/default/mysite.conf.erb
  • 11. •  Application cookbooks should map 1 to 1 to an application or piece of software •  Data abstracted from policy, using attributes over hard coded values A lot of the following patterns assume these tenants are being applied.
  • 13. Building Blocks: What is a role? •  Define reusable roles for Infrastructure Code chef_type: role default_attributes: my-app: application: version: 1.5.6 description: Role for my application json_class: Chef::Role name: my_application_role run_list: role[base] recipe[my-app::application]
  • 14. Building Blocks: What is an Environment? •  Define a reusable environments for Infrastructure Code chef_type: environment cookbook_versions: database: 2.2.0 default_attributes: myapp: application: version: 1.2.3 description: Our production environment json_class: Chef::Environment name: production
  • 15. By pinning certain attributes to an environment, you can assure these attributes are global to all nodes within the environment. This allows a single point of control over service configuration to a wide range of servers. You can also pin a cookbook version to an environment, preventing newer versions of that cookbook from being applied to nodes in that environment.
  • 16.
  • 17. Roles are global in scope, so a change to them can effect any node assigned to that role in any environment. This can lead to unintended consequences. Pinning attributes to roles.
  • 18.
  • 19.
  • 20. Because no one organization is the same as another, there is no generic answer to this question.
  • 21. • What I can do is provide a set of proven patterns and techniques that have been battle tested over time, along with some commonly accepted anti-patterns to avoid. • By selectively applying these patterns and techniques you can address some of your organization's unique requirements
  • 22. Note: These patterns are based on tribal knowledge, but not all tribes share the same views. You should look at these patterns objectively based on how they may (or may not) fit for your organization.
  • 23.
  • 24. Someone has already built 90% of what I want in a community cookbook. It’d be nice to benefit from all that work that has already been done. It’s not 100% the way I need it though.
  • 25. As its name implies, a wrapper cookbook is one which wraps itself around an existing cookbook, typically an application cookbook. A wrapper cookbook may extend functionality not found in an existing cookbook. In most use cases however it is generally used as a means of changing attributes found in an application cookbook.
  • 26.
  • 27. This often leads to drift as each version of the cookbook evolves separately. At some point you just own a redundant cookbook, with all the original value of reuse lost. Copying or forking the application cookbook.
  • 28. It gets tiring, making sure I’ve added recipes like iptables, dns, ldap etc. to all the different run-lists. I’d like to consolidate all these recipes into a role, but I have been told roles can’t be versioned like cookbooks .
  • 29.
  • 30. This can lead to an untenable management situation as this base policy evolves over time. Adding this common base policies ala-cart into many different roles and / or run- lists.
  • 31. Inside my environment I have a good number of cookbooks that need to be deployed with some variation from one to the next. I’ve been told not to pin attributes to roles though… what do I do?
  • 32.
  • 33. Roles can apply to all environments within the chef organization. This makes them dangerous. Roles cannot be versioned the way cookbooks can. Pinning attributes to roles
  • 34. Thank You – Questions?