80
Creating Platform Agnostic Packages That Can Run Anywhere @nellshamrell Nell Shamrell-Harrington Principal Engineer Community Engineering Lead Chef Software

Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Creating Platform Agnostic Packages That Can Run Anywhere

@nellshamrell

Nell Shamrell-Harrington

Principal Engineer – Community Engineering Lead

Chef Software

Page 2: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

What is the one true way to deploy applications?

Page 3: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

?

Page 4: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

In the Cloud!

?

Page 5: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

In the Cloud!

In Cloud Foundry!

?

Page 6: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

In the Cloud! In Containers!

In Cloud Foundry!

?

Page 7: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

In the Cloud! In Containers!

In Kubernetes! In Cloud Foundry!

?

Page 8: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

There is no one true way to deploy applications…

Page 9: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

It depends on the needs of the business….

Page 10: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

It depends on the needs of the business….

for that particular application…

Page 11: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

It depends on the needs of the business….

for that particular application…

at that particular time….

Page 12: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

It will change…

Page 13: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

It will change…

as the application changes…

Page 14: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

It will change…

as the application changes…

as the business changes

Page 15: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Today’s reality – mixed infrastructure

Page 16: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Mixed Infrastructure • Containers for stateless parts of an application

Page 17: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

• Containers for stateless parts of an application

• Virtual Machines for persistent data stores

Mixed Infrastructure

Page 18: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

• Containers for stateless parts of an application

• Virtual Machines for persistant data stores

• Bare metal for static, compute heavy loads

Mixed Infrastructure

Page 19: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Does this mean I need a different build and install process for each part of my

application?

Page 20: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

• Infrastructure Automation

Automation Evolution

Page 21: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

• Infrastructure Automation

• Container Automation

Automation Evolution

Page 22: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

• Infrastructure Automation

• Container Automation

• Application Automation

Automation Evolution

Page 23: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!
Page 24: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

• Principal Software Engineer – Community Engineering Lead at

Chef

• Core maintainer of Habitat Open Source project

• @nellshamrell

Nell Shamrell-Harrington

Who am I?

Page 25: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Why Application Automation?

Page 26: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Building and running software is painful!

Page 27: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

• Tied to particular runtimes and environments

Building and running software is painful!

Page 28: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

• Tied to particular runtimes and environments

• Different packages for different flavors of Linux

Building and running software is painful!

Page 29: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

• Tied to particular runtimes and environments

• Different packages for different flavors of Linux

• Different packages for bare metal/virtual machines and

containers

Building and running software is painful!

Page 30: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Modern Applications

Page 31: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Modern application

• Is immutable

Page 32: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

• Is immutable

• Is agnostic to running environment

Modern application

Page 33: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

• Is immutable

• Is agnostic to running environment

• Reduces complexity

Modern application

Page 34: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

• Is immutable

• Is agnostic to running environment

• Reduces complexity

• Enables scaling

Modern application

Page 35: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

What is Habitat?

Page 36: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Habitat is a new technology to build, deploy, and manage

applications…

Page 37: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

…in any environment from traditional datacenters

to containerized microservices

Page 38: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

In Habitat, the application is the unit of automation

Page 39: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Packaging an application with Habitat

Sourc

e

Code

Repo

User

Page 40: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Packaging an application with Habitat

Sourc

e

Code

Repo

User Plan

Written in

Bash

or

PowerShell

Page 41: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Packaging an application with Habitat

Sourc

e

Code

Repo

User Plan Artifact

Signed with a key

Written in

Bash

or

PowerShell

Page 42: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Packaging an application with Habitat

Sourc

e

Code

Repo

User Plan Artifact Depot

Signed with a key

(Optional) Written in

Bash

or

PowerShell

Page 43: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Public Builder Depot https://bldr.habitat.sh

Page 44: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Public Builder Depot https://bldr.habitat.sh

On Premises Depot Available Too!

Page 45: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Demo – Creating a Linux Package

Page 46: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Running an application with Habitat

Sourc

e

Code

Repo

Depot

(Optional)

Page 47: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Running an application with Habitat

Sourc

e

Code

Repo

Depot Artifact

(Optional)

Page 48: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Running an application with Habitat

Sourc

e

Code

Repo

Depot Artifact

Bare Metal Service

Supervisor

Virtual Machine

Container

Supervisor

Supervisor

Service

Service

(Optional)

Page 49: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Demo – running a package with a

supervisor

Page 50: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Running an application with Habitat

Sourc

e

Code

Repo

Virtual Machine Supervisor

Service

API

Page 51: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Running an application with Habitat

Sourc

e

Code

Repo

Load Balancer

Virtual Machine Supervisor

Service

API

Page 52: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Running an application with Habitat

Sourc

e

Code

Repo

Virtual Machine Supervisor

Service

Virtual Machine Supervisor

Service

Virtual Machine Supervisor

Service

Virtual Machine Supervisor

Service

Page 53: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Running an application with Habitat

Sourc

e

Code

Repo

Virtual Machine Supervisor

Service

Virtual Machine Supervisor

Service

Virtual Machine Supervisor

Service

Virtual Machine Supervisor

Service

Encrypted

Encrypted

Encrypted

Encrypted

Page 54: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Along with running HART packages with Habitat…

Page 55: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

…you can also export them to other formats…

Page 56: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Including container images, by far the most popular is

Docker

Page 57: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Habitat and Containers

Page 58: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Getting artifacts to run anywhere is very difficult

Page 59: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Containers were supposed to solve this problem, but…

Page 60: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Current Container Pain

• Major learning cliff between development and production

Page 61: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Current Container Pain

• Major learning cliff between development and production

• Containers become black boxes – don’t always know what is in them

Page 62: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Current Container Pain

• Major learning cliff between development and production

• Containers become black boxes – don’t always know what is in them

• Black boxes cause security issues

Page 63: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Current Container Pain

Operating System

Libraries

Application

Libraries

Application

Page 64: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Containers with Habitat

Application

&

Libraries

Operating

System

Page 65: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Containers with Habitat

• Habitat starts with the application – minimal operating system

comes later

Page 66: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Containers with Habitat

• Habitat starts with the application – minimal operating system

comes later

• Application declares dependencies, dependencies are resolved from

the application

Page 67: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Containers with Habitat

• Habitat starts with the application – minimal operating system

comes later

• Application declares dependencies, dependencies are resolved from

the application

• Exposes API for external services

Page 68: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

When you create a container image with Habitat…

Page 69: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

You know exactly what went into the container and

what is configurable about the container

Page 70: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Demo – Exporting HART package to a Docker image

Page 71: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Deploying Containers with Habitat

• You can deploy the container using…

Page 72: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Deploying Containers with Habitat

• You can deploy the container using…

• Cloud based container services

• Azure Container Services, Amazon ECS

Page 73: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Deploying Containers with Habitat

• You can deploy the container using…

• Cloud based container services

• Azure Container Services, Amazon ECS

• Container scheduling services

• Kubernetes, Mesosphere, Docker Swarm

Page 74: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Wrap Up…

Page 75: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

Most of today’s applications run on mixed infrastructure

Page 76: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!
Page 77: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

How do you get involved?

• Habitat.sh/community

Page 78: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

• Principal Software Engineer – Community Engineering Lead at

Chef

• Core maintainer of Habitat Open Source project

• @nellshamrell

Nell Shamrell-Harrington

Who am I?

Page 79: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!

• Principal Software Engineer – Community Engineering Lead at

Chef

• Core maintainer of Habitat Open Source project

• @nellshamrell

Nell Shamrell-Harrington

Who am I?

Thank You!

Page 80: Creating Platform Agnostic Packages That Can Run Anywhere€¦ · In the Cloud! ? In the Cloud! In Cloud Foundry! ? In the Cloud! In Containers! In Cloud Foundry! ? In the Cloud!