Upgrade to Pro — share decks privately, control downloads, hide ads and more …

日本のママをコンテナで支える

tatsushim
January 25, 2018

 日本のママをコンテナで支える

X-Tech JAWS 【第2回】~9割のX-Techと1割の優しさで切り拓く未来~ の登壇資料
https://xtechjaws.doorkeeper.jp/events/67869

tatsushim

January 25, 2018
Tweet

More Decks by tatsushim

Other Decks in Technology

Transcript

  1. 

  2. 

  3. 

  4. 

  5. 

  6. 

  7. Amazon S3 ElastiCache CloudFront Amazon SES Amazon RDS Amazon CloudWatch

    Amazon SNS Amazon 
 Route 53  ECS ALB GitHub Docker Docker Build Notification push ECS Scheduled Task ACM WAF Services(API, Admin, Etc…) ECR TravisCI Slack Sentry pingdom papertrail BigQuery fluentd
  8. w ϚϚϦͷΠϯϑϥͷྺ࢙ w &$ظ w ࣗલ"VUP4DBMJOHظ w &#ظ w &$4ظ

    w ίϯςφಋೖͷಓͷΓ w ໰୊ͷ੔ཧͱղܾͷͨΊͷπʔϧબఆ w ಋೖϑΣʔζ w &$4Խͯ͠ྑ͔ͬͨ͜ͱ w ͜Ε͔Β w 'BSHFUF΁ͷظ଴ w ΠϯϑϥΤϯδχΞͷ࢓ࣄΛͳ͘͢ 
  9. 

  10.  • ͓΋͍͖ͬΓ୯Ұো֐఺ • ͍ͬͯ͏͔ʮ఺ʯ • DBͷӡ༻େม • όοΫΞοϓεΫϦϓτ΋ࣗલͰߏங •

    εέʔϧΞοϓ࣌ʹαʔϏεΛࢭΊΔ
 ඞཁ͕͋Δ౳ɺͦͷଞͨ͘͞Μʘ(^o^)ʗ EC2 1୆ߏ੒ͷͭΒΈ
  11. 

  12. EC2 instance web app server EC2 instance web app server

    Amazon RDS Availability Zone #1  RDSಋೖ
  13. Elastic Load Balancing Amazon RDS Amazon EC2 Amazon EC2 Availability

    Zone #1 Amazon EC2 Amazon EC2 Availability Zone #1 Elastic Load Balancing Amazon EC2 Amazon EC2 Availability Zone #1 Amazon EC2 Amazon EC2 Availability Zone #1 Amazon S3 ElastiCache CloudFront Amazon SES  ࣗલAutoScalingߏங
  14. Elastic Load Balancing Amazon EC2 Elastic Load Balancing Amazon EC2

    Amazon S3 ElastiCache CloudFront Amazon SES Amazon RDS Amazon CloudWatch Amazon SNS Amazon 
 Route 53 GitHub Sentry BigQuery fluentd fluentd pingdom papertrail  ֤छϚωʔδυαʔϏεΛಋೖ
  15.  • AMIͱLaunch Configurationͷ؅ཧ͕͠ΜͲ͍ • AMIʹؔͯ͠͸Chef౳ͷProvisioning ToolΛ࢖ͬͯ ΋ɺ݁ہͦΕͷ؅ཧ͕େมͰॻ͍ͯ΋ଐਓԽ͢Δ • ݁Ռͱͯ͠ΠϯϑϥΤϯδχΞ͕


    ϛυϧ΢ΣΞߋ৽ͷϘτϧωοΫʹͳΔ • ಉ͡ίϚϯυ(yumͳͲ)ͰೖΔιϑτͷόʔδϣϯ ͕มΘͬͯͨΓɺͰ͖ͳ͘ͳͬͯͨΓ ࣗલAutoScalingͷͭΒΈ
  16. 

  17. Elastic Load Balancing Amazon EC2 Amazon S3 ElastiCache CloudFront Amazon

    SES Amazon RDS Amazon CloudWatch Amazon SNS Amazon 
 Route 53 GitHub Sentry BigQuery fluentd fluentd pingdom papertrail  Elastic Beanstalk
  18. Elastic Load Balancing Amazon EC2 Amazon S3 ElastiCache CloudFront Amazon

    SES Amazon RDS Amazon CloudWatch Amazon SNS Amazon 
 Route 53 GitHub Sentry BigQuery fluentd fluentd pingdom papertrail  Elastic Beanstalk /FX
  19.  • ϛυϧ΢ΣΞͷར༻͕஍ຯʹ੍ݶ͞ΕΔ • ౰࣌͸php7.1࢖͍͔͕ͨͬͨ7.0·Ͱ͠ ͔ఏڙ͞Ε͍ͯͳ͔ͬͨ • PHP × nginx΋ͳ͍

    • ʢ´-`ʣ.ŇoOʢϚωʔδυαʔϏεͳͷͰ ͠ΐ͏͕ͳ͍෦෼Ͱ΋͋Δʣ Elastic BeanstalkͷͭΒΈ
  20. 

  21. Amazon S3 ElastiCache CloudFront Amazon SES Amazon RDS Amazon CloudWatch

    Amazon SNS Amazon 
 Route 53  ECS ALB GitHub Docker Docker Build Notification push ECS Scheduled Task ACM WAF Services(API, Admin, Etc…) ECR TravisCI Slack Sentry pingdom papertrail BigQuery fluentd
  22. 

  23. 

  24. 

  25.  • ໰୊ͷಛఆޙɺͦͷղܾࡦΛݕ౼ • 1ͭ1۪ͭ௚ʹ௵ͯ͠ɺղܾํ๏Λݕূ͍ͯ͠ ͘ • Ex. Docker for

    Mac ͱ VM on Dockerͷݕূ • Dockerؔ࿈ͷ໰୊͕ग़ͨ࣌͸͙͢ʹΩϟον Ξοϓͯ͠௵͍ͯ͘͠ ᶄղܾํ๏Λݕূ
  26. Amazon S3 ElastiCache CloudFront Amazon SES Amazon RDS Amazon CloudWatch

    Amazon SNS Amazon 
 Route 53  ECS ALB GitHub Docker Docker Build Notification push ECS Scheduled Task ACM WAF Services(API, Admin, Etc…) ECR TravisCI Slack Sentry pingdom papertrail BigQuery fluentd
  27. Amazon S3 ElastiCache CloudFront Amazon SES Amazon RDS Amazon CloudWatch

    Amazon SNS Amazon 
 Route 53  ECS ALB GitHub Docker Docker Build Notification push ECS Scheduled Task ACM WAF Services(API, Admin, Etc…) ECR TravisCI Slack Sentry pingdom papertrail BigQuery fluentd νʔϜͰίϯςφΛ
 ҭͯͨ݁Ռ
  28.  • EC2ͷϝϯςφϯε͔Βͷ։์ • Ex. ઌ೔ͷCPU੬ऑੑʹΑΔڧ੍restart • Jobͷ࣮ߦ͝ͱʹίϯςφ্ཱ͕͕ͪΔͷͰɺ EC2 on

    Cronͷͱ͖ؾʹ͍ͯͨ͠CPUϦιʔε ΛؑΈ࣮ͨߦλΠϛϯάͳͲ͸ߟ͑Δඞཁ͕ͳ ͘ͳͬͨ • ංେԽ͢Δcrontabͷ؅ཧ΋ෆཁʹ ECS Task Scheduledʹͯ͠ྑ͔ͬͨ͜ͱ
  29. 

  30.