SlideShare uma empresa Scribd logo
1 de 62
Baixar para ler offline
www.chmurowisko.pl
RUNNING CONTAINERS
05.09.2019 Przemysław Malak – Chmurowisko
Łukasz Dorosz - Chmurowisko
IN AMAZONWEB SERVICES
WEBINAR
Cloud Architect - Chmurowisko
Przemek Malak
Head of AWS Architecture/
Cloud Architect - Chmurowisko
Łukasz Dorosz
About us
Cloud Adoption
Strategy
WHAT WE DO
Cloud Implementation
Guide
Executive
Consulting
Cloud Security
Cloud Migration Plan AI/ML BIG DATA Trainings
Agenda
1. Docker
2. ECS
3. DEMO
4. EKS
5. DEMO
6. Q&A https://sli.do PIN: #8365
7. Contest
What you can expect
Have a question? Just ask us in SLI.DO #8365
Questions: sli.do #8365
What is Docker?
Chmurowisko Sp. z o.o.
Docker is an open
platform that allows you
to build, ship, and run
distributed applications,
whether on laptop, data
center VMs or the Cloud.
Docker packages
software into
standardised units called
Containers.
Containers allow you to easily
package an application’s code,
dependencies and configuration
into easy to use building blocks.
It’s provide environmental
consistency, operational
efficiency and version control.
10.09.2019
Questions: sli.do #8365
How it different from virtualization?
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Advantages of Containerisation
Forget about dependencynightmares
Consistent progression from DEV -> TEST -> QA -> PROD
Isolation- performance or stabilityissues of App A in containerA, wont impact App B in containerB.
Better resource management.
Extreme code portability
Microservices
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Docker components
Chmurowisko Sp. z o.o.
Docker images
Docker container
Layers / Union file system
DockerFile
Docker Engine
Docker Client
Docker registries / Docker hub
10.09.2019
Questions: sli.do #8365
Containers are everywhere
Chmurowisko Sp. z o.o.
AWS Lambda
AWS Elastic
Beanstalk
Amazon EC2
10.09.2019
AWS Batch
Amazon Elastic
Container Service
Questions: sli.do #8365
Amazon Elastic Container Service
Amazon Elastic Container Service (AmazonECS) is a highly scalable, high-performance container
orchestration service that supports Docker containers and allows you to easily run and scale
containerized applications on AWS.
With simple API calls, you can launch and stop Docker-enabled applications, query the complete
state of your application, and access many familiar features such as IAM roles, security groups, load
balancers, AmazonCloudWatch Events, AWS CloudFormation templates, and AWS CloudTrail logs.
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Features of Amazon ECS
Chmurowisko Sp. z o.o.
Amazon ECS is a regional service that simplifies running application containers in a highly available manner across multiple
Availability Zones within a region. You can create Amazon ECS clusters within a new or existing VPC.
To deploy applications on Amazon ECS, your application components must be architected to run in containers.
A Docker container is a standardized unit of software development, containing everything that your software application
needs to run: code, runtime, system tools, system libraries, etc. Containers are created from a read-only template called an
image.
Images are typically built from a Dockerfile, a plain text file that specifies all of the components that are included in the
container.
These images are then stored in a registry from which they can be downloaded and run on your cluster.
10.09.2019
Questions: sli.do #8365
Containers and Images
Chmurowisko Sp. z o.o.
Container Registry
(Amazon ECR, Docker Hub,
self-hosted)
Container
Image
Dockerfile
Create container image
Publish image
10.09.2019
Questions: sli.do #8365
Task definition
To prepare your application to run on Amazon ECS, you create a task definition.
The task definition is a text file, in JSON format, that describes one or more containers, up to a
maximum of ten, that form your application. Task definitions specify various parameters for your
application like:
• Imagefor containers in your task
• CPU and RAM for each container
• Networking mode
• IAM Role for task
• Environment Variables passed into containers
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Task scheduler
The Amazon ECS task scheduler is responsible for placing tasks
within your cluster.
There are several different scheduling options available.
For example, you can define a service that runs and maintains a
specified number of tasks simultaneously.
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Scheduled Tasks
• Fixed interval:
• Minutes
• Hours
• Days
• cron expression
• cron(0 1 * * ? *) – run daily at 1AM (UTC)
• cron(0 19 ? * 2L *) – run 19 last Monday of the month
• cron(0/15 * * * ? *) – run every 15 minutes
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Task Placement Strategies
Algorithm that spreads tasks across instances in ECS cluster.
• CPU requirements
• Memory requirements
• Available resources
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Task Placement Strategies
Available strategies
• Binpack – places tasks n the least available CPU or memory. Used to minimize stances in use.
• Spread – places tasks evenly based on an attriguite of an instance i.e. AZ
• Random – places task on any random instance
TASK DEFINITION TASK DEFINITION
Binpack Spread
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Clusters
When you run tasks using AmazonECS, you place them on a cluster, which is a logical grouping of
resources.
If you use the Fargate launch type with tasks within your cluster, AmazonECS manages your cluster
resources.
If you use the EC2 launch type, then your clusters will be a group of container instances you
manage.
Amazon ECS downloads your container images from a registry that you specify, and runs those
images within your cluster.
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Container Agent
The container agent runs on each infrastructure resource within an AmazonECS cluster. It sends
information about the resource's current running tasks and resource utilization to Amazon ECS, and
starts and stops tasks whenever it receives a request from Amazon ECS.
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Container Registry
(Amazon ECR,Docker Hub,
self-hosted)
ECS Agent
Tasks
Run tasks
Schedule task
Amazon ECS Cluster
Download container
image
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Task Lifecycle
PENDING RUNNING STOPPED
Start End
Failed on startup
Pull container image
and start
Run task or
exits with error
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Service
Service supervises task.
It keeps tasks running.
Exposes tasks to outside world.
Tracks where in the cluster task is running.
Directs traffic to the correct instsance and port.
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Dynamic Host Port Mapping
tcp/80 tcp/80 tcp/80 tcp/80
"portMappings": [
{
"hostPort": 0,
"protocol": "tcp",
"containerPort": 80
}
],
tcp/32678 tcp/32679 tcp/32680 tcp/32681
Task 1
tcp/80
Chmurowisko Sp. z o.o.10.09.2019
OK AZ Outage
High Availability
VPC
Availability Zone
Subnet
ECS Host
ECS Host
Availability Zone
Subnet
ECS Host
ECS Host
VPC
Availability Zone
Subnet
ECS Host
ECS Host
Availability Zone
Subnet
ECS Host
ECS Host
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Service Discovery
AWS Cloud
Amazon Route 53
Multivalue Answer Routing
Namespace: local
service1server.local
10.0.0.6
10.0.0.8
VPC
Availability Zone
Subnet
Availability Zone
SubnetECS Cluster
IP/port
Task Registrations
Health Checks
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Path Based Routing
Instance 1 Instance 2 Instance 3
web auth web serviceservice service
/web*
/auth*
/service*
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Autoscaling
VPC
Availability Zone
Subnet
ECS Host
ECS Host
Availability Zone
Subnet
ECS Host
ECS Host
ECS Cluster
CloudWatch
ECS
Metrics
Scale in/out
policies
Add or
Remove
tasks
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
AWS Fargate
AWS Fargate is a technology for AmazonECS and EKS* that allows you to run containers without
having to manageservers or clusters.
*maybe in future
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Cost Optimization
Right-sizing instances
• Measure utilization in CloudWatch
• Select the cheapest instance that satisfies requirements
• Look at memory, CPU, network and storage
Do not use reserved instances at the beginning. Only after right sizing.
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Cost Optimization
c5.xlarge
m5.large
On-demand price Specs CloudWatch Metrics
139 $ 4 vCPUs
8 GiB RAM
35% CPU
On-demand price Specs Savings
83 $ 2 vCPUs
8 GiB RAM
~ 42 %
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Cost Optimization
Turn off non production instances
• Dev or test environments
• Automate– AWS Instance Scheduler
Enable autoscaling in production
• Combine on-demand instances with reserved instances
• Scale up and down based on demand
Chmurowisko Sp. z o.o.10.09.2019
EC2
COST
cost = instances * hours * instance hourly price
Example:
30 days * 5 t3.small instances
720 * 5 * 0,024$ = 86,4$/mo
Pricing Models
VPC
Availability Zone Availability Zone
ECS Cluster
EC2 instances EC2 instances
Chmurowisko Sp. z o.o.10.09.2019
Fargate
COST
Sum of:
• hours * vCPUs * vCPU hourly price
• hours * memory * memory hourly price
Example:
30 days, 1 v CPU, 2GiB
720 * 1 vCPU * 0,04048$ = 29,15$
720 * 2 GiB * 0.004445$ = 6,40$
29,15 + 6,40 = 35,55$/mo
Pricing Models
VPC
Availability Zone Availability Zone
ECS Cluster
Fargate Fargate
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
EC2 vs Fargate – What to choose?
FARGATE:
• Batch jobs
• Short-running tasks
EC2:
• Long-running tasks
• Services
• Access underlying instance
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
EC2 vs Fargate – What to choose?
FARGATE:
• Batch jobs
• Short-running tasks
EC2:
• Long-running tasks
• Services
• Access underlying instance
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
EC2 vs Fargate – What to choose?
PEOPLE COST
Chmurowisko Sp. z o.o.10.09.2019
DEMO FARGATE
Questions: sli.do #8365
DEMO FARGATE
WEB SERVICE
SERVICE 1
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
DEMO FARGATE
Chmurowisko Sp. z o.o.
Fargate Cluster
web
service1
/*
Amazon Route 53
service1
service1
10.09.2019
Amazon Elastic
Container Service
for Kubernetes
Questions: sli.do #8365
What is Kubernetes?
Open source conatiner orchestration system written i GoLang
Automatic deployment, scaling and management
Developed by Google based on Borg
Young: Released on July 2015
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Kubernetes architecture
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
What Is Amazon EKS?
Amazon Elastic Container Service for Kubernetes (Amazon EKS) is a managedservice that makes it
easy for you to run Kubernetes on AWS without needing to stand up or maintain your own
Kubernetes control plane.
Amazon EKS runs Kubernetes control plane instances across multiple Availability Zones to ensure
high availability.
Amazon EKS automaticallydetects and replaces unhealthy control plane instances, and it provides
automated version upgrades and patching for them.
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Introducing Amazon EKS
Chmurowisko Sp. z o.o.
Availability Zone 1 Availability Zone 2 Availability Zone 3
10.09.2019
Questions: sli.do #8365
Introducing Amazon EKS
Chmurowisko Sp. z o.o.
Availability Zone 1 Availability Zone 2 Availability Zone 3
democluster.eks.amazonaws.com
Masters (AWS Managed)
10.09.2019
Questions: sli.do #8365
Introducing Amazon EKS
Chmurowisko Sp. z o.o.
Availability Zone 1 Availability Zone 2 Availability Zone 3
democluster.eks.amazonaws.com
Masters (AWS Managed)
Workers (Customer Managed)
10.09.2019
Questions: sli.do #8365
Introducing Amazon EKS
Chmurowisko Sp. z o.o.
Availability Zone 1 Availability Zone 2 Availability Zone 3
democluster.eks.amazonaws.com
Masters (AWS Managed)
Workers (Customer Managed)
kubectl
10.09.2019
Questions: sli.do #8365
Introducing Amazon EKS
• Applications running on Amazon EKS are fully compatible with applications running on any
standard Kubernetes environment.
• Amazon EKS automaticallyruns K8s with three masters across three AZs to protect againsta
single point of failure.
• Amazon EKS also automatically detects and replaces unhealthy masters, and it provides
automated version upgrades and patching for the masters.
• Amazon EKS is integrated with a number of key AWS features such as Elastic Load Balancing for
load distribution, IAM for authentication, Amazon VPC for isolation, AWS PrivateLink for private
network access, and AWS CloudTrail for logging.
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
How Does Amazon EKS Work?
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Additional tools
CSI-DRIVERS
AWS-IAM-AUTHENTICATOR
AMAZON-VPC-CNI-K8S
more
Chmurowisko Sp. z o.o.10.09.2019
AWS-CSI-DRIVER for:
CSI driver for Amazon EBS
CSI Driver for Amazon EFS
CSI Driver of AmazonFSx
Automatically mounts volumes
Attach storage directly to containers
Container Storage Interface
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
aws-iam-authenticator
It provides IAM based authentication for Kubernetes cluster
Allow users to services access to resources
Ex. Connect to cluster and get a list of deployed pods
For permission control Kubernetes RBAC is used
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
VPC with Kubernetes pods
The CNI plugin is responsible for allocating VPC IP addresses to Kubernetes nodes and configuring
the necessary networking for pods on each node.
• Bridge between the K8s land – AmazonVPC
• Thin layer – no performance impact
• Pod IP ENI Secondary IP
• Security Group is attached to the ENI
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
VPC with Kubernetes pods
Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Calico Policy
Chmurowisko Sp. z o.o.
Project Calico is a network policy engine for Kubernetes.
Implement network segmentation and tenant isolation.
You can assignnetwork policies to pods using pod selectors and labels.
10.09.2019
Questions: sli.do #8365Chmurowisko Sp. z o.o.10.09.2019
Questions: sli.do #8365
Amazon EKS Workshop
10.09.2019 Chmurowisko Sp. z o.o.
Q&A
Contest
Jak nazywa się usługa, która pozwala nam
zarządzać naszymi mikro serwisami za pomocą
Service Discovery?
lukasz@chmurowisko.pl

Mais conteúdo relacionado

Mais procurados

Multi host container networking
Multi host container networkingMulti host container networking
Multi host container networkingWeaveworks
 
Deploy Elasticsearch Cluster on Kubernetes
Deploy Elasticsearch Cluster on KubernetesDeploy Elasticsearch Cluster on Kubernetes
Deploy Elasticsearch Cluster on KubernetesIsmaeel Enjreny
 
GlobalAzureBootCamp 2018
GlobalAzureBootCamp 2018GlobalAzureBootCamp 2018
GlobalAzureBootCamp 2018girish goudar
 
My AWS production stack with Docker, ECS, CloudFormation and other services
My AWS production stack with Docker, ECS, CloudFormation and other servicesMy AWS production stack with Docker, ECS, CloudFormation and other services
My AWS production stack with Docker, ECS, CloudFormation and other servicesVictor Holban
 
Installing WordPress on AWS
Installing WordPress on AWSInstalling WordPress on AWS
Installing WordPress on AWSManish Jain
 
Apache jclouds and Docker
Apache jclouds and DockerApache jclouds and Docker
Apache jclouds and DockerAndrea Turli
 
Amazon Web Services EC2 Container Service (ECS)
Amazon Web Services EC2 Container Service (ECS)Amazon Web Services EC2 Container Service (ECS)
Amazon Web Services EC2 Container Service (ECS)Mayank Patel
 
Micrsoservices unleashed with containers and ECS
Micrsoservices unleashed with containers and ECSMicrsoservices unleashed with containers and ECS
Micrsoservices unleashed with containers and ECSAmazon Web Services
 
OpenEBS - Containerized Storage for Containers
OpenEBS  - Containerized Storage for ContainersOpenEBS  - Containerized Storage for Containers
OpenEBS - Containerized Storage for ContainersUmasankar Mukkara
 
Scaling drupal horizontally and in cloud
Scaling drupal horizontally and in cloudScaling drupal horizontally and in cloud
Scaling drupal horizontally and in cloudVladimir Ilic
 
AWS Summit 2013 | Auckland - Your First Week with Amazon EC2
AWS Summit 2013 | Auckland - Your First Week with Amazon EC2AWS Summit 2013 | Auckland - Your First Week with Amazon EC2
AWS Summit 2013 | Auckland - Your First Week with Amazon EC2Amazon Web Services
 
AWS Elastic Container Service
AWS Elastic Container ServiceAWS Elastic Container Service
AWS Elastic Container ServiceLadislav Prskavec
 
Programming Amazon Web Services for Beginners (1)
Programming Amazon Web Services for Beginners (1)Programming Amazon Web Services for Beginners (1)
Programming Amazon Web Services for Beginners (1)Markus Klems
 
Kubernetes on IBM Cloud + DevOps コンテナCIで簡易アプリ作ってみた
Kubernetes on IBM Cloud + DevOps コンテナCIで簡易アプリ作ってみたKubernetes on IBM Cloud + DevOps コンテナCIで簡易アプリ作ってみた
Kubernetes on IBM Cloud + DevOps コンテナCIで簡易アプリ作ってみたShoichiro Sakaigawa
 
Cnam azure 2014 web sites et integration continue
Cnam azure 2014  web sites et integration continueCnam azure 2014  web sites et integration continue
Cnam azure 2014 web sites et integration continueAymeric Weinbach
 
Case study of amazon EC2 by Akash Badone
Case study of amazon EC2 by Akash BadoneCase study of amazon EC2 by Akash Badone
Case study of amazon EC2 by Akash BadoneAkash Badone
 

Mais procurados (20)

Multi host container networking
Multi host container networkingMulti host container networking
Multi host container networking
 
Deploy Elasticsearch Cluster on Kubernetes
Deploy Elasticsearch Cluster on KubernetesDeploy Elasticsearch Cluster on Kubernetes
Deploy Elasticsearch Cluster on Kubernetes
 
GlobalAzureBootCamp 2018
GlobalAzureBootCamp 2018GlobalAzureBootCamp 2018
GlobalAzureBootCamp 2018
 
My AWS production stack with Docker, ECS, CloudFormation and other services
My AWS production stack with Docker, ECS, CloudFormation and other servicesMy AWS production stack with Docker, ECS, CloudFormation and other services
My AWS production stack with Docker, ECS, CloudFormation and other services
 
Installing WordPress on AWS
Installing WordPress on AWSInstalling WordPress on AWS
Installing WordPress on AWS
 
Amazon ec2
Amazon ec2Amazon ec2
Amazon ec2
 
Apache jclouds and Docker
Apache jclouds and DockerApache jclouds and Docker
Apache jclouds and Docker
 
Amazon Web Services EC2 Container Service (ECS)
Amazon Web Services EC2 Container Service (ECS)Amazon Web Services EC2 Container Service (ECS)
Amazon Web Services EC2 Container Service (ECS)
 
Docker at AWS
Docker at AWSDocker at AWS
Docker at AWS
 
Micrsoservices unleashed with containers and ECS
Micrsoservices unleashed with containers and ECSMicrsoservices unleashed with containers and ECS
Micrsoservices unleashed with containers and ECS
 
Azure Container Services
Azure Container Services Azure Container Services
Azure Container Services
 
OpenEBS - Containerized Storage for Containers
OpenEBS  - Containerized Storage for ContainersOpenEBS  - Containerized Storage for Containers
OpenEBS - Containerized Storage for Containers
 
Scaling drupal horizontally and in cloud
Scaling drupal horizontally and in cloudScaling drupal horizontally and in cloud
Scaling drupal horizontally and in cloud
 
Amazon (AWS) cloud syllabus
Amazon (AWS) cloud syllabusAmazon (AWS) cloud syllabus
Amazon (AWS) cloud syllabus
 
AWS Summit 2013 | Auckland - Your First Week with Amazon EC2
AWS Summit 2013 | Auckland - Your First Week with Amazon EC2AWS Summit 2013 | Auckland - Your First Week with Amazon EC2
AWS Summit 2013 | Auckland - Your First Week with Amazon EC2
 
AWS Elastic Container Service
AWS Elastic Container ServiceAWS Elastic Container Service
AWS Elastic Container Service
 
Programming Amazon Web Services for Beginners (1)
Programming Amazon Web Services for Beginners (1)Programming Amazon Web Services for Beginners (1)
Programming Amazon Web Services for Beginners (1)
 
Kubernetes on IBM Cloud + DevOps コンテナCIで簡易アプリ作ってみた
Kubernetes on IBM Cloud + DevOps コンテナCIで簡易アプリ作ってみたKubernetes on IBM Cloud + DevOps コンテナCIで簡易アプリ作ってみた
Kubernetes on IBM Cloud + DevOps コンテナCIで簡易アプリ作ってみた
 
Cnam azure 2014 web sites et integration continue
Cnam azure 2014  web sites et integration continueCnam azure 2014  web sites et integration continue
Cnam azure 2014 web sites et integration continue
 
Case study of amazon EC2 by Akash Badone
Case study of amazon EC2 by Akash BadoneCase study of amazon EC2 by Akash Badone
Case study of amazon EC2 by Akash Badone
 

Semelhante a Containers in AWS

Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...
Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...
Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...Codemotion
 
Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...
Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...
Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...Codemotion
 
AWS Certified Solutions Architect Associate Notes.pdf
AWS Certified Solutions Architect Associate Notes.pdfAWS Certified Solutions Architect Associate Notes.pdf
AWS Certified Solutions Architect Associate Notes.pdffayoyiwababajide
 
Ultimate Guide to Incident Response in AWS.pdf
Ultimate Guide to Incident Response in AWS.pdfUltimate Guide to Incident Response in AWS.pdf
Ultimate Guide to Incident Response in AWS.pdfChristopher Doman
 
Fowa Miami 09 Cloud Computing Workshop
Fowa Miami 09 Cloud Computing WorkshopFowa Miami 09 Cloud Computing Workshop
Fowa Miami 09 Cloud Computing WorkshopMark Masterson
 
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot Instances
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot InstancesWorkshop; Deploy a Deep Learning Framework on Amazon ECS and Spot Instances
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot InstancesAmazon Web Services
 
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot InstancesWKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot InstancesAmazon Web Services
 
Cloud Computing Workshop
Cloud Computing WorkshopCloud Computing Workshop
Cloud Computing WorkshopCharlie Moad
 
(CMP404) Cloud Rendering at Walt Disney Animation Studios
(CMP404) Cloud Rendering at Walt Disney Animation Studios(CMP404) Cloud Rendering at Walt Disney Animation Studios
(CMP404) Cloud Rendering at Walt Disney Animation StudiosAmazon Web Services
 
"AWS Fargate: Containerization meets Serverless" at AWS User Group Cologne 20...
"AWS Fargate: Containerization meets Serverless" at AWS User Group Cologne 20..."AWS Fargate: Containerization meets Serverless" at AWS User Group Cologne 20...
"AWS Fargate: Containerization meets Serverless" at AWS User Group Cologne 20...Vadym Kazulkin
 
"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019
"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019
"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019Provectus
 
AWS Webcast - Best Practices in Architecting for the Cloud
AWS Webcast - Best Practices in Architecting for the CloudAWS Webcast - Best Practices in Architecting for the Cloud
AWS Webcast - Best Practices in Architecting for the CloudAmazon Web Services
 
Cloud Computing Primer: Using cloud computing tools in your museum
Cloud Computing Primer: Using cloud computing tools in your museumCloud Computing Primer: Using cloud computing tools in your museum
Cloud Computing Primer: Using cloud computing tools in your museumRobert J. Stein
 
AWS re:Invent 2016: Workshop: Deploy a Deep Learning Framework on Amazon ECS ...
AWS re:Invent 2016: Workshop: Deploy a Deep Learning Framework on Amazon ECS ...AWS re:Invent 2016: Workshop: Deploy a Deep Learning Framework on Amazon ECS ...
AWS re:Invent 2016: Workshop: Deploy a Deep Learning Framework on Amazon ECS ...Amazon Web Services
 
The IoT Academy_awstraining_part2_aws_ec2_iaas
The IoT Academy_awstraining_part2_aws_ec2_iaasThe IoT Academy_awstraining_part2_aws_ec2_iaas
The IoT Academy_awstraining_part2_aws_ec2_iaasThe IOT Academy
 
Amazon cloud intance launch3
Amazon cloud intance launch3Amazon cloud intance launch3
Amazon cloud intance launch3Zenita Smythe
 
Amazon cloud intance launch3
Amazon cloud intance launch3Amazon cloud intance launch3
Amazon cloud intance launch3Zenita Smythe
 
Amazon cloud intance launch
Amazon cloud intance launchAmazon cloud intance launch
Amazon cloud intance launchZenita Smythe
 
A Step By Step Guide To Put DB2 On Amazon Cloud
A Step By Step Guide To Put DB2 On Amazon CloudA Step By Step Guide To Put DB2 On Amazon Cloud
A Step By Step Guide To Put DB2 On Amazon CloudDeepak Rao
 

Semelhante a Containers in AWS (20)

Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...
Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...
Max Körbächer - AWS EKS and beyond – master your Kubernetes deployment on AWS...
 
Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...
Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...
Max Körbächer - AWS EKS and beyond master your Kubernetes deployment on AWS -...
 
AWS Certified Solutions Architect Associate Notes.pdf
AWS Certified Solutions Architect Associate Notes.pdfAWS Certified Solutions Architect Associate Notes.pdf
AWS Certified Solutions Architect Associate Notes.pdf
 
Aws coi7
Aws coi7Aws coi7
Aws coi7
 
Ultimate Guide to Incident Response in AWS.pdf
Ultimate Guide to Incident Response in AWS.pdfUltimate Guide to Incident Response in AWS.pdf
Ultimate Guide to Incident Response in AWS.pdf
 
Fowa Miami 09 Cloud Computing Workshop
Fowa Miami 09 Cloud Computing WorkshopFowa Miami 09 Cloud Computing Workshop
Fowa Miami 09 Cloud Computing Workshop
 
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot Instances
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot InstancesWorkshop; Deploy a Deep Learning Framework on Amazon ECS and Spot Instances
Workshop; Deploy a Deep Learning Framework on Amazon ECS and Spot Instances
 
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot InstancesWKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
WKS401 Deploy a Deep Learning Framework on Amazon ECS and EC2 Spot Instances
 
Cloud Computing Workshop
Cloud Computing WorkshopCloud Computing Workshop
Cloud Computing Workshop
 
(CMP404) Cloud Rendering at Walt Disney Animation Studios
(CMP404) Cloud Rendering at Walt Disney Animation Studios(CMP404) Cloud Rendering at Walt Disney Animation Studios
(CMP404) Cloud Rendering at Walt Disney Animation Studios
 
"AWS Fargate: Containerization meets Serverless" at AWS User Group Cologne 20...
"AWS Fargate: Containerization meets Serverless" at AWS User Group Cologne 20..."AWS Fargate: Containerization meets Serverless" at AWS User Group Cologne 20...
"AWS Fargate: Containerization meets Serverless" at AWS User Group Cologne 20...
 
"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019
"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019
"Scaling ML from 0 to millions of users", Julien Simon, AWS Dev Day Kyiv 2019
 
AWS Webcast - Best Practices in Architecting for the Cloud
AWS Webcast - Best Practices in Architecting for the CloudAWS Webcast - Best Practices in Architecting for the Cloud
AWS Webcast - Best Practices in Architecting for the Cloud
 
Cloud Computing Primer: Using cloud computing tools in your museum
Cloud Computing Primer: Using cloud computing tools in your museumCloud Computing Primer: Using cloud computing tools in your museum
Cloud Computing Primer: Using cloud computing tools in your museum
 
AWS re:Invent 2016: Workshop: Deploy a Deep Learning Framework on Amazon ECS ...
AWS re:Invent 2016: Workshop: Deploy a Deep Learning Framework on Amazon ECS ...AWS re:Invent 2016: Workshop: Deploy a Deep Learning Framework on Amazon ECS ...
AWS re:Invent 2016: Workshop: Deploy a Deep Learning Framework on Amazon ECS ...
 
The IoT Academy_awstraining_part2_aws_ec2_iaas
The IoT Academy_awstraining_part2_aws_ec2_iaasThe IoT Academy_awstraining_part2_aws_ec2_iaas
The IoT Academy_awstraining_part2_aws_ec2_iaas
 
Amazon cloud intance launch3
Amazon cloud intance launch3Amazon cloud intance launch3
Amazon cloud intance launch3
 
Amazon cloud intance launch3
Amazon cloud intance launch3Amazon cloud intance launch3
Amazon cloud intance launch3
 
Amazon cloud intance launch
Amazon cloud intance launchAmazon cloud intance launch
Amazon cloud intance launch
 
A Step By Step Guide To Put DB2 On Amazon Cloud
A Step By Step Guide To Put DB2 On Amazon CloudA Step By Step Guide To Put DB2 On Amazon Cloud
A Step By Step Guide To Put DB2 On Amazon Cloud
 

Último

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 

Último (20)

Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 

Containers in AWS

  • 1. www.chmurowisko.pl RUNNING CONTAINERS 05.09.2019 Przemysław Malak – Chmurowisko Łukasz Dorosz - Chmurowisko IN AMAZONWEB SERVICES WEBINAR
  • 2. Cloud Architect - Chmurowisko Przemek Malak Head of AWS Architecture/ Cloud Architect - Chmurowisko Łukasz Dorosz About us
  • 3. Cloud Adoption Strategy WHAT WE DO Cloud Implementation Guide Executive Consulting Cloud Security Cloud Migration Plan AI/ML BIG DATA Trainings
  • 4. Agenda 1. Docker 2. ECS 3. DEMO 4. EKS 5. DEMO 6. Q&A https://sli.do PIN: #8365 7. Contest What you can expect Have a question? Just ask us in SLI.DO #8365
  • 5. Questions: sli.do #8365 What is Docker? Chmurowisko Sp. z o.o. Docker is an open platform that allows you to build, ship, and run distributed applications, whether on laptop, data center VMs or the Cloud. Docker packages software into standardised units called Containers. Containers allow you to easily package an application’s code, dependencies and configuration into easy to use building blocks. It’s provide environmental consistency, operational efficiency and version control. 10.09.2019
  • 6. Questions: sli.do #8365 How it different from virtualization? Chmurowisko Sp. z o.o.10.09.2019
  • 7. Questions: sli.do #8365 Advantages of Containerisation Forget about dependencynightmares Consistent progression from DEV -> TEST -> QA -> PROD Isolation- performance or stabilityissues of App A in containerA, wont impact App B in containerB. Better resource management. Extreme code portability Microservices Chmurowisko Sp. z o.o.10.09.2019
  • 8. Questions: sli.do #8365 Docker components Chmurowisko Sp. z o.o. Docker images Docker container Layers / Union file system DockerFile Docker Engine Docker Client Docker registries / Docker hub 10.09.2019
  • 9. Questions: sli.do #8365 Containers are everywhere Chmurowisko Sp. z o.o. AWS Lambda AWS Elastic Beanstalk Amazon EC2 10.09.2019 AWS Batch
  • 11. Questions: sli.do #8365 Amazon Elastic Container Service Amazon Elastic Container Service (AmazonECS) is a highly scalable, high-performance container orchestration service that supports Docker containers and allows you to easily run and scale containerized applications on AWS. With simple API calls, you can launch and stop Docker-enabled applications, query the complete state of your application, and access many familiar features such as IAM roles, security groups, load balancers, AmazonCloudWatch Events, AWS CloudFormation templates, and AWS CloudTrail logs. Chmurowisko Sp. z o.o.10.09.2019
  • 12. Questions: sli.do #8365 Features of Amazon ECS Chmurowisko Sp. z o.o. Amazon ECS is a regional service that simplifies running application containers in a highly available manner across multiple Availability Zones within a region. You can create Amazon ECS clusters within a new or existing VPC. To deploy applications on Amazon ECS, your application components must be architected to run in containers. A Docker container is a standardized unit of software development, containing everything that your software application needs to run: code, runtime, system tools, system libraries, etc. Containers are created from a read-only template called an image. Images are typically built from a Dockerfile, a plain text file that specifies all of the components that are included in the container. These images are then stored in a registry from which they can be downloaded and run on your cluster. 10.09.2019
  • 13. Questions: sli.do #8365 Containers and Images Chmurowisko Sp. z o.o. Container Registry (Amazon ECR, Docker Hub, self-hosted) Container Image Dockerfile Create container image Publish image 10.09.2019
  • 14. Questions: sli.do #8365 Task definition To prepare your application to run on Amazon ECS, you create a task definition. The task definition is a text file, in JSON format, that describes one or more containers, up to a maximum of ten, that form your application. Task definitions specify various parameters for your application like: • Imagefor containers in your task • CPU and RAM for each container • Networking mode • IAM Role for task • Environment Variables passed into containers Chmurowisko Sp. z o.o.10.09.2019
  • 15. Questions: sli.do #8365 Task scheduler The Amazon ECS task scheduler is responsible for placing tasks within your cluster. There are several different scheduling options available. For example, you can define a service that runs and maintains a specified number of tasks simultaneously. Chmurowisko Sp. z o.o.10.09.2019
  • 16. Questions: sli.do #8365 Scheduled Tasks • Fixed interval: • Minutes • Hours • Days • cron expression • cron(0 1 * * ? *) – run daily at 1AM (UTC) • cron(0 19 ? * 2L *) – run 19 last Monday of the month • cron(0/15 * * * ? *) – run every 15 minutes Chmurowisko Sp. z o.o.10.09.2019
  • 17. Questions: sli.do #8365 Task Placement Strategies Algorithm that spreads tasks across instances in ECS cluster. • CPU requirements • Memory requirements • Available resources Chmurowisko Sp. z o.o.10.09.2019
  • 18. Questions: sli.do #8365 Task Placement Strategies Available strategies • Binpack – places tasks n the least available CPU or memory. Used to minimize stances in use. • Spread – places tasks evenly based on an attriguite of an instance i.e. AZ • Random – places task on any random instance TASK DEFINITION TASK DEFINITION Binpack Spread Chmurowisko Sp. z o.o.10.09.2019
  • 19. Questions: sli.do #8365 Clusters When you run tasks using AmazonECS, you place them on a cluster, which is a logical grouping of resources. If you use the Fargate launch type with tasks within your cluster, AmazonECS manages your cluster resources. If you use the EC2 launch type, then your clusters will be a group of container instances you manage. Amazon ECS downloads your container images from a registry that you specify, and runs those images within your cluster. Chmurowisko Sp. z o.o.10.09.2019
  • 20. Questions: sli.do #8365 Container Agent The container agent runs on each infrastructure resource within an AmazonECS cluster. It sends information about the resource's current running tasks and resource utilization to Amazon ECS, and starts and stops tasks whenever it receives a request from Amazon ECS. Chmurowisko Sp. z o.o.10.09.2019
  • 21. Questions: sli.do #8365 Container Registry (Amazon ECR,Docker Hub, self-hosted) ECS Agent Tasks Run tasks Schedule task Amazon ECS Cluster Download container image Chmurowisko Sp. z o.o.10.09.2019
  • 22. Questions: sli.do #8365 Task Lifecycle PENDING RUNNING STOPPED Start End Failed on startup Pull container image and start Run task or exits with error Chmurowisko Sp. z o.o.10.09.2019
  • 23. Questions: sli.do #8365 Service Service supervises task. It keeps tasks running. Exposes tasks to outside world. Tracks where in the cluster task is running. Directs traffic to the correct instsance and port. Chmurowisko Sp. z o.o.10.09.2019
  • 24. Questions: sli.do #8365 Dynamic Host Port Mapping tcp/80 tcp/80 tcp/80 tcp/80 "portMappings": [ { "hostPort": 0, "protocol": "tcp", "containerPort": 80 } ], tcp/32678 tcp/32679 tcp/32680 tcp/32681 Task 1 tcp/80 Chmurowisko Sp. z o.o.10.09.2019
  • 25. OK AZ Outage High Availability VPC Availability Zone Subnet ECS Host ECS Host Availability Zone Subnet ECS Host ECS Host VPC Availability Zone Subnet ECS Host ECS Host Availability Zone Subnet ECS Host ECS Host Chmurowisko Sp. z o.o.10.09.2019
  • 26. Questions: sli.do #8365 Service Discovery AWS Cloud Amazon Route 53 Multivalue Answer Routing Namespace: local service1server.local 10.0.0.6 10.0.0.8 VPC Availability Zone Subnet Availability Zone SubnetECS Cluster IP/port Task Registrations Health Checks Chmurowisko Sp. z o.o.10.09.2019
  • 27. Questions: sli.do #8365 Path Based Routing Instance 1 Instance 2 Instance 3 web auth web serviceservice service /web* /auth* /service* Chmurowisko Sp. z o.o.10.09.2019
  • 28. Questions: sli.do #8365 Autoscaling VPC Availability Zone Subnet ECS Host ECS Host Availability Zone Subnet ECS Host ECS Host ECS Cluster CloudWatch ECS Metrics Scale in/out policies Add or Remove tasks Chmurowisko Sp. z o.o.10.09.2019
  • 29. Questions: sli.do #8365 AWS Fargate AWS Fargate is a technology for AmazonECS and EKS* that allows you to run containers without having to manageservers or clusters. *maybe in future Chmurowisko Sp. z o.o.10.09.2019
  • 30. Questions: sli.do #8365 Cost Optimization Right-sizing instances • Measure utilization in CloudWatch • Select the cheapest instance that satisfies requirements • Look at memory, CPU, network and storage Do not use reserved instances at the beginning. Only after right sizing. Chmurowisko Sp. z o.o.10.09.2019
  • 31. Questions: sli.do #8365 Cost Optimization c5.xlarge m5.large On-demand price Specs CloudWatch Metrics 139 $ 4 vCPUs 8 GiB RAM 35% CPU On-demand price Specs Savings 83 $ 2 vCPUs 8 GiB RAM ~ 42 % Chmurowisko Sp. z o.o.10.09.2019
  • 32. Questions: sli.do #8365 Cost Optimization Turn off non production instances • Dev or test environments • Automate– AWS Instance Scheduler Enable autoscaling in production • Combine on-demand instances with reserved instances • Scale up and down based on demand Chmurowisko Sp. z o.o.10.09.2019
  • 33. EC2 COST cost = instances * hours * instance hourly price Example: 30 days * 5 t3.small instances 720 * 5 * 0,024$ = 86,4$/mo Pricing Models VPC Availability Zone Availability Zone ECS Cluster EC2 instances EC2 instances Chmurowisko Sp. z o.o.10.09.2019
  • 34. Fargate COST Sum of: • hours * vCPUs * vCPU hourly price • hours * memory * memory hourly price Example: 30 days, 1 v CPU, 2GiB 720 * 1 vCPU * 0,04048$ = 29,15$ 720 * 2 GiB * 0.004445$ = 6,40$ 29,15 + 6,40 = 35,55$/mo Pricing Models VPC Availability Zone Availability Zone ECS Cluster Fargate Fargate Chmurowisko Sp. z o.o.10.09.2019
  • 35. Questions: sli.do #8365 EC2 vs Fargate – What to choose? FARGATE: • Batch jobs • Short-running tasks EC2: • Long-running tasks • Services • Access underlying instance Chmurowisko Sp. z o.o.10.09.2019
  • 36. Questions: sli.do #8365 EC2 vs Fargate – What to choose? FARGATE: • Batch jobs • Short-running tasks EC2: • Long-running tasks • Services • Access underlying instance Chmurowisko Sp. z o.o.10.09.2019
  • 37. Questions: sli.do #8365 EC2 vs Fargate – What to choose? PEOPLE COST Chmurowisko Sp. z o.o.10.09.2019
  • 39. Questions: sli.do #8365 DEMO FARGATE WEB SERVICE SERVICE 1 Chmurowisko Sp. z o.o.10.09.2019
  • 40. Questions: sli.do #8365 DEMO FARGATE Chmurowisko Sp. z o.o. Fargate Cluster web service1 /* Amazon Route 53 service1 service1 10.09.2019
  • 42. Questions: sli.do #8365 What is Kubernetes? Open source conatiner orchestration system written i GoLang Automatic deployment, scaling and management Developed by Google based on Borg Young: Released on July 2015 Chmurowisko Sp. z o.o.10.09.2019
  • 43. Questions: sli.do #8365 Kubernetes architecture Chmurowisko Sp. z o.o.10.09.2019
  • 44. Questions: sli.do #8365 What Is Amazon EKS? Amazon Elastic Container Service for Kubernetes (Amazon EKS) is a managedservice that makes it easy for you to run Kubernetes on AWS without needing to stand up or maintain your own Kubernetes control plane. Amazon EKS runs Kubernetes control plane instances across multiple Availability Zones to ensure high availability. Amazon EKS automaticallydetects and replaces unhealthy control plane instances, and it provides automated version upgrades and patching for them. Chmurowisko Sp. z o.o.10.09.2019
  • 45. Questions: sli.do #8365 Introducing Amazon EKS Chmurowisko Sp. z o.o. Availability Zone 1 Availability Zone 2 Availability Zone 3 10.09.2019
  • 46. Questions: sli.do #8365 Introducing Amazon EKS Chmurowisko Sp. z o.o. Availability Zone 1 Availability Zone 2 Availability Zone 3 democluster.eks.amazonaws.com Masters (AWS Managed) 10.09.2019
  • 47. Questions: sli.do #8365 Introducing Amazon EKS Chmurowisko Sp. z o.o. Availability Zone 1 Availability Zone 2 Availability Zone 3 democluster.eks.amazonaws.com Masters (AWS Managed) Workers (Customer Managed) 10.09.2019
  • 48. Questions: sli.do #8365 Introducing Amazon EKS Chmurowisko Sp. z o.o. Availability Zone 1 Availability Zone 2 Availability Zone 3 democluster.eks.amazonaws.com Masters (AWS Managed) Workers (Customer Managed) kubectl 10.09.2019
  • 49. Questions: sli.do #8365 Introducing Amazon EKS • Applications running on Amazon EKS are fully compatible with applications running on any standard Kubernetes environment. • Amazon EKS automaticallyruns K8s with three masters across three AZs to protect againsta single point of failure. • Amazon EKS also automatically detects and replaces unhealthy masters, and it provides automated version upgrades and patching for the masters. • Amazon EKS is integrated with a number of key AWS features such as Elastic Load Balancing for load distribution, IAM for authentication, Amazon VPC for isolation, AWS PrivateLink for private network access, and AWS CloudTrail for logging. Chmurowisko Sp. z o.o.10.09.2019
  • 50. Questions: sli.do #8365 How Does Amazon EKS Work? Chmurowisko Sp. z o.o.10.09.2019
  • 51. Questions: sli.do #8365 Additional tools CSI-DRIVERS AWS-IAM-AUTHENTICATOR AMAZON-VPC-CNI-K8S more Chmurowisko Sp. z o.o.10.09.2019
  • 52. AWS-CSI-DRIVER for: CSI driver for Amazon EBS CSI Driver for Amazon EFS CSI Driver of AmazonFSx Automatically mounts volumes Attach storage directly to containers Container Storage Interface Chmurowisko Sp. z o.o.10.09.2019
  • 53. Questions: sli.do #8365 aws-iam-authenticator It provides IAM based authentication for Kubernetes cluster Allow users to services access to resources Ex. Connect to cluster and get a list of deployed pods For permission control Kubernetes RBAC is used Chmurowisko Sp. z o.o.10.09.2019
  • 54. Questions: sli.do #8365 VPC with Kubernetes pods The CNI plugin is responsible for allocating VPC IP addresses to Kubernetes nodes and configuring the necessary networking for pods on each node. • Bridge between the K8s land – AmazonVPC • Thin layer – no performance impact • Pod IP ENI Secondary IP • Security Group is attached to the ENI Chmurowisko Sp. z o.o.10.09.2019
  • 55. Questions: sli.do #8365 VPC with Kubernetes pods Chmurowisko Sp. z o.o.10.09.2019
  • 56. Questions: sli.do #8365 Calico Policy Chmurowisko Sp. z o.o. Project Calico is a network policy engine for Kubernetes. Implement network segmentation and tenant isolation. You can assignnetwork policies to pods using pod selectors and labels. 10.09.2019
  • 57. Questions: sli.do #8365Chmurowisko Sp. z o.o.10.09.2019
  • 58. Questions: sli.do #8365 Amazon EKS Workshop 10.09.2019 Chmurowisko Sp. z o.o.
  • 59. Q&A
  • 61. Jak nazywa się usługa, która pozwala nam zarządzać naszymi mikro serwisami za pomocą Service Discovery?