Successfully reported this slideshow.
Your SlideShare is downloading. ×

End-to-end CI/CD deployments of containerized applications using AWS services


More Related Content


Related Books

Free with a 30 day trial from Scribd

See all

End-to-end CI/CD deployments of containerized applications using AWS services

  1. 1. End-to-end CI/CD deployments of a containerized app (using AWS services) Incontro DevOps Italia 2019 Massimo Re Ferrè Dev Advocate @ Amazon Web Services © 2019, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
  2. 2. Whoami - Developer consultant (many kilos ago) - IBM (Professional Services and Systems pre-sales) - VMware (Solutions Architect and Technical Product Manager) - Amazon Web Services (Solutions Architect and Dev Advocate) Email: Twitter: @mreferre Github:
  3. 3. I built a demo/test app (Yelb)
  4. 4. Occasionally I’d run a … Docker build -t mreferre/yelb-ui:whatevertag .
  5. 5. Who cares if… • The master branch is several releases ahead of the artifact (i.e. docker image)? • I don’t document how to build artifacts (hint: it’s just a docker build command).
  6. 6. Then a couple of things happened ……….
  7. 7. From Docker Hub
  8. 8. How to deploy on diff abstractions? AWS Lambda Amazon EC2 Metal Amazon EKS physicalseverVMcontainerfunction Levelofabstraction Provider space (managed by AWS) Consumer space (managed by the customer) Amazon ECS
  9. 9. How about the serverless deployment model? Notes / Interesting links Steps to create the Lambdas artifacts Deployment script All saved in an email draft 
  10. 10. The Lambda artifact(s) git clone cd ./devnull/yelb-appserver docker run -v "$PWD":/var/task -it lambci/lambda:build-ruby2.5 /bin/bash -c "yum -y install postgresql-devel postgresql-libs ; bundle config --delete frozen ; bundle install ; bundle install --deployment; mkdir lib; cp /usr/lib64/ ./lib/" zip -r getvotes_adapter.rb getstats_adapter.rb pageviews_adapter.rb hostname_adapter.rb restaurant_adapter.rb vendor modules lib aws s3 cp s3://bucketname
  11. 11. How can you make all this better?
  12. 12. Perhaps I should use CI/CD for my hobby project? Source Build Test Production Software Release Steps: Change Control Tool Build Tool Test Tool Deployment Tool Pipeline Tool
  13. 13. Source Build Test Production AWS CodeBuild AWS CodeDeploy AWS CodePipeline Software Release Steps: AWS CodeCommit Your AWS tooling arsenal
  14. 14. The output of a stage is the input for the next Source:
  15. 15. Before we start • I am showing you the process in pieces (and then we will tie everything together) • This is going to be a basic commit -> build -> deploy setup • You can consider it the basis for more complex pipelines/workflows • I am not including a test phase (you should) • I am not firing up any pre-deploy / post-deploy check scripts (you could) • AWS tool can be replaced w/ third party tools in each area • e.g. GitHub Vs CodeCommit
  16. 16. “Fun” facts • No EC2 instances have been harmed used in this setup (Code* + ECS + Fargate) • The AWS documentation is fairly good but these are good resources as well • Autocorrect (Yelb -> Yell) is your friend if you want to waste 6 hours debugging
  17. 17. Thank You! Mail: Twitter: @mreferre

Editor's Notes