Infrastructure Agnostic
Application Automation
Matt Ray
@mattray
Application automation that enables modern application
teams to build, deploy, and manage any application in any
environment - from traditional to cloud native architectures.
What is Habitat?
Security
Code Quality
Container Hosting
Peer Discovery
Config Changes
Supervision
Monitoring
Rolling Deployment
Networking
Internal Registry
Workload Placement
ProductionThe Container
Learning Cliff
Development
hab plan init
Standardized build and packaging templates
▪ Go
▪ Java
▪ Node.js
▪ Ruby
▪ …and more
plan.sh
FOO
▪ BAR
hab studio enter
Builds an immutable artifact
▪ Disposable, reproducible build environment
▪ Produces a signed, timestamped .hart file with
runtime dependencies and manifest
▪ Push to package depo
hab pkg export docker <origin>/<package>
Application &
Libraries
Minimized OS
ToptoBottomDependencyResolution
hab pkg export
Same immutable packages deployed everywhere
▪ ACI
▪ Cloud Foundry
▪ Docker
▪ Mesos
▪ Tar
Configuration
Configuration from the Environment
▪ default.toml
▪ docker run -e HAB_REDIS='tcp-backlog=128' mattray/redis
▪ echo “port=6380” | hab config apply redis.prod 3
Managing Applications
Automated Application Supervision
▪ Start, Stop, Reconfigure, etc.
▪ RESTful API
▪ Artifact updates
▪ Encrypted discovery service
Managing Services
Supervisor Service Groups
▪ Clustering Topologies
▪ Update Strategies
▪ Service Group Bindings
SERVICE
SUPERVISOR
SERVICE
SUPERVISOR
SERVICE
SUPERVISOR
SERVICE
SUPERVISOR
SERVICE
SUPERVISOR
SERVICE
SUPERVISOR
Target Kubernetes
apiVersion: habitat.sh/v1
kind: ServiceGroup
metadata:
name: exampleapp
spec:
image: kinvolk/nodejs-hab
count: 1
habitat:
topology: standalone
group: nodejs
config: user-toml-secret
Habitat Builder
SaaS-based build service
▪ GitHub integration
▪ Automated builds and dependency rebuilds
▪ Public and private origins
▪ Release channels for Continuous Delivery
▪ Container publishing to Docker Hub
▪ > 500 packages for common applications and libraries
https://bldr.habitat.sh
Windows Support
Build, deploy and manage Habitat packages on Windows
▪ plan.ps1
▪ Native Windows Supervisor
▪ ASP.NET Core, .NET Core, Node, and more
12 Factor/Cloud Native
Implements 12 Factor application patterns
▪ Decouples the app from operating system dependencies
▪ Separates concerns of ‘build’ from ‘deploy’
▪ Provides declarative deployment capabilities
▪ Configuration from the environment
▪ Immutable artifacts
https://12factor.net
For Developers
Works on my machine
▪ Any language
▪ Automatic builds on commit
▪ Explicit dependency declarations
▪ Stable & unstable release channels
For Operators
Works the same everywhere
▪ Automated container builds
▪ Immutable build artifacts
▪ Release channels for CD workflow
▪ Consistent management of any application on any
platform
Open Source Community
https://habitat.sh
Apache Licensed!
▪ https://github.com/habitat-sh
▪ This year:
• 1458 Pull Requests - 189 From Non Chef Employees
• 106 Authors - 37 Non Chef Employees
• 25 Habitat Releases
• 6174 Core Package Releases
Matt Ray
@mattray

DevOpsDays Singapore Habitat Ignite

  • 1.
  • 2.
    Application automation thatenables modern application teams to build, deploy, and manage any application in any environment - from traditional to cloud native architectures. What is Habitat?
  • 4.
    Security Code Quality Container Hosting PeerDiscovery Config Changes Supervision Monitoring Rolling Deployment Networking Internal Registry Workload Placement ProductionThe Container Learning Cliff Development
  • 6.
    hab plan init Standardizedbuild and packaging templates ▪ Go ▪ Java ▪ Node.js ▪ Ruby ▪ …and more
  • 7.
  • 8.
    hab studio enter Buildsan immutable artifact ▪ Disposable, reproducible build environment ▪ Produces a signed, timestamped .hart file with runtime dependencies and manifest ▪ Push to package depo
  • 9.
    hab pkg exportdocker <origin>/<package> Application & Libraries Minimized OS ToptoBottomDependencyResolution
  • 10.
    hab pkg export Sameimmutable packages deployed everywhere ▪ ACI ▪ Cloud Foundry ▪ Docker ▪ Mesos ▪ Tar
  • 11.
    Configuration Configuration from theEnvironment ▪ default.toml ▪ docker run -e HAB_REDIS='tcp-backlog=128' mattray/redis ▪ echo “port=6380” | hab config apply redis.prod 3
  • 12.
    Managing Applications Automated ApplicationSupervision ▪ Start, Stop, Reconfigure, etc. ▪ RESTful API ▪ Artifact updates ▪ Encrypted discovery service
  • 13.
    Managing Services Supervisor ServiceGroups ▪ Clustering Topologies ▪ Update Strategies ▪ Service Group Bindings SERVICE SUPERVISOR SERVICE SUPERVISOR SERVICE SUPERVISOR SERVICE SUPERVISOR SERVICE SUPERVISOR SERVICE SUPERVISOR
  • 14.
    Target Kubernetes apiVersion: habitat.sh/v1 kind:ServiceGroup metadata: name: exampleapp spec: image: kinvolk/nodejs-hab count: 1 habitat: topology: standalone group: nodejs config: user-toml-secret
  • 15.
    Habitat Builder SaaS-based buildservice ▪ GitHub integration ▪ Automated builds and dependency rebuilds ▪ Public and private origins ▪ Release channels for Continuous Delivery ▪ Container publishing to Docker Hub ▪ > 500 packages for common applications and libraries https://bldr.habitat.sh
  • 16.
    Windows Support Build, deployand manage Habitat packages on Windows ▪ plan.ps1 ▪ Native Windows Supervisor ▪ ASP.NET Core, .NET Core, Node, and more
  • 17.
    12 Factor/Cloud Native Implements12 Factor application patterns ▪ Decouples the app from operating system dependencies ▪ Separates concerns of ‘build’ from ‘deploy’ ▪ Provides declarative deployment capabilities ▪ Configuration from the environment ▪ Immutable artifacts https://12factor.net
  • 18.
    For Developers Works onmy machine ▪ Any language ▪ Automatic builds on commit ▪ Explicit dependency declarations ▪ Stable & unstable release channels
  • 19.
    For Operators Works thesame everywhere ▪ Automated container builds ▪ Immutable build artifacts ▪ Release channels for CD workflow ▪ Consistent management of any application on any platform
  • 20.
    Open Source Community https://habitat.sh ApacheLicensed! ▪ https://github.com/habitat-sh ▪ This year: • 1458 Pull Requests - 189 From Non Chef Employees • 106 Authors - 37 Non Chef Employees • 25 Habitat Releases • 6174 Core Package Releases
  • 21.