23
Habitat Workshop Eric Maxwell Chef Pop-Up @ Nike – July 27, 2016

Nike pop up habitat

  • Upload
    chef

  • View
    160

  • Download
    0

Embed Size (px)

Citation preview

Habitat Workshop

Eric Maxwell Chef Pop-Up @ Nike – July 27, 2016

Eric Maxwell Success Engineer Chef Software, Inc.

3

Habitat Components

Habitat Components

•  Habitat Studio - an application packager

Habitat Components

•  Habitat Studio - an application packager

•  Habitat Plans - instructions to download, compile, and install

Habitat Components

•  Habitat Studio - an application packager

•  Habitat Plans - instructions to download, compile, and install

•  Habitat Depot - a place to upload and download your app packages

Habitat Components

•  Habitat Studio - an application packager

•  Habitat Plans - instructions to download, compile, and install

•  Habitat Depot - a place to upload and download your app packages

•  Habitat Supervisor - an intelligent runtime with deployment coordination and service discovery built in

Package Format (.hart)

Plan Artifact Depot

Bare Metal

Containers

AMI

VM

1.  Packaging an application starts with a plan. A Plan is as simple to create as a Dockerfile 2.  Start by launching the isolated Build environment called a “Studio”

a.  Enter the studio (hab studio enter) b.  Define your Plan (vim plan.sh) to define the software build from source using standard BASH c.  Define the Configuration template for the software, using Mustache (logic-less scripting language) d.  Define the Configuration defaults, using TOML (configuration language) e.  Define Hooks for supervisor behavior: initializing, running, defining a health check, etc f.  Create Signing Keys for your Origin (hab origin key generate myOrigin) g.  Build your Artifact (build myOrigin/myPlan)

3.  Post-process Artifact for target environments: Docker, Rocket, CloudFoundry, Mesos, Kubernetes, etc... 4.  Run and test Artifact (docker run -ti myOrigin/myPlan)

Habitat Workflow

Build Service

Plan Artifact DepotBuild

Service

A Build Service with a workflow to describe the software and behavior for Habitat applications

Explicit about dependencies Includes what is configurable about the application

Packages are developed and built in an isolated build environment (hab studio)

Built Artifacts are post-processed in one step to multiple formats including Docker Images

Source Code Repo

Habitat Technology

Depot Artifact

Supervisor: An Intelligent Run-Time Supervisor w/ REST API (hab-sup)

Supervisor Supervisor

Supervisor Supervisor

Ring

Leader

Initializer

Stand Alone

Part of an Artifact, the Supervisor manages Application node behavior at runtime, providing automation and intelligence: Utilizes predefined Plan to manage application behavior Built in service discovery Self-organizes with other Supervisor nodes on a Ring into topologies Rings have no single point of failure

Supervisor executes a variety of hooks for defined behavior: Init, run, health_check, reconfigure, file_update

Supervisor is accessible via REST API: /config, /health, /status, /gossip, /census, /election

Habitat Technology

Security & Management

Secret Payloads

Service Service

Service Service

Pub Key

Symmetric Encryption

Service Service

Service Service

Load Balancer

Enterprise-grade security allows for secure runtime management of configurations and payloads Encrypted, authenticated run-time configuration Automatic, safe, atomic software updates based upon policy (example: Blue/green deployments) Dynamic topology updates Handles inter-service discovery through binding

13

Habitat Technology

Habitat Technology

Plan Artifact DepotBuild

Service

Supervisor Supervisor

Supervisor Supervisor

Ring

Bare Metal

Containers

AMI

VM

Depot

Build Service & Workflow

Package Format Artifact Distribution Server

Artifact Distribution Server

Intelligent Run-Time Supervisor w/REST API

Source Code Repo

Applications run as distributed, fully automated, and capable autonomous actors Immutable applications, but flexible and easy to manage because automation travels with the application

Bundles what your apps need to run and nothing else Embedded automation choreographs application cluster topology/behavior A network with no reliance on external services and no single-point-of-failure Provides continuous deployment without traditional Application Release Automation

(ARA) tooling The solution is the same:

For new and legacy applications No matter the application runtime environment

Habitat’s approach

“Cloud Native” is a code-word for “Rewrite it all”

Habitat Application automation that enables modern

application teams to build, deploy, and manage any application in any environment -

from traditional data-centers to containerized microservices.

> Operating System centric; application automation becomes complex

> Focused on integrated SDKs; “Cloud Native” rewrites

> Building tools around applications; pushing in the old direction

> Focuses on the grid as the unit of automation; apps must be specialized

> Focuses on the container as the unit of automation; apps are opaque.

Wait, doesn’t X do that?

It’s Habitat AND

It’s Habitat AND

It’s Habitat AND

It’s not Habitat OR …

It’s Habitat AND ____________

(or mesos, or aci)

(or kubernetes)

We believe that all applications can be autonomous across any platform

Plan Collaborate

Inspect Build

21

Live Demo

Try Habitat for yourself

•  https://www.habitat.sh/try •  Tutorials •  Getting started guide •  Extensive documentation •  Open Source!

–  https://github.com/habitat-sh/habitat

Thank you! Q&A

23