Deep Dive on Microservices and ECS

Similar documents
Accelerating Content, APIs and Applications with Amazon CloudFront and

Building a Microservices Platform, Patterns and Best Practices

Microservices on AWS. Matthias Jung, Solutions Architect AWS

Getting Started with AWS Security

Containers and the Evolution of Computing

About Intellipaat. About the Course. Why Take This Course?

Training on Amazon AWS Cloud Computing. Course Content

Microservices Architekturen aufbauen, aber wie?

Designing Fault-Tolerant Applications

AWS Solution Architect Associate

Wrapp. Powered by AWS EC2 Container Service. Jude D Souza Solutions Wrapp Phone:

Amazon Web Services (AWS) Solutions Architect Intermediate Level Course Content

Reactive Microservices Architecture on AWS

Amazon Web Services Course Outline

S U M M I T B e r l i n

Deliver Docker Containers Continuously on AWS. Philipp

Amazon Web Services Training. Training Topics:

Security Aspekts on Services for Serverless Architectures. Bertram Dorn EMEA Specialized Solutions Architect Security and Compliance

Architecting for Greater Security in AWS

PracticeDump. Free Practice Dumps - Unlimited Free Access of practice exam

AWS Well Architected Framework

ARCHITECTING WEB APPLICATIONS FOR THE CLOUD: DESIGN PRINCIPLES AND PRACTICAL GUIDANCE FOR AWS

Service Mesh and Microservices Networking

Cloud-Native Applications. Copyright 2017 Pivotal Software, Inc. All rights Reserved. Version 1.0

How can you implement this through a script that a scheduling daemon runs daily on the application servers?

Amazon EC2 Container Service: Manage Docker-Enabled Apps in EC2

Principal Solutions Architect. Architecting in the Cloud

Securing Microservices Containerized Security in AWS

LINUX, WINDOWS(MCSE),

AWS Administration. Suggested Pre-requisites Basic IT Knowledge

DevOps on AWS Deep Dive on Continuous Delivery and the AWS Developer Tools

Manage AWS Services. Cost, Security, Best Practice and Troubleshooting. Principal Software Engineer. September 2017 Washington, DC

Enroll Now to Take online Course Contact: Demo video By Chandra sir

Implementing the Twelve-Factor App Methodology for Developing Cloud- Native Applications

Zero to Microservices in 5 minutes using Docker Containers. Mathew Lodge Weaveworks

Building Microservices with the 12 Factor App Pattern

Getting Started With Amazon EC2 Container Service

Deep Dive on AWS CodeStar

gcp / gke / k8s microservices

The Long Road from Capistrano to Kubernetes

Hackproof Your Cloud Responding to 2016 Threats

At Course Completion Prepares you as per certification requirements for AWS Developer Associate.

Containers, Serverless and Functions in a nutshell. Eugene Fedorenko

Network Security & Access Control in AWS

Emulating Lambda to speed up development. Kevin Epstein CTO CorpInfo AWS Premier Partner

AWS Lambda: Event-driven Code in the Cloud

Diving into AWS Lambda

High School Technology Services myhsts.org Certification Courses

DevOps Tooling from AWS

PrepAwayExam. High-efficient Exam Materials are the best high pass-rate Exam Dumps

Amazon Web Services (AWS) Training Course Content

Continuous Delivery for Cloud Native Applications

AWS Integration Guide

Defining Security for an AWS EKS deployment

Develop and test your Mobile App faster on AWS

PARTLY CLOUDY DESIGN & DEVELOPMENT OF A HYBRID CLOUD SYSTEM

Scaling on AWS. From 1 to 10 Million Users. Matthias Jung, Solutions Architect

Getting started with AWS security

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Cloud Computing. Amazon Web Services (AWS)

Multi-Cloud and Application Centric Modeling, Deployment and Management with Cisco CloudCenter (CliQr)

Disclaimer This presentation may contain product features that are currently under development. This overview of new technology represents no commitme

Docker and Oracle Everything You Wanted To Know

AWS 101. Patrick Pierson, IonChannel

Container Orchestration on Amazon Web Services. Arun

How the Cloud is Enabling the Disruption of the Construction Industry. AWS Case Study Construction Industry. Abstract

How to host and manage enterprise customers on AWS: TOYOTA, Nippon Television, UNIQLO use cases

Accenture Cloud Platform Serverless Journey

Kuberiter White Paper. Kubernetes. Cloud Provider Comparison Chart. Lawrence Manickam Kuberiter Inc

Serverless Architecture Hochskalierbare Anwendungen ohne Server. Sascha Möllering, Solutions Architect

Using AWS to Build a Large Scale Dockerized Microservices Architecture. Dr. Oliver Wahlen moovel Group GmbH Frankfurt, 30.

We are ready to serve Latest IT Trends, Are you ready to learn? New Batches Info

Taming your heterogeneous cloud with Red Hat OpenShift Container Platform.

Advanced Continuous Delivery Strategies for Containerized Applications Using DC/OS

Getting started with AWS security

API, DEVOPS & MICROSERVICES

Serverless Predictions at Scale

Container 2.0. Container: check! But what about persistent data, big data or fast data?!

WHITEPAPER AMAZON ELB: Your Master Key to a Secure, Cost-Efficient and Scalable Cloud.

BERLIN. 2015, Amazon Web Services, Inc. or its affiliates. All rights reserved

Kuber-what?! Learn about Kubernetes

Kubernetes made easy with Docker EE. Patrick van der Bleek Sr. Solutions Engineer NEMEA

Running MarkLogic in Containers (Both Docker and Kubernetes)

NGF0502 AWS Student Slides

AWS London Loft: CloudFormation Workshop

Kubernetes Integration with Virtuozzo Storage

Application Centric Microservices Ken Owens, CTO Cisco Intercloud Services. Redhat Summit 2015

AWS Agility + Splunk Visibility = Cloud Success. Splunk App for AWS Demo. Laura Ripans, AWS Alliance Manager

Serverless Computing. Redefining the Cloud. Roger S. Barga, Ph.D. General Manager Amazon Web Services

Using SQL Server on Amazon Web Services

Lean & Mean on AWS: Cost-Effective Architectures. Constantin Gonzalez, Solutions Architect, AWS

HashiCorp Vault on the AWS Cloud

AWS Interview Questions and Answers

CREATING A CLOUD STRONGHOLD: Strategies and Methods to Manage and Secure Your Cloud

Cisco Cloud Services Router 1000V and Amazon Web Services CASE STUDY

EASILY DEPLOY AND SCALE KUBERNETES WITH RANCHER

Ahead in the Cloud. Matt Wood TECHNOLOGY EVANGELIST

Das Leben ist zu kurz

Amazon AWS-DevOps-Engineer-Professional Exam

Splunk & Amazon Web Services

Transcription:

Deep Dive on Microservices and ECS Abby Fuller, Sr Technical Evangelist, AWS Peter Wong, Travelex June 28, 2017 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.

Agenda What are microservices? Lightning ECS overview Let s get feature specific Flexible orchestration and ECS Container lifecycle with ecs-cli Customer use case: Travelex

What are microservices?

Service oriented architecture composed of loosely coupled elements that have bounded contexts. - Adrian Cockroft

Monolith vs. Microservices Order UI Order Service Inventory Service Shipping Service.package webserver OrderUI Inventory Service Order Service Shipping Service

Characteristics of Microservice Architectures Decentralized Polyglot Independent Do one thing well Black box You build it, you run it

Amazon EC2 Container Service

Amazon EC2 Container Service (ECS) Highly scalable, high performance container management system. Eliminates the need to install, operate, and scale your own container management infrastructure.

Amazon EC2 Container Service (ECS) ECS provides a managed platform for: Deep AWS integration Container orchestration Cluster management

How does ECS map to traditional workloads? Instances: standard EC2 boxes. Once registered to a Cluster, your Tasks run here Services: layer that manages and places Tasks Tasks: container wrapper and configuration around processes running on the instance

Who is using ECS? and many more!

Why ECS? Fully managed Shared state optimistic scheduling Native Cloudwatch integration for monitoring and logging Native integration with Code* services for CI/CD

Choose your own Scheduler Batch Jobs ECS task scheduler Run tasks once Batch jobs RunTask (random) StartTask (placed) Long-Running Apps ECS service scheduler Health management Scale-up and scale-down AZ aware Grouped containers

Let s get (feature) specific

Amazon ECS Task Placement A task placement strategy is an algorithm for selecting instances for task placement, or tasks for termination A task placement constraint is a rule taken into consideration during task placement Strategies and constraints can be used together

How can strategies and policies be used? Name AMI ID Availability Zone Instance Type Distinct Instances Custom Example attribute:ecs.ami-id == ami-eca289fb attribute:ecs.availability-zone == us-east-1a attribute:ecs.instance-type == t2.small type= distinctinstances attribute:stack == prod

Multiple strategies are supported??? Binpacking Random Spread

How it works Cluster Constraints Custom Constraints Placement Strategies Apply filter Satisfy CPU, memory, and port requirements Filter for location, instance-type, AMI, or custom attribute constraints Identify instances that meet spread or binpack placement strategy Select final container instances for placement

Amazon ECS Event Stream for Cloudwatch Logs Receive near real-time updates about both the current state of both the container instances within the ECS Cluster, and the current state of all tasks running on those container instances. Can be used to build custom schedulers, or to monitor cluster state and handle those state changes by consuming events with other AWS services, such as Lambda.

Flexible orchestration and ECS

Flexibility is about choices Orchestration platforms should have: Sensible defaults The ability to extend and customize Pick one, or a combination of both.

First off: you have options

Spoiler alert: I like the console Why the console? JSON Quicker to test and get started Visual feedback JSON

But the console is not for everyone If you re customizing or automating, the CLI might be a better choice. Enter ecs-cli: Open source Takes Docker compose files Used to manage container lifecycles from start to finish on ECS I <3 CLIs

Container lifecycle with ecs-cli

First stop: creating a cluster $ aws ecs create-cluster --cluster-name summit" Should return something like: { } } "cluster": { "status": "ACTIVE", "clustername": summit", "registeredcontainerinstancescount": 0, "pendingtaskscount": 0, "runningtaskscount": 0, "activeservicescount": 0,

Then, create a task $ aws ecs register-task-definition --cli-input-json file://path/summit.json You can also use a JSON string: $ aws ecs register-task-definition --family summit -- container-definitions "[{\"name\":\ summit\",\"image\":\ alpine\",\"cpu\":10,\ "command\":[\"sleep\",\"360\"],\"memory\":10,\"essential \":true}]"

Next, use our task to create a service $ aws ecs create-service --service-name summit--taskdefinition summit --desired-count 2 You can add more parameters here, such as placement strategy. You can also register your new service with an ELB/ALB.

Summits are pretty popular. Let s scale up. $ aws ecs update-service --service summit --desiredcount 4 We could use this same command to scale down (which we ll look at next), but also to update the task definition. Effectively, deploy a new version!

We don t want to waste resources though, so let s scale back down $ aws ecs update-service --service my-http-service -- desired-count 2 In a production environment, this is something we might want to handle in response to other events: autoscaling!

We can also query state $ aws ecs describe-services --service summit This returns A TON of information about our service: most importantly, it shows us our current deployment, and what events are happening in our cluster: "events": [ { "message": "(service summit) has reached a steady state."

Bye London! $ aws ecs delete-cluster --cluster summit Important to note that we have to scale our service down to 0, and remove the service before running this: just in case! $ aws ecs update-service --service summit --desiredcount 0 $ aws ecs delete-service --service summit

Customer use case: Travelex Peter Wong

Travelex at a glance First opened in London in 1976, Travelex is a world leading foreign exchange expert with presence in 29 countries, a growing online and mobile foreign exchange platform and a network of 1,000 ATMs and 1,500 stores

Travelex at a glance 1980 1990 2000 2010 1976: First store opens in Southampton Row, London 1982: First ferry outlet opens on the P&O ferry serving Rotterdam 1984: First overseas branch opens in the Netherlands, North Sea terminal, Rotterdam 1986: First non-bank FX provider at Heathrow T4 1990: First branches opened in Australia, Brisbane (Domestic terminal) 1989: First branches opened in the USA, in JFK airport 1995: Abbey National buys a 33% stake of Travelex takeover of their FX 1999: Travelex acquires Barclay s FX in the UK start of vault 2001: Travelex acquires Thomas Cook FS 2003: Travelex partners with the National Theatre to launch Travelex ticket season 2003: Travelex opens in India and the Middle East (in Oman) 2004: Travelex opens in China 2014: Travelex embarks on digital transformation strategy 2015: Travelex sold to Dr Shetty and Mr Saeed Bin Butti 2015: First exclusive foreign exchange provider at Heathrow airport 2016: 40 th anniversary 2017: Travelex Wire launches 35

Engineering @ Travelex Deliver international payments securely at scale Engineering Challenges: E2E Encryption E2E Auditability (build, test, release, deploy, runtime) compliance Ingress and egress security Multi-tenancy multiple clients Reusable API driven components cross products Continuous Deployment 24/7 operations 36

Develop micro-services architecture Single function Composable Reduce risks Reduce time to market Increase development flexibility Increase operational flexibility 37

38

Develop micro-services architecture following 12-Factor App Codebase Dependencies Config Backing services Build, Release, Run Process Port binding Concurrency Disposability Dev/prod parity Logs Admin process 39

Develop micro-services architecture following 12-Factor App with AWS ECS Codebase Dependencies Config Backing services Build, Release, Run Process Port binding Concurrency Disposability Dev/prod parity Logs Admin process 40

Develop micro-services architecture following 12-Factor App with AWS ECS Codebase Dependencies Config Backing services Build, Release, Run Process Port binding Concurrency Disposability Dev/prod parity Logs Admin process 41

Service provisioning via Cloudformation Cloudfront Classic ELB RDS ECS Route 53 SES SQS SNS S3 Nginx (reverse proxy) 42

E2E Ingress and Egress Flows Cloudfront to Nginx Service to Service Service to Internet (3 rd parties) Service to RDS Hashicorp Vault (PKI) 43

Example: fetching a rate Retrieve a rate from a 3 rd party Apply % margin Apply numerical methods to fix quote side 44

45

Thank You 46

Thank you!