Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Habitat & Amazon's ECS


Published on

AWS Sydney North User Group, October 25, 2016.

This session provided an introduction and live demo of Habitat. The process of moving applications from build to Docker and then published to ECR and running on ECS were demonstrated.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Habitat & Amazon's ECS

  1. 1. AWS - Sydney North Shore October 25, 2016
  2. 2. Brent’s Desk database cluster
  3. 3. Infrastructure First Development
  4. 4. Cloud Native is code for “Rewrite the world”
  5. 5. What if you could defer infrastructure decisions until runtime?
  6. 6. Habitat Application automation that enables modern application teams to build, deploy, and run any application in any environment - from traditional data-centers to containerized microservices.
  7. 7. Build Service Plan Artifact Depot Build 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
  8. 8. Post-process packaging
  9. 9. Automation travels with the app
  10. 10. Choreography
  11. 11. Topology aware
  12. 12. Security Code Quality Container Hosting Peer Discovery Config Changes Supervision Monitoring Rolling Deployment Networking Internal Registry Workload Placement Production The Container Learning Cliff Development
  13. 13. Habitat Technology Plan Artifact Depot Build 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
  14. 14. 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
  15. 15. Infrastructure Automation Application Automation Compliance Automation Workflow Visibility Compliance
  16. 16. • Chef • Docker, Docker Swarm • Mesos, DC/OS • Kubernetes, Tectonic & OpenShift • Nomad • Rancher • GKE • ECS Habitat is complementary to
  17. 17. $ aws ecr get-login returns the command used by $ docker login… $ docker images $ aws ecr create-repository –repository-name mattray/redis AWS ECR setup
  18. 18. $ docker tag mattray/redis:latest aws_account_id.dkr.ecr.ap- $ docker push aws_account_id.dkr.ecr.ap-southeast- $ docker pull aws_account_id.dkr.ecr.ap-southeast- Deleting… $ docker rmi mattray/redis:latest $ aws ecr batch-delete-image --repository-name mattray/redis -- image-ids imageTag=latest AWS ECR publishing
  19. 19. $ curl -o ~/bin/ecs-cli 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
  20. 20. $ 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@ connect to the running ECS host $ docker logs e1e7834c6ab2 AWS ECS cluster management
  21. 21. AWS ECS deploying tasks $ ecs-cli compose --file redis.yml -p habdemo up version: '2’ services: redis: image: cpu_shares: 100 mem_limit: 524288000 environment: HAB_REDIS: 'tcp-backlog=128'
  22. 22. Try Habitat for yourself • • • Tutorials • Getting started guide • Extensive documentation • Support for Chef customers
  23. 23. Links from the Presentation • Redis plan – • National Parks demo – –
  24. 24. 27