SlideShare a Scribd company logo
habitat at docker bud
Mandi Walls
Technical Community Manager for EMEA
@lnxchk
mandi@chef.io
#habitatsh
http://slack.habitat.sh/
Ian Henry @Eeyun___ Habitat Community lead
Cloud Native Operations with Habitat
Habitat
Supervisor
Habitat Builder
BUILD DEPLOY MANAGE
Habitat
Supervisor
PUBLIC
ORIGIN
PRIVATE
ORIGIN
How Do We Run Applications?
‱ On a computer
‱ With an OS
‱ And some libraries
‱ And some configuration
‱ And some way to start it and stop it
We’ve been moving complexity
around rather than reducing it
Ugh.
So. Habitat.
‱ Ignore the underlying platform as much as possible
‱ Support microservices
‱ Manage container creep
‱ Make your workflow smoother
https://www.bonanza.com/listings/Premier-Food-Storage-Containers-20-Piece-Set-Grey/443972348
Stage 1: Build on Local
What Habitat Gets Your Developers
‱ Do clean room builds
‱ Build repetition
‱ Get the exact versions of libraries you need, not
whatever is on the OS
‱ Build once and run in dev/test/prod on whatever
platform
What Habitat Gets Your Operators
‱ Defer some decisions to runtime
‱ Distro agnostic packaging system
‱ Service runtime and discovery
‱ Configuration exposed via API
‱ Signed packages for your organization
Builder Package Registry
Building Your Own Apps
‱ Build your apps from source
‱ Include libraries and runtime as source or binaries
‱ Habitat team and community publish hundreds of
packages
‱ Get the newest (or oldest!?!) versions of libraries
you need
‱ Specify the same build process using standard
tools
Leave it to Builder
‱ Gives you a build service
‱ And an artifact store
‱ Including private repos
‱ Check code in to GitHub,
let Builder create your
artifact
CLOUD/INFRA
BUILDSERVICE
APPLICATION RUNTIME
APPLICATIONSUPERVISION
APPLICATION & DATA SERVICES
SCHEDULING AND ORCHESTRATION
APPLICATION CODE
ARTIFACTSTORE
Hook Your GitHub Repo to Builder
‱ Add habitat files to your repo
‱ Hook the Habitat app to your repo
‱ Builder can take care of building your Habitat
artifacts and also integrates to Docker Hub
Container Integrations
Habitat Files Travel with the App Code
Have a Plan
pkg_name=container_sched_backend
pkg_origin=lnxchk pkg_version="0.1.0" pkg_build_deps=(core/rust)
pkg_deps=(core/glibc core/gcc core/gcc-libs)
pkg_bin_dirs=(bin)
bin="container_sched_backend"
pkg_exports=([out]=cfg.out)
do_build() {
cargo build
}
do_install() {
install -v -D "$PLAN_CONTEXT/../target/debug/$bin"  "$pkg_prefix/bin/$bin”
}
pkg_svc_run="$bin"
Metadata
Build
Install
Run
Habitat Builder
‱ Build services including private repos!
‱ You can share plans with the Depot, and other hab
users share theirs
‱ Has team namespacing
‱ The core plans are those built by the Habitat team
‱ https://bldr.habitat.sh/
Build Output
‱ By default, it’s a hart – a compressed tarball with
some metadata and a signature
‱ You can export to other formats, like Docker
containers
‱ The hart itself it runnable
Updating Configuration at Runtime
‱ Update all or part of the configuration while the
apps are running
‱ Send the update to a member of the mesh and they
will all update
sudo hab config apply --peer 172.31.2.123
container_sched_backend.stage 2 new.toml
Shortcut for common platforms: Scaffolding
‱ Default core-built dependencies for common
runtimes
‱ Ruby and Node so farpkg_name=MY_APP
pkg_origin=MY_ORIGIN
pkg_version=MY_VERSION
pkg_scaffolding=core/scaffolding-ruby
https://www.habitat.sh/docs/concepts-scaffolding/
Builder Demo
‱ Training app in node
‱ Repository in Github
Make changes on gh or using regular push
‱ Linked to Builder for creation of habitat artifacts
‱ Export to Docker Hub
‱ Run Docker container on CentOS and Ubuntu
‱ Run hart natively
Join Us!
‱ On Slack!
http://slack.habitat.sh
‱ Online! With Tutorials!
https://www.habitat.sh/
‱ On Github!
https://github.com/habitat-sh
New Stuff
‱ Updates from KubeCon
https://blog.chef.io/2018/05/02/product-updates-habitat-
goes-to-kubecon-eu/
‱ Azure Deployments with Habitat, ACR and AKS
https://blog.chef.io/2018/05/07/deploy-your-applications-to-
azure-using-habitat-azure-container-registry-and-azure-
container-service/
‱ These Slides
https://www.slideshare.net/lnxchk/habitat-at-docker-bud
Slide parking lot
Other unused slides
Application Configuration File: TOML
[myconfig]
out = "{{cfg.out}}"
color = "{{cfg.color}}"
{{~# if svc.me.leader ~}}
leader = true
{{ else }}
leader = false
{{/if ~}}
Runtime
‱ The hab runtime includes management, service
discovery, other features
‱ The habs in your application create a mesh so they
can talk to each other
‱ You can even update your application via the mesh
without restarting every application manually
Running a Hart
sudo hab start lnxchk/container_sched_backend
--peer 172.31.13.250 --topology leader
‱ The same hart runs on multiple distros – no need for other
packages
‱ Once hooked together, the supervisors will have a leader
election
‱ If instances move in or out of the mesh, a new election will
occur after a timeout
‱ Updates are persistent and stored in metadata on the hosts
/hab/data/services
Caveat - Internet
‱ You can build your own stuff inside your own
network, sort of, when it’s all on one machine
‱ There may eventually be a private depot server
‱ For now, hab and its components need internet
access
Configuration
‱ Can be manipulated at runtime
‱ Also travels with the app
‱ Templating engine included
Set Defaults in Habitat – default.toml
leader = false
out = "out"
color = "green”
[tomltable]
var = “val”

More Related Content

PDF
ConcourseCi overview
PDF
Bosh 2-0-reloaded
PDF
ConcourseCi Dockerimage
PDF
Concourse updates
PPTX
London Community Summit - Habitat 2016
PDF
Auto-scaled Concourse CI on AWS w/o BOSH
PPTX
GitHub Actions - Melbourne UG
PPTX
Package Management on Windows with Chocolatey
 
ConcourseCi overview
Bosh 2-0-reloaded
ConcourseCi Dockerimage
Concourse updates
London Community Summit - Habitat 2016
Auto-scaled Concourse CI on AWS w/o BOSH
GitHub Actions - Melbourne UG
Package Management on Windows with Chocolatey
 

What's hot (20)

PDF
Git 101: Git and GitHub for Beginners
PDF
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
PDF
Teaching a Designer to Use GitHub
PDF
Gitlab ci e kubernetes, build test and deploy your projects like a pro
PDF
How Ansible Makes Automation Easy
PPT
Introduction to Git and Github
PDF
Nike pop up habitat
 
PDF
Automated Deployment and Configuration Engines. Ansible
PDF
Taking Spinnaker for a spin @ London DevOps Meetup 36
PDF
Git Started With Git
PDF
ConcourseCI love Minio
PPTX
Git 101
PPTX
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire
PDF
OpenShift, Docker, Kubernetes: The next generation of PaaS
PDF
Git real slides
PDF
Built in ci-cd with kubernetes, jenkins and helm
PDF
Git - An Introduction
PDF
Intro to Git for Drupal 7
PDF
Docker tips
PPTX
ASP.NET 5 auf Raspberry PI & docker
Git 101: Git and GitHub for Beginners
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Teaching a Designer to Use GitHub
Gitlab ci e kubernetes, build test and deploy your projects like a pro
How Ansible Makes Automation Easy
Introduction to Git and Github
Nike pop up habitat
 
Automated Deployment and Configuration Engines. Ansible
Taking Spinnaker for a spin @ London DevOps Meetup 36
Git Started With Git
ConcourseCI love Minio
Git 101
Introduction to dockerfile, SF Peninsula Software Development Meetup @Guidewire
OpenShift, Docker, Kubernetes: The next generation of PaaS
Git real slides
Built in ci-cd with kubernetes, jenkins and helm
Git - An Introduction
Intro to Git for Drupal 7
Docker tips
ASP.NET 5 auf Raspberry PI & docker
Ad

Similar to habitat at docker bud (20)

PPTX
Habitat at LinuxLab IT
PDF
Habitat at SRECon
PPTX
Containerdays Intro to Habitat
PPTX
Habitat Workshop at Velocity London 2017
PPTX
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
PPTX
Habitat Overview
PPTX
Creating Packages that Run Anywhere with Chef Habitat
PDF
DevOps LA Meetup Intro to Habitat
PPTX
Containers, Habitat and Orchestration - Infracoders Meetup Graz
PDF
ContainerDays NYC 2016: "Introduction to Application Automation with Habitat"...
PDF
Habitat hack slides - Infracoders Meetup Graz
PDF
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
PDF
DevOpsDays Singapore Habitat Ignite
PDF
Habitat & Amazon's ECS
PPTX
SoCal DevOps Meetup 1/26/2017 - Habitat by Chef
PPTX
Habitat Managed Chef
 
PPTX
London Community Summit 2016 - Habitat
 
PDF
DevOps Sydney- Building Better Containers with Habitat
PPTX
Habitat for Reals
PDF
Wellington DevOps: Bringing Your Applications into the Future with Habitat
Habitat at LinuxLab IT
Habitat at SRECon
Containerdays Intro to Habitat
Habitat Workshop at Velocity London 2017
Habitat talk at CodeMonsters Sofia, Bulgaria Nov 27 2018
Habitat Overview
Creating Packages that Run Anywhere with Chef Habitat
DevOps LA Meetup Intro to Habitat
Containers, Habitat and Orchestration - Infracoders Meetup Graz
ContainerDays NYC 2016: "Introduction to Application Automation with Habitat"...
Habitat hack slides - Infracoders Meetup Graz
DevOps Talks Melbourne 2018: Whales, Cats and Kubernetes
DevOpsDays Singapore Habitat Ignite
Habitat & Amazon's ECS
SoCal DevOps Meetup 1/26/2017 - Habitat by Chef
Habitat Managed Chef
 
London Community Summit 2016 - Habitat
 
DevOps Sydney- Building Better Containers with Habitat
Habitat for Reals
Wellington DevOps: Bringing Your Applications into the Future with Habitat
Ad

More from Mandi Walls (20)

PDF
DOD Raleigh Gamedays with Chaos Engineering.pdf
PDF
Addo reducing trauma in organizations with SLOs and chaos engineering
PDF
Full Service Ownership
PDF
PagerDuty: Best Practices for On Call Teams
PPTX
InSpec at DevOps ATL Meetup January 22, 2020
PPTX
Prescriptive Security with InSpec - All Things Open 2019
PPTX
Using Chef InSpec for Infrastructure Security
PPTX
Adding Security to Your Workflow With InSpec - SCaLE17x
PPTX
BuildStuff.LT 2018 InSpec Workshop
PPTX
InSpec Workshop at Velocity London 2018
PPTX
DevOpsDays InSpec Workshop
PPTX
Adding Security and Compliance to Your Workflow with InSpec
PPTX
InSpec - June 2018 at Open28.be
PPTX
Ingite Slides for InSpec
PPTX
InSpec Workshop DevSecCon 2017
PPTX
InSpec Workflow for DevOpsDays Riga 2017
PPTX
InSpec For DevOpsDays Amsterdam 2017
PPTX
Adding Security to Your Workflow with InSpec (MAY 2017)
PPTX
Configuration Management is Old and Boring
PPTX
Lessons Learned From Cloud Migrations
DOD Raleigh Gamedays with Chaos Engineering.pdf
Addo reducing trauma in organizations with SLOs and chaos engineering
Full Service Ownership
PagerDuty: Best Practices for On Call Teams
InSpec at DevOps ATL Meetup January 22, 2020
Prescriptive Security with InSpec - All Things Open 2019
Using Chef InSpec for Infrastructure Security
Adding Security to Your Workflow With InSpec - SCaLE17x
BuildStuff.LT 2018 InSpec Workshop
InSpec Workshop at Velocity London 2018
DevOpsDays InSpec Workshop
Adding Security and Compliance to Your Workflow with InSpec
InSpec - June 2018 at Open28.be
Ingite Slides for InSpec
InSpec Workshop DevSecCon 2017
InSpec Workflow for DevOpsDays Riga 2017
InSpec For DevOpsDays Amsterdam 2017
Adding Security to Your Workflow with InSpec (MAY 2017)
Configuration Management is Old and Boring
Lessons Learned From Cloud Migrations

Recently uploaded (20)

PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 41
PPTX
history of c programming in notes for students .pptx
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
How Creative Agencies Leverage Project Management Software.pdf
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PDF
Understanding Forklifts - TECH EHS Solution
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
Softaken Excel to vCard Converter Software.pdf
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
 
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
top salesforce developer skills in 2025.pdf
PDF
Wondershare Filmora 15 Crack With Activation Key [2025
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
Introduction to Artificial Intelligence
PPT
Introduction Database Management System for Course Database
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Digital Strategies for Manufacturing Companies
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Internet Downloader Manager (IDM) Crack 6.42 Build 41
history of c programming in notes for students .pptx
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
How Creative Agencies Leverage Project Management Software.pdf
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Understanding Forklifts - TECH EHS Solution
CHAPTER 2 - PM Management and IT Context
Softaken Excel to vCard Converter Software.pdf
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
 
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
top salesforce developer skills in 2025.pdf
Wondershare Filmora 15 Crack With Activation Key [2025
Operating system designcfffgfgggggggvggggggggg
Introduction to Artificial Intelligence
Introduction Database Management System for Course Database
Navsoft: AI-Powered Business Solutions & Custom Software Development
Digital Strategies for Manufacturing Companies
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus

habitat at docker bud

  • 2. Mandi Walls Technical Community Manager for EMEA @lnxchk mandi@chef.io #habitatsh http://slack.habitat.sh/ Ian Henry @Eeyun___ Habitat Community lead
  • 3. Cloud Native Operations with Habitat Habitat Supervisor Habitat Builder BUILD DEPLOY MANAGE Habitat Supervisor PUBLIC ORIGIN PRIVATE ORIGIN
  • 4. How Do We Run Applications? ‱ On a computer ‱ With an OS ‱ And some libraries ‱ And some configuration ‱ And some way to start it and stop it
  • 5. We’ve been moving complexity around rather than reducing it
  • 7. So. Habitat. ‱ Ignore the underlying platform as much as possible ‱ Support microservices ‱ Manage container creep ‱ Make your workflow smoother https://www.bonanza.com/listings/Premier-Food-Storage-Containers-20-Piece-Set-Grey/443972348
  • 8. Stage 1: Build on Local
  • 9. What Habitat Gets Your Developers ‱ Do clean room builds ‱ Build repetition ‱ Get the exact versions of libraries you need, not whatever is on the OS ‱ Build once and run in dev/test/prod on whatever platform
  • 10. What Habitat Gets Your Operators ‱ Defer some decisions to runtime ‱ Distro agnostic packaging system ‱ Service runtime and discovery ‱ Configuration exposed via API ‱ Signed packages for your organization
  • 12. Building Your Own Apps ‱ Build your apps from source ‱ Include libraries and runtime as source or binaries ‱ Habitat team and community publish hundreds of packages ‱ Get the newest (or oldest!?!) versions of libraries you need ‱ Specify the same build process using standard tools
  • 13. Leave it to Builder ‱ Gives you a build service ‱ And an artifact store ‱ Including private repos ‱ Check code in to GitHub, let Builder create your artifact CLOUD/INFRA BUILDSERVICE APPLICATION RUNTIME APPLICATIONSUPERVISION APPLICATION & DATA SERVICES SCHEDULING AND ORCHESTRATION APPLICATION CODE ARTIFACTSTORE
  • 14. Hook Your GitHub Repo to Builder ‱ Add habitat files to your repo ‱ Hook the Habitat app to your repo ‱ Builder can take care of building your Habitat artifacts and also integrates to Docker Hub
  • 16. Habitat Files Travel with the App Code
  • 17. Have a Plan pkg_name=container_sched_backend pkg_origin=lnxchk pkg_version="0.1.0" pkg_build_deps=(core/rust) pkg_deps=(core/glibc core/gcc core/gcc-libs) pkg_bin_dirs=(bin) bin="container_sched_backend" pkg_exports=([out]=cfg.out) do_build() { cargo build } do_install() { install -v -D "$PLAN_CONTEXT/../target/debug/$bin" "$pkg_prefix/bin/$bin” } pkg_svc_run="$bin" Metadata Build Install Run
  • 18. Habitat Builder ‱ Build services including private repos! ‱ You can share plans with the Depot, and other hab users share theirs ‱ Has team namespacing ‱ The core plans are those built by the Habitat team ‱ https://bldr.habitat.sh/
  • 19. Build Output ‱ By default, it’s a hart – a compressed tarball with some metadata and a signature ‱ You can export to other formats, like Docker containers ‱ The hart itself it runnable
  • 20. Updating Configuration at Runtime ‱ Update all or part of the configuration while the apps are running ‱ Send the update to a member of the mesh and they will all update sudo hab config apply --peer 172.31.2.123 container_sched_backend.stage 2 new.toml
  • 21. Shortcut for common platforms: Scaffolding ‱ Default core-built dependencies for common runtimes ‱ Ruby and Node so farpkg_name=MY_APP pkg_origin=MY_ORIGIN pkg_version=MY_VERSION pkg_scaffolding=core/scaffolding-ruby https://www.habitat.sh/docs/concepts-scaffolding/
  • 22. Builder Demo ‱ Training app in node ‱ Repository in Github Make changes on gh or using regular push ‱ Linked to Builder for creation of habitat artifacts ‱ Export to Docker Hub ‱ Run Docker container on CentOS and Ubuntu ‱ Run hart natively
  • 23. Join Us! ‱ On Slack! http://slack.habitat.sh ‱ Online! With Tutorials! https://www.habitat.sh/ ‱ On Github! https://github.com/habitat-sh
  • 24. New Stuff ‱ Updates from KubeCon https://blog.chef.io/2018/05/02/product-updates-habitat- goes-to-kubecon-eu/ ‱ Azure Deployments with Habitat, ACR and AKS https://blog.chef.io/2018/05/07/deploy-your-applications-to- azure-using-habitat-azure-container-registry-and-azure- container-service/ ‱ These Slides https://www.slideshare.net/lnxchk/habitat-at-docker-bud
  • 25. Slide parking lot Other unused slides
  • 26. Application Configuration File: TOML [myconfig] out = "{{cfg.out}}" color = "{{cfg.color}}" {{~# if svc.me.leader ~}} leader = true {{ else }} leader = false {{/if ~}}
  • 27. Runtime ‱ The hab runtime includes management, service discovery, other features ‱ The habs in your application create a mesh so they can talk to each other ‱ You can even update your application via the mesh without restarting every application manually
  • 28. Running a Hart sudo hab start lnxchk/container_sched_backend --peer 172.31.13.250 --topology leader ‱ The same hart runs on multiple distros – no need for other packages ‱ Once hooked together, the supervisors will have a leader election ‱ If instances move in or out of the mesh, a new election will occur after a timeout ‱ Updates are persistent and stored in metadata on the hosts /hab/data/services
  • 29. Caveat - Internet ‱ You can build your own stuff inside your own network, sort of, when it’s all on one machine ‱ There may eventually be a private depot server ‱ For now, hab and its components need internet access
  • 30. Configuration ‱ Can be manipulated at runtime ‱ Also travels with the app ‱ Templating engine included
  • 31. Set Defaults in Habitat – default.toml leader = false out = "out" color = "green” [tomltable] var = “val”

Editor's Notes

  • #5: On prem or in the cloud. Or in a hybrid cloud. Or in containers. Or something. On Ubuntu. Or on Red Hat. Or on CentOS if it’s not production. Or that one weird team that wants something else. OS, distribution, version? Packaging type? Initialization system type? Omg it’s systemd Where does it live? /opt /bin /company How to config? .conf .json .yml .dat What version of the language runtime??
  • #7: Ouch. Is this something we expect? Should we expect it? How do we get it? We need a different kind of abstraction to accomplish this goal.
  • #8: Habitat aims to take the chaos and snowflakeness out of running applications With the move towards microservices and increasingly distributed systems, taming this chaos is important The application comes first
  • #10: Single build can be run natively or in containers Run one, run many. Hook them together via the supervisor or not Don’t have to care what’s already on the target systems. Bring all your stuff with you – and only what you need Share your plan.sh files with others via depot
  • #13: Packages totally won. But added a bunch of complexity where they were meant to alleviate it Some upstream will be hard to build, and the provider may recommend packages Habitat community is helping with that
  • #27: This is the application’s configuration file, as templated for habitat. There are three overall variables “out” and “color” are configured from the environment. There are defaults that live with the habitat configuration that will be used unless a new value is passed at runtime. The “leader” variable is set based on the service. The configuration file is rewritten when an action comes to the running service – either an explicit new configuration is applied, a leader election takes place, or the application is updated to a new version