Share
Embed
Transcript
29 slides
-
@hoegertn About me • Thorsten Höger • Cloud Evangelist -
Taimos GmbH • Cloud Consultant • AWS Community Hero • twitter: @hoegertn • web: www.taimos.de -
@hoegertn Leistungen oTraining o Wir helfen Ihnen, ihr Team und
ihr Unternehmen für die Cloud fit zu machen o Workshops, Trainings, Reviews oBeratung o Mit unserer Erfahrung unterstützen wir Sie bei der Migration in die Cloud o Erfahrung, Kultur, DevOps oEntwicklung o Wir entwickeln Ihre Geschäftsanwendung mit Hilfe aktueller Technologien und Frameworks o Amazon Web Services, Docker, Serverless -
@hoegertn Agenda • What do we want to do? •
What is ECS / Fargate? • How to deploy using Infrastructure-as-Code? • How to build a pipeline using Github Actions • Questions & Feedback -
@hoegertn What do we want to do? VPC AWS Cloud
Availability Zone 1 ECS Service Availability Zone 2 NAT Gateway NAT Gateway Task Task ECR https://github.com/taimos/cdk-fargate-demo -
@hoegertn What is ECS / Fargate? Following slides are directly
from Amazon Web Services... -
© 2017, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. Amazon Elastic Container Service • Highly scaleable, high performance container management system. • Eliminates the need to install, operate and scale your own container management system. -
What are orchestration tools and why should I care? Containers
are lots of work (and moving pieces)! Orchestration tools help you manage, scale, and deploy your containers. -
© 2017, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. Amazon ECS • ECS provides a managed platform for: Cluster management Container orchestration Deep AWS integration -
© 2017, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. Amazon ECS • No software to: Deploy Manage Scale -
© 2017, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. Deep AWS integration Autoscaling Load balancing IAM Monitoring Networking Logging -
© 2017, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. How does ECS map to traditional workloads? Instances: standard EC2 boxes. Once registered to a Cluster, your Tasks run here Service: layer that manage and place your Tasks Task: container wrapper and configuration around a process running on the instance -
© 2017, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. How does ECS work? Staging cluster Production cluster Container instance Container instance Container instance Container instance Container instance Container instance -
© 2017, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. A closer look Load balancer (ALB, NLB, or ELB Classic) routes traffic to the cluster instances Cluster is made up of one or more EC2 instances Each Container instance runs one or more Services -
© 2017, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. A closer look A Service controls things like the number of copies of a Task you want running (Desired Count), and registers your Service with a load balancer A Task Definition controls things like container image, environment variables, resource allocation, logger, and other parameters -
© 2017, Amazon Web Services, Inc. or its Affiliates. All
rights reserved. Fargate Fargate mode! For ECS available, for EKS in the future • No infrastructure to manage or scale • Scale seamlessly on demand • Manage everything at the container level -
@hoegertn How to deploy using Infrastructure-as-Code? ... again slides directly
from Amazon Web Services -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. Infrastructure as Code Options High level Low level • AWS CDK, Pulumi (third party) • Full power of supported languages, OO, abstractions, imperative logic • In the case of CDK, still generates CloudFormation code Componentized • Troposphere (Python), SparkleFormation (Ruby), GoFormation (Go) • Leverages higher-level language constructs, some abstraction also possible • Generates CloudFormation code (in the specific cases above) DSLs • CloudFormation (with and without macros), Terraform modules • Declare desired state, engine finds path to provision/update resources • Some abstraction and logic flow possible Declarative • Automate with the AWS SDKs & CLIs • Step-by-step, imperative instructions • Left to developer: error handling, manage state, rollbacks, dependency graphs, stabilization, etc. Scripted -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. AWS Cloud Development Kit (CDK) A multi-language software development framework for modeling cloud infrastructure as reusable components AWS CloudFormation -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. AWS Cloud Development Kit (CDK) AWS Construct Library Framework CLI CDK Application Stack(s) Construct Construct Core Framework CDK CLI Serverless Containers CI/CD Application Integration / Foundational Autoscaling -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. AWS CDK Core Framework CDK Application Stack(s) Construct Construct -
© 2019, Amazon Web Services, Inc. or its affiliates. All
rights reserved. CloudFormation Template “compiler” CDK CLI “processor” “assembly language” “source” synthesize deploy executes AWS Cloud Development Kit (CDK) -
@hoegertn How to build a pipeline using Github Actions Create
.github/workflows folder Create workflow file push.yml Configure IAM user in Github Push changes to Github