SlideShare a Scribd company logo
CHEF
CONTINOUS DELIVERY
INTRO TO CHEF
 Chef is a powerful automation platform that transforms complex
infrastructure into code.
 Chef automates how applications are configured, deployed and managed
across your network.
 Chef is a configuration management tool written in Ruby and Erlang
languages.
 It uses a pure Ruby, domain specific language for writing system
configuration “recipes”.
 Chef is introduced by Adam Jacob in 2009.
 Chef framework was created by opscode.
Overview of Chef
 chef comes in two flavours are
- Open Source Chef
- Enterprise Chef includes features such as multi tenancy.
 Client-Server Architecture.
 Embraces modern web technologies
 A system integration platform.
 Programmatically provision and configure.
 Reconstruct business from code repository data backup and resources.
When to use it
 Before considering Chef, make sure you’re familiar with Git, as
it’s required for configuration, and Ruby, as you’ll have to be
writing in it.
 Chef is good for development-focused teams and
environments.
 It’s good for enterprises looking for a more mature solution
for a heterogeneous environment.
Chef is infrastructure as code
 Programmatically provision and configure components.
 Treat like any other code base
 Reconstruct business from code repository, data backup, and
bare metal resources.
Configuration Management
 The art of identifying, organizing and controlling
modifications to the software being built by a programming
tool.
 We need CM because it is easy to lose track of what changes
and component versions have been incorporated into each
system version.
Continuous Delivery
 Continuous Delivery is a software development practice in which continuous integration,
automated testing and automated deployment capabilities allow high quality software to
be developed and deployed rapidly, reliably and repeatedly with minimal manual
overhead.
CHEF Components
 The Chef process consists of three core components that interact with one
another: Chef server, actual servers called nodes, and Chef workstation.
Chef Server
 The Chef server is as a hub for configuration data. It stores cookbooks, the
policies that are applied to nodes, and metadata that describes each node
managed by Chef.
Nodes
 Nodes use a tool called Chef client to ask the Chef server for configuration
details and then applies them to itself. This process of applying changes on
nodes is called a Chef run.
Chef Workstation
 The Chef workstation or Chef repository, shortly chef-repo, is the project
structure of a Chef-managed project and it is used on a developer
workstation. All Chef components are defined in it: cookbooks,
environments, roles and a test suite.
Workstation Components & Tools
 Development Kit: The Chef Development Kit is a package that contains
everything that is needed to start using Chef:
- chef-client and ohai
- chef and knife command line tools
 Chef: Use the chef command-line tool to work with items in a chef-repo, which
is the primary location in which cookbooks are authored, tested, and
maintained, and from which policy is uploaded to the Chef server
 Knife: Use the knife command-line tool to interact with nodes or work with
objects on the Chef server
 Chef-repo is the repository structure in which cookbooks are authored, tested,
and maintained. The chef-repo should be synchronized with a version control
system (such as git), and then managed as if it were source code.
 Kitchen provides a test harness to execute infrastructure code on one or more
platforms in isolation. It uses a driver plugin architecture.
Cookbooks
 A cookbook is the fundamental unit of configuration and policy
distribution. A cookbook defines a scenario and contains everything that is
required to support that scenario:
- Recipes that specify the resources to use and the order in
which they are to be applied
- Attribute values
- File distributions
- Templates
- Extensions to Chef, such as custom resources and libraries
Cookbook Components
 Recipe: The fundamental part of Chef, it is a collection of resources that are
executed in the order to configure a node.
 Resource: A cross platform abstraction of configurable parts of a node. For
example these could be users, packages, files or directories.
 Attributes - Represent node settings, for example hostname, versions of
programming languages to install, database server etc.
 Metadata: Every cookbook requires a small amount of metadata. A file named
metadata.rb is located at the top of every cookbook directory structure.
 Library: Library allows arbitrary Ruby code to be included in a cookbook, either
as a way of extending the classes that are built-in to the chef-client.
 Template: A cookbook template is an Embedded Ruby template that is used to
dynamically generate static text files. It may contain Ruby expressions and
statements & are a great way to manage configuration files.
Nodes
A node is any machine
— physical, virtual, cloud, network device, etc.
— that is under management by Chef.
Types of nodes that can be managed by Chef include, the following:
 Server: A physical node is any active device attached to a network that can run a chef-
client and also allow that chef-client to communicate with a Chef server.
 Cloud: A cloud-based node is hosted in an external cloud-based service, such as
Amazon Web Services (AWS). knife can use these plugins to create instances on cloud-
based services. Once created, the chef-client can be used to deploy, configure, and
maintain those instances.
 Container: Containers are an approach to virtualization that allows a single operating
system to host many working configurations. Containers are popular as a way to
manage distributed and scalable applications and services.
 Network Device: A network node is any networking device—a switch, a router—that is
being managed by a chef-client
Chef on Nodes
 Chef Client: A chef-client is an agent that runs locally on every node that is
under management by Chef. When a chef-client is run, it will perform all of the
steps that are required to bring the node into the expected state, including:
- Registering and authenticating the node with the Chef server
- Building the node object
- Synchronizing cookbooks
- Looking for exceptions and notifications, handling each as required.
Ohai: A tool that is used to collect system configuration data called Ohai.
which is provided to the chef-client for use within cookbooks. Ohai is run by
chef-client at the beginning of every Chef run to determine system state.
Types of attributes Ohai collects includes
 Operating System
 Network
 Memory
 Disk
 CPU
 Kernel
 Host names
 Fully qualified domain names
 Virtualization
 Cloud provider metadata
Chef Server
Chef server acts as a hub for configuration data. It stores cookbooks, the policies that
are applied to nodes & metadata that describes each registered node that is being
managed by the chef-client. Nodes use the chef-client to ask the Chef server for
configuration details, such as recipes, templates & file distributions. The features of
chef server are
 Search indexes allow queries to be made for any type of data that is indexed by the
Chef server, including data bags, environments, nodes, roles.
 Chef management console is a web-based interface for the Chef server that
provides users a way to manage the objects like Nodes, Cookbooks, Recipes, Roles,
Stores JSON data, Environments.
 A data bag is a global variable that is stored as JSON data and is accessible from a
Chef server. A data bag is indexed for searching and can be loaded by a recipe or
accessed during a search.
Policy
Policy maps business and operational requirements, process, and workflow to
settings and objects stored on the Chef server:
 Roles define server types, such as “web server” or “database server”
 Environments define process, such as “dev”, “staging”, or “production”
 The cookbooks & cookbook versions in which organization-specific
configuration policies are maintained.
 A run-list defines all of the information necessary for Chef to configure a node
into the desired state. A run-list is stored as part of the node object on the
Chef server.
Overview of Chef Workflow
 Chef Workflow is a tool built by Chef for Continuous Delivery of
applications and infrastructure.
 It provides facility for automated testing and deployment.
Chef Workflow has a shared pipeline model.
 Every change has to go through some predefined phases of the pipelines
prior to getting released.
 A pipeline is a series of automated and manual quality gates that take
software changes from development to delivery. Chef Workflow pipeline is
made up of 6 stages: Verify, Build, Acceptance, Union, Rehearsal and
Delivered.
 Each project has associated Verify, Build and Acceptance stages. Verify and Build
stages perform tests on the source code. Union, Rehearsal & Delivered are a part
of Shared Pipeline.
 It includes the stages which are unique per project. A developer has control only till
the “Project Pipeline”. Here you push your change, someone reviews and approves
it and then the code is shipped to the Shared Pipeline.
 Verify Stage: The verify stage runs automatically when someone submits a change.
change. It is made up of various phases like:
 Lint: Identifies stylistic problems in your source code
 Syntax :Checks that the code can be parsed
 Unit: Runs unit tests
Build Stage: When a change is approved, Chef Workflow merges the change
into the pipeline’s target branch and triggers the Build stage. Build stage
runs lint, syntax and unit phases from Verify stage. This is because your
may have moved ahead since the Verify stage ran on this change
 Quality: Runs additional test suites. Some tests are too time consuming.
They can be put in Build phase instead of the Verify phase
 Security: Security tests as well as functional test suites can be added here
 Publish: Produces the potentially releasable artifacts and makes them
available for rest of the pipeline
Acceptance Stage: Till Build stage the pipeline was analysing the source code.
From the acceptance stage onwards, it starts analysing the artifact produced
Build stage. As the name suggests, Acceptance is the stage where the team
decides whether the change should go into production or not.
There are 4 phases in Acceptance stage:
 Provision: Provision infrastructure needed to test the artifacts
 Deploy: Deploy the artifacts to your infrastructure
 Smoke: Run smoke test. They should be short running
 Functional: Run functional tests to assure that changes are meeting the
business requirements
Shared Pipeline” is automated by Chef Workflow. It runs the test cases for every stage,
tests the cookbook/application by VM provisioning and if all stages are passed then the
code gets merged into the desired branch.
 Union Stage: A project usually doesn’t work independently. It has dependencies on
several other projects too The purpose of Union stage is to analyse the impact of your
change on the whole system. Here tests are performed with interactions between the
interdependent projects. Phases of Union stage and the remaining stages are same:
provision, deploy, smoke and functional.
 Rehearsal Stage: This stage is triggered if all phases of Union stage pass. The purpose
of this stage is to gain confidence in your change. It repeats the same process as of
Union stage in a different environment. It’s like a pre-production environment.
 Delivered Stage: It is the final stage and its definition can vary according to one’s
requirements. It could mean deploying your changes and making them live, or
publishing a set of artifacts for the customers.
Chef Workflow Components
 The build cookbooks reside on Chef Server which decide what happens in each phase. Each
build node is registered with the chef server
 It’s better to have 3 build nodes so that lint, syntax and unit phases can run in parallel.
 For each deploy-able stage of chef workflow there is a web accessible server where you can
verify your changes pushed through pipeline.
How to use Chef
 Download Chef Development kit
(https://downloads.chef.io/chef-dk/)
 Create a repo eg. chef-repo (mkdir learn-chef)
 Create a folder to keep cookbooks (mkdir cookbooks)
 Now create a cook book eg. (chef generate cookbook learn_chef)
 Go to https://manage.chef.io/ and create a account on chef.io
 Create an organization
 Configure your workstation to communicate with the Chef server with knife
 knife requires two files to communicate with the Chef server
 Every request to the Chef server is authenticated through an RSA public key-
pair. The Chef server holds the public part; you hold the private part.
Pros
 Rich collection of modules and configuration recipes.
 Code-driven approach gives you more control and flexibility over your
configurations.
 Being centred around Git gives it strong version control capabilities.
 ‘Knife’ tool (which uses SSH for deploying agents from workstation) eases
installation burdens.
Cons
 The learning curve is steep if you’re not already familiar with
Ruby and procedural coding.
 It’s not a simple tool, which can lead to large code bases and
complicated environments.
 Doesn’t support push functionality.
THANK YOU

More Related Content

What's hot

Chef Cookbook Workflow
Chef Cookbook WorkflowChef Cookbook Workflow
Chef Cookbook Workflow
Amazon Web Services
 
CHEF - by Scott Russel
CHEF - by Scott RusselCHEF - by Scott Russel
CHEF - by Scott Russel
Kangaroot
 
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
 
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.
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
Pubudu Suharshan Perera
 
Introduction to chef
Introduction to chefIntroduction to chef
Introduction to chef
Damith Kothalawala
 
Azure handsonlab
Azure handsonlabAzure handsonlab
Azure handsonlab
Chef
 
Chef, Devops, and You
Chef, Devops, and YouChef, Devops, and You
Chef, Devops, and You
Bryan Berry
 
Chef: Smart infrastructure automation
Chef: Smart infrastructure automationChef: Smart infrastructure automation
Chef: Smart infrastructure automation
Johannes H. P. Skov Frandsen
 
Understand Chef
Understand ChefUnderstand Chef
Understand Chef
devopsjourney
 
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In CodeIntroduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
Josh Padnick
 
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
Chef Software, Inc.
 
Infrastructure as Code with Chef
Infrastructure as Code with ChefInfrastructure as Code with Chef
Infrastructure as Code with Chef
Sarah Hynes Cheney
 
AWS Meetup - Sydney - February
AWS Meetup - Sydney - February AWS Meetup - Sydney - February
AWS Meetup - Sydney - February
markghiasy
 
Orchestration with Chef
Orchestration with ChefOrchestration with Chef
Orchestration with Chef
Mayank Gaikwad
 
IIS Cookbook
IIS CookbookIIS Cookbook
IIS Cookbook
Daniel Sablosky
 
Compliance Automation Workshop
Compliance Automation WorkshopCompliance Automation Workshop
Compliance Automation Workshop
Chef
 
London Community Summit 2016 - Fresh New Chef Stuff
London Community Summit 2016 - Fresh New Chef StuffLondon Community Summit 2016 - Fresh New Chef Stuff
London Community Summit 2016 - Fresh New Chef Stuff
Chef
 
Spring cloud config
Spring cloud configSpring cloud config
Spring cloud config
Shubhani Jain
 
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.
 

What's hot (20)

Chef Cookbook Workflow
Chef Cookbook WorkflowChef Cookbook Workflow
Chef Cookbook Workflow
 
CHEF - by Scott Russel
CHEF - by Scott RusselCHEF - by Scott Russel
CHEF - by Scott Russel
 
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 )
 
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...
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
Introduction to chef
Introduction to chefIntroduction to chef
Introduction to chef
 
Azure handsonlab
Azure handsonlabAzure handsonlab
Azure handsonlab
 
Chef, Devops, and You
Chef, Devops, and YouChef, Devops, and You
Chef, Devops, and You
 
Chef: Smart infrastructure automation
Chef: Smart infrastructure automationChef: Smart infrastructure automation
Chef: Smart infrastructure automation
 
Understand Chef
Understand ChefUnderstand Chef
Understand Chef
 
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In CodeIntroduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
 
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
 
Infrastructure as Code with Chef
Infrastructure as Code with ChefInfrastructure as Code with Chef
Infrastructure as Code with Chef
 
AWS Meetup - Sydney - February
AWS Meetup - Sydney - February AWS Meetup - Sydney - February
AWS Meetup - Sydney - February
 
Orchestration with Chef
Orchestration with ChefOrchestration with Chef
Orchestration with Chef
 
IIS Cookbook
IIS CookbookIIS Cookbook
IIS Cookbook
 
Compliance Automation Workshop
Compliance Automation WorkshopCompliance Automation Workshop
Compliance Automation Workshop
 
London Community Summit 2016 - Fresh New Chef Stuff
London Community Summit 2016 - Fresh New Chef StuffLondon Community Summit 2016 - Fresh New Chef Stuff
London Community Summit 2016 - Fresh New Chef Stuff
 
Spring cloud config
Spring cloud configSpring cloud config
Spring cloud config
 
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...
 

Similar to 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
Ramit Surana
 
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
 
Chef for Openstack
Chef for OpenstackChef for Openstack
Chef for OpenstackMohit Sethi
 
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
decode2016
 
Introduction to chef
Introduction to chefIntroduction to chef
Introduction to chef
Krishna Kishore
 
Introduction to OpsWorks for Chef Automate
Introduction to OpsWorks for Chef AutomateIntroduction to OpsWorks for Chef Automate
Introduction to OpsWorks for Chef Automate
Amazon Web Services
 
Announcing AWS OpsWorks for Chef Automate - January 2017 AWS Online Tech Talks
Announcing AWS OpsWorks for Chef Automate - January 2017 AWS Online Tech TalksAnnouncing AWS OpsWorks for Chef Automate - January 2017 AWS Online Tech Talks
Announcing AWS OpsWorks for Chef Automate - January 2017 AWS Online Tech Talks
Amazon Web Services
 
Learning chef
Learning chefLearning chef
Learning chef
Jonathan Carrillo
 
AWS OpsWorks for Chef Automate
AWS OpsWorks for Chef AutomateAWS OpsWorks for Chef Automate
AWS OpsWorks for Chef Automate
Amazon Web Services
 
DevOps and Chef improve your life
DevOps and Chef improve your life DevOps and Chef improve your life
DevOps and Chef improve your life
Juan Vicente Herrera Ruiz de Alejo
 
Configuration Management with AWS OpsWorks for Chef Automate
Configuration Management with AWS OpsWorks for Chef AutomateConfiguration Management with AWS OpsWorks for Chef Automate
Configuration Management with AWS OpsWorks for Chef Automate
Amazon Web Services
 
A Bit of Everything Chef
A Bit of Everything ChefA Bit of Everything Chef
A Bit of Everything Chef
Mandi Walls
 
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
Giedrius Rimkus
 
Automated DevOps Workflows with Chef on AWS
Automated DevOps Workflows with Chef on AWSAutomated DevOps Workflows with Chef on AWS
Automated DevOps Workflows with Chef on AWS
Amazon Web Services
 
Configuration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech TalksConfiguration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech Talks
Amazon Web Services
 
Chef at EIS
Chef at EISChef at EIS
Chef at EIS
carpnick
 
2015 08-11-scdo-meetup
2015 08-11-scdo-meetup2015 08-11-scdo-meetup
2015 08-11-scdo-meetup
Suresh Paulraj
 
AWS Devops
AWS DevopsAWS Devops
AWS Devops
Sivakumar Ramar
 
Infrastructure as-code-guide-en-v6 299129
Infrastructure as-code-guide-en-v6 299129Infrastructure as-code-guide-en-v6 299129
Infrastructure as-code-guide-en-v6 299129
Ai K
 

Similar to Chef (20)

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
 
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)
 
Chef for openstack
Chef for openstackChef for openstack
Chef for openstack
 
Chef for Openstack
Chef for OpenstackChef for Openstack
Chef for Openstack
 
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
 
Introduction to OpsWorks for Chef Automate
Introduction to OpsWorks for Chef AutomateIntroduction to OpsWorks for Chef Automate
Introduction to OpsWorks for Chef Automate
 
Announcing AWS OpsWorks for Chef Automate - January 2017 AWS Online Tech Talks
Announcing AWS OpsWorks for Chef Automate - January 2017 AWS Online Tech TalksAnnouncing AWS OpsWorks for Chef Automate - January 2017 AWS Online Tech Talks
Announcing AWS OpsWorks for Chef Automate - January 2017 AWS Online Tech Talks
 
Learning chef
Learning chefLearning chef
Learning chef
 
AWS OpsWorks for Chef Automate
AWS OpsWorks for Chef AutomateAWS OpsWorks for Chef Automate
AWS OpsWorks for Chef Automate
 
DevOps and Chef improve your life
DevOps and Chef improve your life DevOps and Chef improve your life
DevOps and Chef improve your life
 
Configuration Management with AWS OpsWorks for Chef Automate
Configuration Management with AWS OpsWorks for Chef AutomateConfiguration Management with AWS OpsWorks for Chef Automate
Configuration Management with AWS OpsWorks for Chef Automate
 
A Bit of Everything Chef
A Bit of Everything ChefA Bit of Everything Chef
A Bit of Everything Chef
 
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
 
Automated DevOps Workflows with Chef on AWS
Automated DevOps Workflows with Chef on AWSAutomated DevOps Workflows with Chef on AWS
Automated DevOps Workflows with Chef on AWS
 
Configuration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech TalksConfiguration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech Talks
 
Chef at EIS
Chef at EISChef at EIS
Chef at EIS
 
2015 08-11-scdo-meetup
2015 08-11-scdo-meetup2015 08-11-scdo-meetup
2015 08-11-scdo-meetup
 
AWS Devops
AWS DevopsAWS Devops
AWS Devops
 
Infrastructure as-code-guide-en-v6 299129
Infrastructure as-code-guide-en-v6 299129Infrastructure as-code-guide-en-v6 299129
Infrastructure as-code-guide-en-v6 299129
 

Recently uploaded

TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Anthony Dahanne
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Jay Das
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
Philip Schwarz
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 

Recently uploaded (20)

TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdfEnhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
Enhancing Project Management Efficiency_ Leveraging AI Tools like ChatGPT.pdf
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
A Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of PassageA Sighting of filterA in Typelevel Rite of Passage
A Sighting of filterA in Typelevel Rite of Passage
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 

Chef

  • 2. INTRO TO CHEF  Chef is a powerful automation platform that transforms complex infrastructure into code.  Chef automates how applications are configured, deployed and managed across your network.  Chef is a configuration management tool written in Ruby and Erlang languages.  It uses a pure Ruby, domain specific language for writing system configuration “recipes”.  Chef is introduced by Adam Jacob in 2009.  Chef framework was created by opscode.
  • 3. Overview of Chef  chef comes in two flavours are - Open Source Chef - Enterprise Chef includes features such as multi tenancy.  Client-Server Architecture.  Embraces modern web technologies  A system integration platform.  Programmatically provision and configure.  Reconstruct business from code repository data backup and resources.
  • 4. When to use it  Before considering Chef, make sure you’re familiar with Git, as it’s required for configuration, and Ruby, as you’ll have to be writing in it.  Chef is good for development-focused teams and environments.  It’s good for enterprises looking for a more mature solution for a heterogeneous environment.
  • 5. Chef is infrastructure as code  Programmatically provision and configure components.  Treat like any other code base  Reconstruct business from code repository, data backup, and bare metal resources.
  • 6. Configuration Management  The art of identifying, organizing and controlling modifications to the software being built by a programming tool.  We need CM because it is easy to lose track of what changes and component versions have been incorporated into each system version.
  • 7. Continuous Delivery  Continuous Delivery is a software development practice in which continuous integration, automated testing and automated deployment capabilities allow high quality software to be developed and deployed rapidly, reliably and repeatedly with minimal manual overhead.
  • 8. CHEF Components  The Chef process consists of three core components that interact with one another: Chef server, actual servers called nodes, and Chef workstation.
  • 9. Chef Server  The Chef server is as a hub for configuration data. It stores cookbooks, the policies that are applied to nodes, and metadata that describes each node managed by Chef. Nodes  Nodes use a tool called Chef client to ask the Chef server for configuration details and then applies them to itself. This process of applying changes on nodes is called a Chef run. Chef Workstation  The Chef workstation or Chef repository, shortly chef-repo, is the project structure of a Chef-managed project and it is used on a developer workstation. All Chef components are defined in it: cookbooks, environments, roles and a test suite.
  • 10. Workstation Components & Tools  Development Kit: The Chef Development Kit is a package that contains everything that is needed to start using Chef: - chef-client and ohai - chef and knife command line tools  Chef: Use the chef command-line tool to work with items in a chef-repo, which is the primary location in which cookbooks are authored, tested, and maintained, and from which policy is uploaded to the Chef server  Knife: Use the knife command-line tool to interact with nodes or work with objects on the Chef server  Chef-repo is the repository structure in which cookbooks are authored, tested, and maintained. The chef-repo should be synchronized with a version control system (such as git), and then managed as if it were source code.  Kitchen provides a test harness to execute infrastructure code on one or more platforms in isolation. It uses a driver plugin architecture.
  • 11. Cookbooks  A cookbook is the fundamental unit of configuration and policy distribution. A cookbook defines a scenario and contains everything that is required to support that scenario: - Recipes that specify the resources to use and the order in which they are to be applied - Attribute values - File distributions - Templates - Extensions to Chef, such as custom resources and libraries
  • 12. Cookbook Components  Recipe: The fundamental part of Chef, it is a collection of resources that are executed in the order to configure a node.  Resource: A cross platform abstraction of configurable parts of a node. For example these could be users, packages, files or directories.  Attributes - Represent node settings, for example hostname, versions of programming languages to install, database server etc.  Metadata: Every cookbook requires a small amount of metadata. A file named metadata.rb is located at the top of every cookbook directory structure.  Library: Library allows arbitrary Ruby code to be included in a cookbook, either as a way of extending the classes that are built-in to the chef-client.  Template: A cookbook template is an Embedded Ruby template that is used to dynamically generate static text files. It may contain Ruby expressions and statements & are a great way to manage configuration files.
  • 13. Nodes A node is any machine — physical, virtual, cloud, network device, etc. — that is under management by Chef. Types of nodes that can be managed by Chef include, the following:  Server: A physical node is any active device attached to a network that can run a chef- client and also allow that chef-client to communicate with a Chef server.  Cloud: A cloud-based node is hosted in an external cloud-based service, such as Amazon Web Services (AWS). knife can use these plugins to create instances on cloud- based services. Once created, the chef-client can be used to deploy, configure, and maintain those instances.  Container: Containers are an approach to virtualization that allows a single operating system to host many working configurations. Containers are popular as a way to manage distributed and scalable applications and services.  Network Device: A network node is any networking device—a switch, a router—that is being managed by a chef-client
  • 14. Chef on Nodes  Chef Client: A chef-client is an agent that runs locally on every node that is under management by Chef. When a chef-client is run, it will perform all of the steps that are required to bring the node into the expected state, including: - Registering and authenticating the node with the Chef server - Building the node object - Synchronizing cookbooks - Looking for exceptions and notifications, handling each as required.
  • 15. Ohai: A tool that is used to collect system configuration data called Ohai. which is provided to the chef-client for use within cookbooks. Ohai is run by chef-client at the beginning of every Chef run to determine system state. Types of attributes Ohai collects includes  Operating System  Network  Memory  Disk  CPU  Kernel  Host names  Fully qualified domain names  Virtualization  Cloud provider metadata
  • 16. Chef Server Chef server acts as a hub for configuration data. It stores cookbooks, the policies that are applied to nodes & metadata that describes each registered node that is being managed by the chef-client. Nodes use the chef-client to ask the Chef server for configuration details, such as recipes, templates & file distributions. The features of chef server are  Search indexes allow queries to be made for any type of data that is indexed by the Chef server, including data bags, environments, nodes, roles.  Chef management console is a web-based interface for the Chef server that provides users a way to manage the objects like Nodes, Cookbooks, Recipes, Roles, Stores JSON data, Environments.  A data bag is a global variable that is stored as JSON data and is accessible from a Chef server. A data bag is indexed for searching and can be loaded by a recipe or accessed during a search.
  • 17. Policy Policy maps business and operational requirements, process, and workflow to settings and objects stored on the Chef server:  Roles define server types, such as “web server” or “database server”  Environments define process, such as “dev”, “staging”, or “production”  The cookbooks & cookbook versions in which organization-specific configuration policies are maintained.  A run-list defines all of the information necessary for Chef to configure a node into the desired state. A run-list is stored as part of the node object on the Chef server.
  • 18. Overview of Chef Workflow  Chef Workflow is a tool built by Chef for Continuous Delivery of applications and infrastructure.  It provides facility for automated testing and deployment. Chef Workflow has a shared pipeline model.  Every change has to go through some predefined phases of the pipelines prior to getting released.  A pipeline is a series of automated and manual quality gates that take software changes from development to delivery. Chef Workflow pipeline is made up of 6 stages: Verify, Build, Acceptance, Union, Rehearsal and Delivered.
  • 19.  Each project has associated Verify, Build and Acceptance stages. Verify and Build stages perform tests on the source code. Union, Rehearsal & Delivered are a part of Shared Pipeline.  It includes the stages which are unique per project. A developer has control only till the “Project Pipeline”. Here you push your change, someone reviews and approves it and then the code is shipped to the Shared Pipeline.  Verify Stage: The verify stage runs automatically when someone submits a change. change. It is made up of various phases like:  Lint: Identifies stylistic problems in your source code  Syntax :Checks that the code can be parsed  Unit: Runs unit tests
  • 20. Build Stage: When a change is approved, Chef Workflow merges the change into the pipeline’s target branch and triggers the Build stage. Build stage runs lint, syntax and unit phases from Verify stage. This is because your may have moved ahead since the Verify stage ran on this change  Quality: Runs additional test suites. Some tests are too time consuming. They can be put in Build phase instead of the Verify phase  Security: Security tests as well as functional test suites can be added here  Publish: Produces the potentially releasable artifacts and makes them available for rest of the pipeline
  • 21. Acceptance Stage: Till Build stage the pipeline was analysing the source code. From the acceptance stage onwards, it starts analysing the artifact produced Build stage. As the name suggests, Acceptance is the stage where the team decides whether the change should go into production or not. There are 4 phases in Acceptance stage:  Provision: Provision infrastructure needed to test the artifacts  Deploy: Deploy the artifacts to your infrastructure  Smoke: Run smoke test. They should be short running  Functional: Run functional tests to assure that changes are meeting the business requirements
  • 22. Shared Pipeline” is automated by Chef Workflow. It runs the test cases for every stage, tests the cookbook/application by VM provisioning and if all stages are passed then the code gets merged into the desired branch.  Union Stage: A project usually doesn’t work independently. It has dependencies on several other projects too The purpose of Union stage is to analyse the impact of your change on the whole system. Here tests are performed with interactions between the interdependent projects. Phases of Union stage and the remaining stages are same: provision, deploy, smoke and functional.  Rehearsal Stage: This stage is triggered if all phases of Union stage pass. The purpose of this stage is to gain confidence in your change. It repeats the same process as of Union stage in a different environment. It’s like a pre-production environment.  Delivered Stage: It is the final stage and its definition can vary according to one’s requirements. It could mean deploying your changes and making them live, or publishing a set of artifacts for the customers.
  • 23. Chef Workflow Components  The build cookbooks reside on Chef Server which decide what happens in each phase. Each build node is registered with the chef server  It’s better to have 3 build nodes so that lint, syntax and unit phases can run in parallel.  For each deploy-able stage of chef workflow there is a web accessible server where you can verify your changes pushed through pipeline.
  • 24. How to use Chef  Download Chef Development kit (https://downloads.chef.io/chef-dk/)  Create a repo eg. chef-repo (mkdir learn-chef)  Create a folder to keep cookbooks (mkdir cookbooks)  Now create a cook book eg. (chef generate cookbook learn_chef)  Go to https://manage.chef.io/ and create a account on chef.io  Create an organization  Configure your workstation to communicate with the Chef server with knife  knife requires two files to communicate with the Chef server  Every request to the Chef server is authenticated through an RSA public key- pair. The Chef server holds the public part; you hold the private part.
  • 25. Pros  Rich collection of modules and configuration recipes.  Code-driven approach gives you more control and flexibility over your configurations.  Being centred around Git gives it strong version control capabilities.  ‘Knife’ tool (which uses SSH for deploying agents from workstation) eases installation burdens.
  • 26. Cons  The learning curve is steep if you’re not already familiar with Ruby and procedural coding.  It’s not a simple tool, which can lead to large code bases and complicated environments.  Doesn’t support push functionality.