Slide 1

Slide 1 text

Simplifying Containers with Habitat Andre Elizondo

Slide 2

Slide 2 text

Andre Elizondo Solutions Architect @ Chef @useautomation

Slide 3

Slide 3 text

Agenda Current Problems in the World of Containers An overview of Habitat How Habitat Makes Containers Better Questions & Answers

Slide 4

Slide 4 text

Habitat Community • Join the Habitat Slack Team - http://slack.habitat.sh/ • Work through the tutorial at https://www.habitat.sh/tutorials/ • Explore Habitat packages on the depot - https://app.habitat.sh/ • Explore the Habitat projects - https://github.com/habitat-sh • Read Habitat Blog posts - https://blog.chef.io/?s=habitat • Join the Habitat Forums - https://forums.habitat.sh/

Slide 5

Slide 5 text

Current Container Pain

Slide 6

Slide 6 text

How do you... Decouple the application build from the final production ready container?

Slide 7

Slide 7 text

How do you... Build immutable infrastructure but allow last mile Application config changes?

Slide 8

Slide 8 text

How do you... Orchestrate the application launch order & topology required?

Slide 9

Slide 9 text

How do you... Build containers with the Minimum Viable OS?

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

Modern Applications Source Code Repo Artifact Bare Metal Container Cloud Instance VM Artifact Repo

Slide 12

Slide 12 text

Build Deploy Manage

Slide 13

Slide 13 text

Starts with a plan

Slide 14

Slide 14 text

Simple, Native, and Declarative pkg_origin=core pkg_name=redis pkg_version=3.2.1 pkg_license=('BSD') pkg_maintainer="The Habitat Maintainers " 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="redis-server $pkg_svc_config_path/redis.config" pkg_expose=(6379) do_build() { make } plan.sh Low abstraction Complete dependencies Declare services Simple functions

Slide 15

Slide 15 text

https://github.com/docker-library/redis/blob/master/3.2/Dockerfile

Slide 16

Slide 16 text

https://github.com/docker-library/redis/blob/master/3.2/Dockerfile

Slide 17

Slide 17 text

Clean room environment Safe by default Installs dependences Built in a studio

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

How do you... Decouple the application build from the final production ready container? Provide a “DSL” to describe the application build (plan.sh), and provide an isolated environment (studio) to build the application artifact (Habitat Package).

Slide 20

Slide 20 text

Central location Publicly hosted Lightweight channels Stored in a depot

Slide 21

Slide 21 text

No content

Slide 22

Slide 22 text

Easy pattern Shortcuts Increasing specificity Installed by hab

Slide 23

Slide 23 text

Binaries and Config Metadata Side-by-side Packages Contain

Slide 24

Slide 24 text

No content

Slide 25

Slide 25 text

Install automatically Keep things running Manage configuration Supervisors run services

Slide 26

Slide 26 text

Print config options 12-Factor style Externally enforced Environment configuration

Slide 27

Slide 27 text

More flexible than environment Universal location Externally enforced File configuration

Slide 28

Slide 28 text

How do you... Build immutable infrastructure but allow last mile Application config changes? Ship the config along side an immutable application artifact. Provide a supervisor to dynamically update the config based on environment or service discovery.

Slide 29

Slide 29 text

Supervisors form a ring Peers Service Groups Gossip Availability increases with scale

Slide 30

Slide 30 text

Supervisors provide a REST API External Actors Health and Status Supervisor Debugging

Slide 31

Slide 31 text

Supervisors support topologies Dynamic configuration Service group level Uses the ring

Slide 32

Slide 32 text

Supervisors provide update strategies Topology aware Tracks views in the depot Ideal for Continuous Delivery

Slide 33

Slide 33 text

How do you... Orchestrate the application launch order & topology required? Provide config aware, autonomous, self-organizing peers (supervisors) with built in topologies for clustering strategies.

Slide 34

Slide 34 text

Docker ACI Mesosphere Post-process packages

Slide 35

Slide 35 text

Libraries Operating System Application Traditionally the domain of the OS Vendor Application Libraries Config Changes Bottom to Top Dependency Resolution

Slide 36

Slide 36 text

Application & Libraries Minimized OS Top to Bottom Dependency Resolution

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

How do you... Build containers with the Minimum Viable OS? Allow applications to declare their runtime dependencies, and resolve those dependencies from the application to the infrastructure.

Slide 41

Slide 41 text

Operable Application Containers •Isolated •Immutable •Configurable •Common interface for monitoring health •Rebuild from source •Common packaging •Runtime Independence

Slide 42

Slide 42 text

Automation travels with the application Existing & Cloud Native Software Application Automation

Slide 43

Slide 43 text

It’s all open source Apache License

Slide 44

Slide 44 text

Questions • Join the Habitat Slack Team - http://slack.habitat.sh/ • Work through the tutorial at https://www.habitat.sh/tutorials/ • Explore Habitat packages on the depot - https://app.habitat.sh/ • Explore the Habitat projects - https://github.com/habitat-sh • Read Habitat Blog posts - https://blog.chef.io/?s=habitat • Join the Habitat Forums - https://forums.habitat.sh/