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

MDH-LT-Thursday-20170126

Shuhei Kimura
January 26, 2017

 MDH-LT-Thursday-20170126

Shuhei Kimura

January 26, 2017
Tweet

More Decks by Shuhei Kimura

Other Decks in Technology

Transcript

  1. DynalystͰ͸γεςϜ͸͢΂ͯAWSͰߏங͞Ε͍ͯ·͢ ֓ཁ - ϦλʔήςΟϯά޿ࠂ഑৴αʔϏεϓϥοτϑΥʔϜͰ͢ɻ - ੈքதͷސ٬ʹαʔϏεΛఏڙ͠·͢ɻ ن໛ײ - RTBͰ͸ɺϐʔΫ࣌໿13ສQPS@Asia/Tokyo Region,

    10ສQPS@US/East Region - ೖࡳαʔό਺͸྆RegionͰ໿120୆ - ܭଌͳͲॾʑؚΊͯEC2 200୆ۙ͘Instance͕Քಇத - ֤छϩά͸͓Αͦ1.5TB/dayΛS3ʹอଘ
  2. Ͳ͏΍ͬͯΞϓϦέʔγϣϯͷϦϦʔεͯ͠·͔͢ʁ ࣮ߦ؀ڥ x σϓϩΠํ๏ = Ұൠతʹͱͯ΋ଟ༷Ͱ͋Δ - Fabric/CapistranoͳͲΛ࢖ͬͯEC2ʹΞϓϦΛϦϦʔε - Apex/aws-cliͳͲΛ࢖ͬͯLambdaFunctionΛϦϦʔε

    - ElasticbeanstalkΛར༻ͯ͠ELB+EC2ߏ੒ͷΞϓϦΛRollingUpdateϦϦʔε - Chef/Ansible/PuppetͳͲͰपล؀ڥؚΊͯprovisionͯ͠ϦϦʔε DynalystͰ͸ɺ͍Ζ͍Ζͳٕज़త௅ઓͷ݁Ռ .. ͍Ζ͍Ζͳ࣮ߦ؀ڥͰ৭ʑͳΞϓϦ͕ಈ͍͍ͯΔঢ়ଶΛ ίπίπFabricͷtaskΛ௥Ճͨ͠Γϝϯςͨ͠Γ͠ͳ͕Βɺ ͳΜͱ͔΍Γ͘Γ͍ͯ͠Δঢ়ଶɻ
  3. σϓϩΠͷ؍఺͔ΒEC2 Container Service ʹະདྷΛײͨ͡ ECS Cluster - αʔόϦιʔε͸ແବͳ͘༗ޮʹ࢖͍ͭͭ ECS Task

    Definition - ʓʓͳΞϓϦΛ ECS Service - XXͳ෩ʹಈ͔͍ͨ͠ ͍ΖΜͳΞϓϦέʔγϣϯΛಈ͔͢େલఏ͕ͱͯ΋౷Ұ͞Εͨঢ়ଶʹͳΔ Batch΋API΋Worker΋Consumer΋͍͍ͩͨECS্Ͱಈ͔ͤΔ DockerContainerԽ͢Δ͜ͱ͕σϓϩΠͷγϯϓϧԽʹܨ͕Δͱ͍͏ߟ͑
  4. ECS Docker ApplicationΛTerraformΛ࢖ͬͯϦϦʔε͠Α͏ ͳΜͰTerraformʁ - ίʔυͰ͔͚Δ - ECSͱͷIntegration͕ͪΌΜͱ։ൃ͞Εͯͨ - ੜͷAPIୟ͘ͷ͸͖ͬͱͲ͔͜Ͱ࠳ં͢Δ,

    retryͱ͔πϥͦ͏ - terraformͷΊΜͲ͍͘͞ͱ͜ΖΛ͋Μ·Γؾʹ͠ͳͯ͘Α͍ 㱺 stateյΕͯ΋ͳΜͱ΋ͳ͍ɻ࠶ߏஙͯ͠deploy͠௚ͤ͹͍͍ɻ - MultiRegionΛߟ͑Δͱɺಉ࣌ʹσϓϩΠͱ͔͕౰ͨΓલʹͳͬͯ͘͸ͣ 㱺 ݁ہͷͱ͜Ζத਎͸AWS APIͳͷͰ౿Έ୆αʔό͍ΒͣͰσϓϩΠͰ͖Δʂ 㱺 CircleCI͔Βterraform࣮ߦ͢Δͱ͔͢Ε͹ɺσϓϩΠ؀ڥߏங΋͍Βͳ͍