©2016 Chef Software Inc. 1-2
Modern Applications
Source
Code
Repo
Artifact
Bare Metal
Containers
AMI
VM
Artifact
Repo
©2016 Chef Software Inc. 1-3
Immutable Infrastructure
©2016 Chef Software Inc. 1-4
Immutable Infrastructure Applications
©2016 Chef Software Inc. 1-5
Dependencies!
©2016 Chef Software Inc. 1-6
Packaging and Deployment
Build
Deploy
Manage
Starts with a plan
©2016 Chef Software Inc.
Simple, native, and declaritive
pkg_name=redis
pkg_origin=core
pkg_version=3.0.7
pkg_license=('BSD')
pkg_maintainer="The Habitat Maintainers <humans@habitat.sh>"
pkg_source=http://download.redis.io/releases/${pkg_name}-${pkg_version}.tar.gz
pkg_shasum=b2a791c4ea3bb7268795c45c6321ea5abcc24457178373e6a6e3be6372737f23
pkg_bin_dirs=(bin)
pkg_build_deps=(core/make core/gcc)
pkg_deps=(core/glibc)
pkg_svc_run="bin/redis-server $pkg_svc_config_path/redis.config"
pkg_expose=(6379)
do_build() {
make
}
plan.sh
Low abstraction
Complete
dependencies
Declare
services
Simple
functions
Clean room environment
Safe by default
Installs dependences
Built in a studio
Central location
Publicly hosted
Lightweight views
Stored in a depot
Easy pattern
Shortcuts
Increasing specificity
Installed by hab
Binaries and Config
Metadata
Side-by-side
Packages on disk
Docker
ACI
Mesosphere
Post-process packages
Run on any 64-bit Linux
Easily support proprietary software
Installs automatically
Keeps things running
Manages configuration
Supervisor runs services
Print config options
12-Factor style
Externally enforced
Environment configuration
More flexible than environment
Universal location
Externally enforced
File configuration
Supervisors form a ring
Peers
Service Groups
Gossip
Availability
increases with
scale
Supervisors support topologies
Dynamic
configuration
Service group
level
Uses the ring
Supervisors provide update strategies
Topology aware
Tracks views in
the depot
Ideal for
Continuous
Delivery
Supervisors provide a REST API
External Actors
Health and Status
Supervisor
Debugging
Automation travels with the
application
Existing & Cloud Native Software
Application Automation
It’s all open source
Apache License
https://www.habitat.sh/community/

Application Automation with Habitat

Editor's Notes

  • #3 This is what building modern applications should look like. Start by writing source code that is stored in a source code repository. Build an artifact from that source code. Rebuilding the same source code should generate the same outcome. Artifacts get stored in a repository. Artifacts can be installed and/or run as services in all environments, bare metal, containers, cloud instances, or virtual machines.
  • #4 The “immutable infrastructure pattern” is a thing that’s hard to ignore. Knowing what’s out there is exactly what you deployed is pretty powerful. It seems great until you need it to be more flexible. Small config changes add additional overhead on spinning new images/containers. What about running an app in multiple environments, each with their own settings? Immutable is great, but there has to be a blend between immutable and configuration management.
  • #5 The “immutable infrastructure pattern” is a thing that’s hard to ignore. Knowing what’s out there is exactly what you deployed is pretty powerful. It seems great until you need it to be more flexible. Small config changes add additional overhead on spinning new images/containers. What about running an app in multiple environments, each with their own settings? Immutable is great, but there has to be a blend between immutable and configuration management.
  • #6 What packages does your application implicitly rely on that are installed on your OS base image? What if that base image changes? What if you target a different runtime (bare metal, container, etc.)? We must eliminate hidden dependencies in our applications.
  • #7 Packaging and deployment mechanisims need to be easy-to-use and understand Packaging and deployment should not be tied to the language or framework of the application
  • #8 Optimize the culture and technology around Fast, efficient, software driven Build, Deploy, Manage of Applications Fast, efficient, software driven Could would we Build, Deploy, Manage All the software, enterprise and cloud The same way? https://flic.kr/p/fqhYE4
  • #9 Prepare software for Habitat Build Configuration runtime hooks https://flic.kr/p/bX4sLL
  • #11 Only has what you need Installs dependencies Safe, auditable Multiple types - flexible abstraction https://flic.kr/p/6psAb2
  • #12 Stores packages; like apt, yum, rubygems, or cpan Uses origins for ownership Built for CD https://flic.kr/p/DgftTL
  • #13 hab NOUN VERB hab install hab install adam/redis https://flic.kr/p/7b6nj9
  • #14 Grouped under /hab hab install core/redis ls -la /hab/pkgs/core/redis Deps, Build Deps, config, binaries https://flic.kr/p/xzEadt
  • #15 Any package! https://flic.kr/p/piD2pu
  • #16 Modern-ish kernel - 2.6.32+ Deps, Build Deps, config, binaries You can still get the management benefits, even if the software deps and isolation don't work https://flic.kr/p/cQC8U3
  • #17 Installs packages Starts the service we defined Manages the lifecycle Reconfigures Adds data we use in our configuration - data is the api https://flic.kr/p/nC6Fmk
  • #18 lowest common denominator hab sup config adam/redis ENV HAB_REDIS="tcp-backlog = 128" hab start adam/redis Brittle; hard to change Hard to set a bunch of things at once No support for complex configuration https://flic.kr/p/fqpYjH
  • #19 We can inject files, change them later Universal config file location - no more guessing! Still essentially externally managed What happens if I launch two? How can we make consistent, dynamic configuration? https://flic.kr/p/ao7jBT
  • #20 Supervisors connect to each other Share information Gossip and infection Availability https://flic.kr/p/e8yk3m
  • #21 Static! Not a thousand different topologies What we talk about anyway in teams https://flic.kr/p/9WdfTj
  • #22 Detects when a new release is available Works with the service group to deploy it You specify the pattern, the supervisors execute it Only the first is implemented https://flic.kr/p/cpLKpJ
  • #23 Easy to query from outside habitat Great for debugging https://flic.kr/p/rkvmJR
  • #24 Application Automation - app point of view Automation travels with the app - no external entities required Existing and cloud native We don't rewrite the world to fix our management struggles https://flic.kr/p/getU6Y
  • #25 https://flic.kr/p/oqocGB