habitat & amazon's ecs

Post on 14-Jan-2017

208 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

AWS - Sydney North ShoreOctober 25, 2016

Brent’s Desk

database cluster

Infrastructure First Development

Cloud Native is code for “Rewrite the world”

What if you could defer infrastructure

decisions until runtime?

HabitatApplication automation that enables modern

application teams to build, deploy, and run any application in any environment - from traditional

data-centers to containerized microservices.

Build Service

Plan Artifact DepotBuild

Service

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

Explicit about dependenciesIncludes 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

Post-process packaging

Automation travels with the app

Choreography

Topology aware

SecurityCode Quality

Container HostingPeer DiscoveryConfig Changes

SupervisionMonitoring

Rolling DeploymentNetworking

Internal RegistryWorkload Placement

Production

The Container Learning CliffDevelopment

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 (new and legacy)

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

Habitat’s approach

Infrastructure Automation Application Automation Compliance Automation

Workflow

VisibilityC

ompliance

• Chef

• Docker, Docker Swarm

• Mesos, DC/OS

• Kubernetes, Tectonic & OpenShift

• Nomad

• Rancher

• GKE

• ECS

Habitat is complementary to

$ aws ecr get-login

returns the command used by

$ docker login…

$ docker images

$ aws ecr create-repository –repository-name mattray/redis

AWS ECR setup

$ docker tag mattray/redis:latest aws_account_id.dkr.ecr.ap-southeast-2.amazonaws.com/mattray/redis:latest

$ docker push aws_account_id.dkr.ecr.ap-southeast-2.amazonaws.com/mattray/redis:latest

$ docker pull aws_account_id.dkr.ecr.ap-southeast-2.amazonaws.com/mattray/redis:latest

Deleting…

$ docker rmi mattray/redis:latest

$ aws ecr batch-delete-image --repository-name mattray/redis --image-ids imageTag=latest

AWS ECR publishing

$ curl -o ~/bin/ecs-cli https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-darwin-amd64-latest

$ chmod +x ~/bin/ecs-cli

$ ecs-cli configure --cluster habitat-demo

stands up the cluster

$ ecs-cli up --keypair mattray-apac --capability-iam --size 2 --instance-type t2.medium --security-group habitat-demo

provisions hosts for containers with SSH, 8080 and Habitat ports open

AWS ECS setup

$ aws ecs list-clusters

$ ecs-cli down –force

take down the Cloudformation cluster

$ ecs-cli compose --file redis.yml service rm

remove the deployed service

$ ssh -i ~/.ssh/mattray-apac ec2-user@12.34.56.78

connect to the running ECS host

$ docker logs e1e7834c6ab2

AWS ECS cluster management

AWS ECS deploying tasks$ ecs-cli compose --file redis.yml -p habdemo up

version: '2’services:

redis:image: aws_account_id.dkr.ecr.ap-southeast-2.amazonaws.com/mattray/redis:latestcpu_shares: 100mem_limit: 524288000environment:

HAB_REDIS: 'tcp-backlog=128'

Try Habitat for yourself

• https://www.habitat.sh/try

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

• Tutorials

• Getting started guide

• Extensive documentation

• Support for Chef customers

Links from the Presentation

• Redis plan

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

• National Parks demo

– https://github.com/billmeyer/national-parks-plan

– https://github.com/billmeyer/national-parks

27

top related