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.

AWS Elastic Beanstalk運作微服務與Docker

1,223 views

Published on

本場次將運用Elastic Beanstalk,在AWS上輕鬆運用以Docker為基礎的微服務,並說明Elastic Beanstalk的基礎概念,提供開發者迅速且具規模彈性的方式,不需要基礎架構,即可讓應用程式在AWS上運作。
使 用Docker製作微服務架構相當費工,包括建造及營運基礎架構、安裝及維護叢集管理軟體等,在AWS Elastic Beanstalk的多容器支援功能下,許多任務可簡化及抽象化,讓開發者專注於應用程式碼。AWS Elastic Beanstalk服務使用簡易,可佈建及擴張以Java、.NET、PHP、Node.js、Python、Ruby、Go、Docker製作的網路應 用程式及服務,Elastic Beanstalk運用Amazon EC2 Container Service,提供容器管理功能。

Published in: Technology
  • Be the first to comment

AWS Elastic Beanstalk運作微服務與Docker

  1. 1. AWS Cloud Kata for Start-Ups and Developers Taipei
  2. 2. AWS Cloud Kata for Start-Ups and Developers Taipei AWS Elastic Beanstalk Multi-container Microservices with Docker KJ Wu Solutions Architect Amazon Web Services
  3. 3. AWS Cloud Kata for Start-Ups and Developers   Elastic Beanstalk vs DIY   How to use Elastic Beanstalk   Multi-container Docker with AWS Elastic Beanstalk   Recently added Features Agenda
  4. 4. AWS Cloud Kata for Start-Ups and Developers Web Services APP DEPLOYMENT ENVIRONMENTS INFRASTRUCTURE
  5. 5. AWS Cloud Kata for Start-Ups and Developers Developer Challenges   Complexity of deploying code, provisioning and managing infrastructure   Expertise and time needed to manage and configure servers, databases, load balancers, firewalls, and networks   How to automate application scaling DevOps changes how you are used to working
  6. 6. AWS Cloud Kata for Start-Ups and Developers What if you could just focus on your app ? APP and a TOOLBOX for DEPLOYMENT, ENVIRONMENTS and INFRASTRUCTURE
  7. 7. AWS Cloud Kata for Start-Ups and Developers YES! You can, with AWS Elastic Beanstalk! APP AWS Elastic Beanstalk
  8. 8. AWS Cloud Kata for Start-Ups and Developers Okay let’s get started!
  9. 9. AWS Cloud Kata for Start-Ups and Developers AWS Elastic Beanstalk   Easy to use Service   Deploy and Scale Web Apps   Don’t Sweat the Small Stuff
  10. 10. AWS Cloud Kata for Start-Ups and Developers AWS Elastic Beanstalk Your code HTTP server Application server Language interpreter Operating system Host •  Each Amazon EC2 instance comes with the necessary components to run applications •  No more worrying about logging into instances to install and configure your app stack Focus on building your app
  11. 11. AWS Cloud Kata for Start-Ups and Developers Components of a Web App •  Three tier architecture: •  Web Server •  App Server •  Database •  Components •  Application Compute •  Database Engine •  Storage and Delivery
  12. 12. AWS Cloud Kata for Start-Ups and Developers AWS Elastic Beanstalk - EB •  Easily deploy, monitor, and scale applications •  Infrastructure provisioned and managed by EB. You maintain complete control. •  Preconfigured application containers that are easily customizable.
  13. 13. AWS Cloud Kata for Start-Ups and Developers AWS Elastic Beanstalk Environment •  Two tiers •  Web Server •  Worker •  Two types: •  Single instance •  Load balanced, auto scalable •  Configures Amazon Route 53 and provides a domain name https://yourapp.elasticbeanstalk.com
  14. 14. AWS Cloud Kata for Start-Ups and Developers Application Versioning Saved Configurations Allow for easy duplication for A/B testing or non-disruptive deployments Application Versions All versions are stored durably in Amazon S3. Code can also be pushed from a Git repository!
  15. 15. AWS Cloud Kata for Start-Ups and Developers The Common Used Deployment Options
  16. 16. AWS Cloud Kata for Start-Ups and Developers Deployment Options 1.  Via the AWS Management Console 2.  Via Git / EB CLI 3.  Via the AWS Toolkit for Eclipse and the Visual Studio IDE $ pip install awsebcli
  17. 17. AWS Cloud Kata for Start-Ups and Developers Example: CLI workflow Initial app deployment: $ git init . $ git add . Initialize your Git repository01 Add your code04 $ eb init $ git commit –m “v1.0” Create your Elastic Beanstalk app02 Commit05 Follow the prompts to configure the environment 03 Create the resources and launch the application 06 $ eb create
  18. 18. AWS Cloud Kata for Start-Ups and Developers Example: CLI workflow Update your app: Update your code01 $ git add . $ git commit –m “v2.0” $ eb deploy Push the new code02 Monitor the deployment progress03 $ eb status
  19. 19. AWS Cloud Kata for Start-Ups and Developers Docker with AWS Elastic Beanstalk
  20. 20. AWS Cloud Kata for Start-Ups and Developers Docker with AWS Elastic Beanstalk   Single Docker Container   Multiple Docker Containers
  21. 21. AWS Cloud Kata for Start-Ups and Developers Multi Container: Architecture   Each environment has its own ECS Cluster   Supports a single ECS Task definition per environment   The ECS Task is defined in the Dockerrun.aws.json file   Supports multiple ELB listeners for inbound traffic   Provides out of the box auto scaling for ECS Tasks Task 1-1 Task 1-2 Container 1 Container 1 ELB Instance 1 Instance 2 Container 2 Container 3 Container 2 Container 3
  22. 22. AWS Cloud Kata for Start-Ups and Developers Multi Container Dockerrun.aws.json { "AWSEBDockerrunVersion": 2, [...] } the value "2" for multicontainer Docker environments
  23. 23. AWS Cloud Kata for Start-Ups and Developers Multi Container Dockerrun.aws.json "containerDefinitions": [ { "name": "php-app", "image": "php:fpm", "essential": true, "memory": 128, },
  24. 24. AWS Cloud Kata for Start-Ups and Developers Multi Container Dockerrun.aws.json "links": [ "php-app", "list-service", "search-service” ]
  25. 25. AWS Cloud Kata for Start-Ups and Developers Multi Container Dockerrun.aws.json "mountPoints": [ { "sourceVolume": "php-app", "containerPath": "/var/www/html", "readOnly": true } ] "volumes": [ { "name": "php-app", "host": { "sourcePath": "/var/app/current/php-app" } } ]
  26. 26. AWS Cloud Kata for Start-Ups and Developers Nginx Proxy Example: bit.ly[….]
  27. 27. AWS Cloud Kata for Start-Ups and Developers Live Demo Slightly more difficult…
  28. 28. AWS Cloud Kata for Start-Ups and Developers New Features   Support for EC2 Container Registry   Managed Updates   New Deployment Options   Support for Application Load Balancer
  29. 29. AWS Cloud Kata for Start-Ups and Developers New Deployment Options Rolling with additional batch Rolling: Immutable
  30. 30. AWS Cloud Kata for Start-Ups and Developers Questions? KJ Wu Solutions Architect, AWS
  31. 31. AWS Cloud Kata for Start-Ups and Developers THANK YOU! Please remember to fill out evaluations

×