SlideShare a Scribd company logo
1 of 39
{
Building a PaaS using
Chef
Shaun Domingo - @sdomsta
Head of Tech and Operations @ Ninefold
 An IaaS cloud provider in Sydney for 4+ years,
branched out to PaaS
 Great, powerful infrastructure
 Wanted to extend the platform by the power of
Devops
 We turned to Chef for help
Ninefold: who are we?
Why Chef? Long story, but…
Chef Puppet
•Adoption
•Announcements by Dell and Rackspace that they have
built their Openstack provisioners on top of Chef.
• Chef has a steeper learning curve for the basics but
becomes easier as you go deeper (common opinion)
•“The single biggest drawback to Chef is that it has a steeper
learning curve than Puppet. Further, most of the existing
tutorials focus on the deeper concepts in Chef rather than giving
novices quick gratification”
•Adoption
•Puppet is easier to get started with over Chef, simpler
constructs and starting point documentation.
•“It was easy to get started with Puppet, but things became more
complicated with time.“
Technical
• Databags: Chef's Data Bags are incredibly useful. They
are a very nice way to feed lists of users to multiple
cookbooks. Think of them as global variables for your
chef-server. One the benefits of data bags is that they
allow you to separate your corporate information from
your cookbooks. Thus, making it easier for Chef users to
open-source their cookbooks. Chef has encrypted
databags.
• Search function: An extremely intuitive way to tie
together dependencies between nodes, such as between a
nagios server and its clients.
• Chef uses Ruby as the configuration language
Technical
• ExtLookup: Puppet has extlookup but that is quite a bit
more limited than data bags.
• Puppet requires a third-party solution to encrypt data
such as passwords.
• Search: Puppet has a way to "export" resources but
common feeling is that it is complicated to understand
and use
• Puppet uses a custom DSL for the configuration language
Back
in
2012>>
 Community cookbooks + chef.io (originally
Opscode) growth $$$
 Developer focus
 Search, Data bags, Knife
 Ruby
Why Chef for Ninefold?
We set out to build
At times building a PaaS
felt like …
 Easy to use web interface
 SCM & workflow integration
 Logging
 Infrastructure
 Deployment / Build pipeline
 Command Line Interface
 Powerful DBaaS-like service
 Resizing / Scaling capability
 Autoscale
What to build?
Chef cookbooks and Ninefold
Management
ninefold_management
ninefold_portal
ninefold_db
ninefold_repo_builder
ninefold_server_template
cloudstack
elasticsearch
powerdns
ninefold_apt_mirror
Customer
Deployments
ninefold_app
ninefold_handlers
ninefold_logger
beaver
Chef
 Provisioning / Virtualisation
 Orchestration
 Chef Enterprise / Chef Hosted / Chef Server / Chef
Solo?
 Multi-tenancy / isolation
 Management
 Monitoring
 Customer cookbook rollouts
 Workflow
 Convergence strategy
 Contribution strategy
 Dogfooding strategy
Upfront design decisions
 Apache Cloudstack (Citrix CloudPlatform)
 knife cs plugin
 knife cs stack
Provisioning
 Chef Solo – no search > problem
 Hosted Chef – far away from Sydney (no S3
back then), customer data, another integration
point
 Chef Server – would require customers to buy
VMs for holding config about their app, or
we’d have to give it away free
 Enterprise Chef (previously Private Chef) –
multitenancy built-in
Chef setup decisions
 Responsibility of:
 data bags
 roles
 tags
 environments
 cookbook pinning
Chef design decisions
 Attributes or Data bags
 Attributes persist between chef-runs,
searchable from recipes, good for controlling
node behaviour
 Data bag is a collection of global data,
available to all nodes, searchable from
recipes, good for app-wide settings
App config persistence
 Chef organisation isolation per customer or app?
 Use environments to manage apps?
 Attributes – Node, role or environment based: OK
 Roles – cross app, generic: OK
 Cookbooks – cookbook pinning per environment: OK
 Data bags: FAIL
 We had a view to clusters of nodes
Multitenancy / Isolation
Where did we land?
Enterprise Chef
 1 org per app
 Databags store global, app configuration
 Roles provide expanded runlists
 Nodes hold information about themselves only
 Cookbooks uploaded to every chef organisation :(
 Ruby > Our forte
 Build an API
 Chef Pushy (wasn’t available back then)
 Purely github workflow?
 Build a deployment engine
 Preprovision / Just-in-time
Orchestration
Requirement Provided by Chef
Create chef org via API X
Delete chef org via API X
Update chef org via API 
Read chef org via API 
Chef organi(s|z)ation ecosystem
It’s ok, let’s
roll our own!
Chef org provisioner
bundle exec rails runner
"ChefOrganisation.ensure_minimum_available_organisations"
Blunderbuss
 Environments: Dev, SIT, Staging,
Preproduction, Production
 All managed by Chef
 Jenkins per environment triggers deployments
 Separate chef organisation per environment
Management
 Simple jenkins to deploy to production
management
Deployment
 Difficult: no search across chef organisations
 Monitoring per app
 Isolation means we couldn’t find errors quickly
 Logging was useful for tracking down errors
(e.g. how many apps were experiencing Chef
500 errors?)
Monitoring
 Initially: berkshelf package and custom ruby
orchestration
 And much later: we duck-punched / patched
chef to work in chef-solo mode for cookbook
downloads, but use Enterprise Chef at the same
time!
Customer cookbook
rollouts
Workflow
GitHub
BitBucket
Ninefold CLI
Ninefold Portal
Node 1
Node 2
Node n..
‘git push’
ninefold app
redeploy
 Nodes should discover other nodes
automagically and not require orchestration to
completely converge
 Cron-based?
 Service-based daemon?
 Externally-triggered?
 Scheduled or unscheduled?
 Auto-deploy or persist deployed git revisions
Convergence strategy
 Decisions about setting
splay interval
 Node convergence ordering
 Custom Ninefold wrapper
shell script – highlander
(there can only be one ...
chef-client!)
Convergence strategy
ramifications – cron based
 Team cookbook contributions in git
can be hard to manage
 Ensure someone is in control of
release management
 Use git flow, it works great
 The develop branch
 Master
 Cutting releases
 Metadata.rb and CHANGELOG.md
– commit at the last possible
moment
 Tagging
 Pushing out to all customers
Contribution strategy
 Recommendation: do this as much as possible
 Started with ninefold_portal cookbook
 Moved to ninefold_app cookbook
 Management / Customer diverged
Dogfooding strategy
 Everything driven from
cookbook, including scaled
RabbitMQ, HAProxy,
Logstash and ElasticSearch
Logging
[C] ,-[AMQP]
 |
[C]--[LB]---[AMQP]
/ | |
[C]/ | '-[AMQP]
|
[LS]---[ES]---
[PORTAL]
[ES]
[ES]
Community Cookbooks /
Chef Supermarket
Opensource Cookbook
Maintenance
OS Cookbooks
Use Github to your advantage …
The more commits, the better.
Wrapper cookbooks
your
wrapper cookbook
database
application
nginx
apache
unicorn
apache2
passenger_apache2
runit
logrotate
 Break down cookbooks into small manageable
chunks that can be swapped in and not
 Use a cookbook dependency management tool
 Use berkshelf. It’s good, and comes out of the
box with Chef DK
Cookbook Dependencies
knife plugins
Plug-in Logic
Plug-in Version
.erb file used as template for
KB config
Use bundler to maintain
dependencies
It’s easy to write a knife
plug-in - ninefold-internal
After 3 years of heavy chef use, these are our
thoughts:
 + Positives
 Setting up single-tenant, multi-node clusters
 Community cookbooks via supermarket
 Highly customisable – it’s just ruby
 Powerful management console and supporting
tools
 API
 Lots of people love and embrace chef, vibrant
community, mailing lists, IRC and more.
Lessons learned
 - Not as positive
 Multi-node orchestration, although tools like Chef
Delivery, using machine resource look promising
 Large learning curve: our customers didn’t want to
know about it, too hard, I’ll get around to it in the
future
 Spinning up nodes takes too long – containers are
better at this, auto scale is best achieved in seconds, not
minutes
 Powerful features like search only available with Chef
Server
 Idempotency is great, but it is also slow
 Chef-client will be as slow as the executables and
systems behind it
Lessons learned cont…
 @sdomsta / @ninefold
 Deploy a server via
Portal or API in
Australia today
 We want to talk chef,
containers, devops with
people. Drop me a line!
 We’re hiring: Operations
Support Engineer
Deploy on Ninefold!

More Related Content

What's hot

Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Chef
 
Learn How Selenium And Jenkins Fit In DevOps | Edureka Live
Learn How Selenium And Jenkins Fit In DevOps | Edureka LiveLearn How Selenium And Jenkins Fit In DevOps | Edureka Live
Learn How Selenium And Jenkins Fit In DevOps | Edureka LiveEdureka!
 
Automating Infrastructure with Chef
Automating Infrastructure with ChefAutomating Infrastructure with Chef
Automating Infrastructure with ChefJennifer Davis
 
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.
 
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.
 
(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization
(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization
(DVO314) USA Today Uses Chef & AWS for Infrastructure StandardizationAmazon Web Services
 
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
 
Chef Tutorial | Chef Tutorial For Beginners | DevOps Chef Tutorial | DevOps T...
Chef Tutorial | Chef Tutorial For Beginners | DevOps Chef Tutorial | DevOps T...Chef Tutorial | Chef Tutorial For Beginners | DevOps Chef Tutorial | DevOps T...
Chef Tutorial | Chef Tutorial For Beginners | DevOps Chef Tutorial | DevOps T...Simplilearn
 
Chef-Zero & Local Mode
Chef-Zero & Local ModeChef-Zero & Local Mode
Chef-Zero & Local ModeMichael Goetz
 
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 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!
 
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
 
Getting started with Chef
Getting started with ChefGetting started with Chef
Getting started with ChefEdureka!
 
Habitat Managed Chef
Habitat Managed ChefHabitat Managed Chef
Habitat Managed ChefChef
 

What's hot (20)

Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1
 
Learn How Selenium And Jenkins Fit In DevOps | Edureka Live
Learn How Selenium And Jenkins Fit In DevOps | Edureka LiveLearn How Selenium And Jenkins Fit In DevOps | Edureka Live
Learn How Selenium And Jenkins Fit In DevOps | Edureka Live
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
Automating Infrastructure with Chef
Automating Infrastructure with ChefAutomating Infrastructure with Chef
Automating Infrastructure with Chef
 
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
 
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
 
Chef: Smart infrastructure automation
Chef: Smart infrastructure automationChef: Smart infrastructure automation
Chef: Smart infrastructure automation
 
Building JavaScript
Building JavaScriptBuilding JavaScript
Building JavaScript
 
Chef fundamentals
Chef fundamentalsChef fundamentals
Chef fundamentals
 
Learning chef
Learning chefLearning chef
Learning chef
 
(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization
(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization
(DVO314) USA Today Uses Chef & AWS for Infrastructure Standardization
 
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
 
Chef Tutorial | Chef Tutorial For Beginners | DevOps Chef Tutorial | DevOps T...
Chef Tutorial | Chef Tutorial For Beginners | DevOps Chef Tutorial | DevOps T...Chef Tutorial | Chef Tutorial For Beginners | DevOps Chef Tutorial | DevOps T...
Chef Tutorial | Chef Tutorial For Beginners | DevOps Chef Tutorial | DevOps T...
 
Chef-Zero & Local Mode
Chef-Zero & Local ModeChef-Zero & Local Mode
Chef-Zero & Local Mode
 
Server Installation and Configuration with Chef
Server Installation and Configuration with ChefServer Installation and Configuration with Chef
Server Installation and Configuration with Chef
 
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...
 
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 introduction
Chef introductionChef introduction
Chef introduction
 
Getting started with Chef
Getting started with ChefGetting started with Chef
Getting started with Chef
 
Habitat Managed Chef
Habitat Managed ChefHabitat Managed Chef
Habitat Managed Chef
 

Similar to Building a PaaS using Chef

Automating your infrastructure with Chef
Automating your infrastructure with ChefAutomating your infrastructure with Chef
Automating your infrastructure with ChefJohn Ewart
 
2015 08-11-scdo-meetup
2015 08-11-scdo-meetup2015 08-11-scdo-meetup
2015 08-11-scdo-meetupSuresh Paulraj
 
Consistent Development Environment using Vagrant and Chef
Consistent Development Environment using Vagrant and ChefConsistent Development Environment using Vagrant and Chef
Consistent Development Environment using Vagrant and ChefGerald Villorente
 
Chef onlinuxonpower
Chef onlinuxonpowerChef onlinuxonpower
Chef onlinuxonpowerMoya Brannan
 
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
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2Docker, Inc.
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...Evans Ye
 
Chef for Openstack
Chef for OpenstackChef for Openstack
Chef for OpenstackMohit Sethi
 
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015Chris Jang
 
Picnic Software - Developing a flexible and scalable application
Picnic Software - Developing a flexible and scalable applicationPicnic Software - Developing a flexible and scalable application
Picnic Software - Developing a flexible and scalable applicationNick Josevski
 
Sonian, Open Source and Sensu
Sonian, Open Source and SensuSonian, Open Source and Sensu
Sonian, Open Source and SensuPete Cheslock
 
CICD_BestPractices.pdf
CICD_BestPractices.pdfCICD_BestPractices.pdf
CICD_BestPractices.pdfmotupalli2
 
Edureka-DevOps-Ebook.pdf
Edureka-DevOps-Ebook.pdfEdureka-DevOps-Ebook.pdf
Edureka-DevOps-Ebook.pdfrelekarsushant
 
MongoDB Ops Manager and Kubernetes - James Broadhead
MongoDB Ops Manager and Kubernetes - James BroadheadMongoDB Ops Manager and Kubernetes - James Broadhead
MongoDB Ops Manager and Kubernetes - James BroadheadMongoDB
 
Kubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetupKubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetupMist.io
 

Similar to Building a PaaS using Chef (20)

Automating your infrastructure with Chef
Automating your infrastructure with ChefAutomating your infrastructure with Chef
Automating your infrastructure with Chef
 
2015 08-11-scdo-meetup
2015 08-11-scdo-meetup2015 08-11-scdo-meetup
2015 08-11-scdo-meetup
 
Consistent Development Environment using Vagrant and Chef
Consistent Development Environment using Vagrant and ChefConsistent Development Environment using Vagrant and Chef
Consistent Development Environment using Vagrant and Chef
 
Chef onlinuxonpower
Chef onlinuxonpowerChef onlinuxonpower
Chef onlinuxonpower
 
DevOps demystified
DevOps demystifiedDevOps demystified
DevOps demystified
 
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
 
DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2DockerCon 15 Keynote - Day 2
DockerCon 15 Keynote - Day 2
 
How bigtop leveraged docker for build automation and one click hadoop provis...
How bigtop leveraged docker for build automation and  one click hadoop provis...How bigtop leveraged docker for build automation and  one click hadoop provis...
How bigtop leveraged docker for build automation and one click hadoop provis...
 
DevOps and Chef improve your life
DevOps and Chef improve your life DevOps and Chef improve your life
DevOps and Chef improve your life
 
Chef for openstack
Chef for openstackChef for openstack
Chef for openstack
 
Chef for Openstack
Chef for OpenstackChef for Openstack
Chef for Openstack
 
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
Google Tech Talk with Dr. Eric Brewer in Korea Apr.27.2015
 
Picnic Software - Developing a flexible and scalable application
Picnic Software - Developing a flexible and scalable applicationPicnic Software - Developing a flexible and scalable application
Picnic Software - Developing a flexible and scalable application
 
Sonian, Open Source and Sensu
Sonian, Open Source and SensuSonian, Open Source and Sensu
Sonian, Open Source and Sensu
 
DevOps-Ebook
DevOps-EbookDevOps-Ebook
DevOps-Ebook
 
CICD_BestPractices.pdf
CICD_BestPractices.pdfCICD_BestPractices.pdf
CICD_BestPractices.pdf
 
Edureka-DevOps-Ebook.pdf
Edureka-DevOps-Ebook.pdfEdureka-DevOps-Ebook.pdf
Edureka-DevOps-Ebook.pdf
 
Chef
ChefChef
Chef
 
MongoDB Ops Manager and Kubernetes - James Broadhead
MongoDB Ops Manager and Kubernetes - James BroadheadMongoDB Ops Manager and Kubernetes - James Broadhead
MongoDB Ops Manager and Kubernetes - James Broadhead
 
Kubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetupKubernetes and CoreOS @ Athens Docker meetup
Kubernetes and CoreOS @ Athens Docker meetup
 

Recently uploaded

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptxLBM Solutions
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphNeo4j
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetEnjoy Anytime
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?XfilesPro
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 

Recently uploaded (20)

Key Features Of Token Development (1).pptx
Key  Features Of Token  Development (1).pptxKey  Features Of Token  Development (1).pptx
Key Features Of Token Development (1).pptx
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge GraphSIEMENS: RAPUNZEL – A Tale About Knowledge Graph
SIEMENS: RAPUNZEL – A Tale About Knowledge Graph
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your BudgetHyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
Hyderabad Call Girls Khairatabad ✨ 7001305949 ✨ Cheap Price Your Budget
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?How to Remove Document Management Hurdles with X-Docs?
How to Remove Document Management Hurdles with X-Docs?
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 

Building a PaaS using Chef

  • 1. { Building a PaaS using Chef Shaun Domingo - @sdomsta Head of Tech and Operations @ Ninefold
  • 2.  An IaaS cloud provider in Sydney for 4+ years, branched out to PaaS  Great, powerful infrastructure  Wanted to extend the platform by the power of Devops  We turned to Chef for help Ninefold: who are we?
  • 3. Why Chef? Long story, but… Chef Puppet •Adoption •Announcements by Dell and Rackspace that they have built their Openstack provisioners on top of Chef. • Chef has a steeper learning curve for the basics but becomes easier as you go deeper (common opinion) •“The single biggest drawback to Chef is that it has a steeper learning curve than Puppet. Further, most of the existing tutorials focus on the deeper concepts in Chef rather than giving novices quick gratification” •Adoption •Puppet is easier to get started with over Chef, simpler constructs and starting point documentation. •“It was easy to get started with Puppet, but things became more complicated with time.“ Technical • Databags: Chef's Data Bags are incredibly useful. They are a very nice way to feed lists of users to multiple cookbooks. Think of them as global variables for your chef-server. One the benefits of data bags is that they allow you to separate your corporate information from your cookbooks. Thus, making it easier for Chef users to open-source their cookbooks. Chef has encrypted databags. • Search function: An extremely intuitive way to tie together dependencies between nodes, such as between a nagios server and its clients. • Chef uses Ruby as the configuration language Technical • ExtLookup: Puppet has extlookup but that is quite a bit more limited than data bags. • Puppet requires a third-party solution to encrypt data such as passwords. • Search: Puppet has a way to "export" resources but common feeling is that it is complicated to understand and use • Puppet uses a custom DSL for the configuration language Back in 2012>>
  • 4.  Community cookbooks + chef.io (originally Opscode) growth $$$  Developer focus  Search, Data bags, Knife  Ruby Why Chef for Ninefold?
  • 5. We set out to build
  • 6. At times building a PaaS felt like …
  • 7.  Easy to use web interface  SCM & workflow integration  Logging  Infrastructure  Deployment / Build pipeline  Command Line Interface  Powerful DBaaS-like service  Resizing / Scaling capability  Autoscale What to build?
  • 8. Chef cookbooks and Ninefold Management ninefold_management ninefold_portal ninefold_db ninefold_repo_builder ninefold_server_template cloudstack elasticsearch powerdns ninefold_apt_mirror Customer Deployments ninefold_app ninefold_handlers ninefold_logger beaver Chef
  • 9.  Provisioning / Virtualisation  Orchestration  Chef Enterprise / Chef Hosted / Chef Server / Chef Solo?  Multi-tenancy / isolation  Management  Monitoring  Customer cookbook rollouts  Workflow  Convergence strategy  Contribution strategy  Dogfooding strategy Upfront design decisions
  • 10.  Apache Cloudstack (Citrix CloudPlatform)  knife cs plugin  knife cs stack Provisioning
  • 11.  Chef Solo – no search > problem  Hosted Chef – far away from Sydney (no S3 back then), customer data, another integration point  Chef Server – would require customers to buy VMs for holding config about their app, or we’d have to give it away free  Enterprise Chef (previously Private Chef) – multitenancy built-in Chef setup decisions
  • 12.  Responsibility of:  data bags  roles  tags  environments  cookbook pinning Chef design decisions
  • 13.  Attributes or Data bags  Attributes persist between chef-runs, searchable from recipes, good for controlling node behaviour  Data bag is a collection of global data, available to all nodes, searchable from recipes, good for app-wide settings App config persistence
  • 14.  Chef organisation isolation per customer or app?  Use environments to manage apps?  Attributes – Node, role or environment based: OK  Roles – cross app, generic: OK  Cookbooks – cookbook pinning per environment: OK  Data bags: FAIL  We had a view to clusters of nodes Multitenancy / Isolation
  • 15. Where did we land? Enterprise Chef  1 org per app  Databags store global, app configuration  Roles provide expanded runlists  Nodes hold information about themselves only  Cookbooks uploaded to every chef organisation :(
  • 16.  Ruby > Our forte  Build an API  Chef Pushy (wasn’t available back then)  Purely github workflow?  Build a deployment engine  Preprovision / Just-in-time Orchestration
  • 17. Requirement Provided by Chef Create chef org via API X Delete chef org via API X Update chef org via API  Read chef org via API  Chef organi(s|z)ation ecosystem It’s ok, let’s roll our own!
  • 18. Chef org provisioner bundle exec rails runner "ChefOrganisation.ensure_minimum_available_organisations"
  • 20.  Environments: Dev, SIT, Staging, Preproduction, Production  All managed by Chef  Jenkins per environment triggers deployments  Separate chef organisation per environment Management
  • 21.  Simple jenkins to deploy to production management Deployment
  • 22.  Difficult: no search across chef organisations  Monitoring per app  Isolation means we couldn’t find errors quickly  Logging was useful for tracking down errors (e.g. how many apps were experiencing Chef 500 errors?) Monitoring
  • 23.  Initially: berkshelf package and custom ruby orchestration  And much later: we duck-punched / patched chef to work in chef-solo mode for cookbook downloads, but use Enterprise Chef at the same time! Customer cookbook rollouts
  • 24. Workflow GitHub BitBucket Ninefold CLI Ninefold Portal Node 1 Node 2 Node n.. ‘git push’ ninefold app redeploy
  • 25.  Nodes should discover other nodes automagically and not require orchestration to completely converge  Cron-based?  Service-based daemon?  Externally-triggered?  Scheduled or unscheduled?  Auto-deploy or persist deployed git revisions Convergence strategy
  • 26.  Decisions about setting splay interval  Node convergence ordering  Custom Ninefold wrapper shell script – highlander (there can only be one ... chef-client!) Convergence strategy ramifications – cron based
  • 27.  Team cookbook contributions in git can be hard to manage  Ensure someone is in control of release management  Use git flow, it works great  The develop branch  Master  Cutting releases  Metadata.rb and CHANGELOG.md – commit at the last possible moment  Tagging  Pushing out to all customers Contribution strategy
  • 28.  Recommendation: do this as much as possible  Started with ninefold_portal cookbook  Moved to ninefold_app cookbook  Management / Customer diverged Dogfooding strategy
  • 29.  Everything driven from cookbook, including scaled RabbitMQ, HAProxy, Logstash and ElasticSearch Logging [C] ,-[AMQP] | [C]--[LB]---[AMQP] / | | [C]/ | '-[AMQP] | [LS]---[ES]--- [PORTAL] [ES] [ES]
  • 32. OS Cookbooks Use Github to your advantage … The more commits, the better.
  • 34.  Break down cookbooks into small manageable chunks that can be swapped in and not  Use a cookbook dependency management tool  Use berkshelf. It’s good, and comes out of the box with Chef DK Cookbook Dependencies
  • 36. Plug-in Logic Plug-in Version .erb file used as template for KB config Use bundler to maintain dependencies It’s easy to write a knife plug-in - ninefold-internal
  • 37. After 3 years of heavy chef use, these are our thoughts:  + Positives  Setting up single-tenant, multi-node clusters  Community cookbooks via supermarket  Highly customisable – it’s just ruby  Powerful management console and supporting tools  API  Lots of people love and embrace chef, vibrant community, mailing lists, IRC and more. Lessons learned
  • 38.  - Not as positive  Multi-node orchestration, although tools like Chef Delivery, using machine resource look promising  Large learning curve: our customers didn’t want to know about it, too hard, I’ll get around to it in the future  Spinning up nodes takes too long – containers are better at this, auto scale is best achieved in seconds, not minutes  Powerful features like search only available with Chef Server  Idempotency is great, but it is also slow  Chef-client will be as slow as the executables and systems behind it Lessons learned cont…
  • 39.  @sdomsta / @ninefold  Deploy a server via Portal or API in Australia today  We want to talk chef, containers, devops with people. Drop me a line!  We’re hiring: Operations Support Engineer Deploy on Ninefold!

Editor's Notes

  1. Initially: custom ruby orchestration: berkshelf package, download cookbooks into a directory, knife cookbook upload all cookbooks into every chef organisation
  2. In the case of a Master PostgreSQL database, configuring slaves requires two passes and requires a data bag item to act as the semaphore. Use rapid mode until the total time since our first convergence has passed exceeds the quick period, or sustain rapid mode if there are errors.
  3. Splay interval needed to be identical across nodes in the cluster.