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

Amazon EC2 Container Service(ECS)

Isao Shimizu
February 18, 2015

Amazon EC2 Container Service(ECS)

第6回 コンテナ型仮想化の情報交換会@東京
LT枠

Isao Shimizu

February 18, 2015
Tweet

More Decks by Isao Shimizu

Other Decks in Technology

Transcript

  1. ࣗݾ঺հ ਗ਼ਫ ܄ ʢIsao SHIMIZUʣ Twitter: @isaoshimizu גࣜձࣾϛΫγΟ ϞϯετελδΦॴଐ -

    ݱࡏ4೥໨ʢ2011೥ೖࣾʣ - mixiͷΠϯϑϥӡ༻ʢΦϯϓϨʣ - ݱࡏ͸ɺϞϯελʔετϥΠΫͷΠϯϑϥɾαʔόӡ༻ʢΦϯϓϨɺAWSʣ - ϛΫγΟ ΤϯδχΞϒϩάࣥචʢFedoraɺsystemdɺOpenStackɺLXCͳͲʣ - Software Designࣥචʢsystemd΄͔ʣ લ৬: - 2003ʙ2011೥ SIerͰاըɺ։ൃɺΠϯϑϥӡ༻ - ૊ΈࠐΈɺWebɺεϚϑΥΞϓϦɺಈը഑৴ͳͲ ࠷ۙؾʹͳ͍ͬͯΔ͜ͱ - Apache MesosɺConsulɺPrometheusɺHTTP/2
  2. &$4ͱ͸ - AWS re:Invent 2014(2014.11.11~14)Ͱൃද͞Εͨ৽αʔϏε - Amazon EC2 Container Serviceͷུ

    - 2015.2.18ݱࡏ͸·ͩϓϨϏϡʔϦϦʔεʢొ࿥੍ɻus-east-1ͷΈͰར༻Մೳʣ - EC2ʢίϯςφΠϯελϯεʣʹίϯςφΛ؆୯ʹىಈͰ͖Δ - ECS޲͚ͷઐ༻AMIΛ࢖͏ - Dockerޓ׵ʢݱ࣌఺Ͱαϙʔτ͢ΔίϯςφϓϥοτϑΥʔϜ͸DockerͷΈʣ - ΫϥελʢΠϯελϯεͷάϧʔϐϯάʣ - λεΫͱ͍͏֓೦ - Ϧιʔεεέδϡʔϥʔ
  3. ࢖ͬͯΈͯͲ͏ͩͬͨͷ͔ - खॱ௨Γʹ΍Ε͹୭Ͱ΋؆୯ʹίϯςφͷΫϥελΛߏ੒Ͱ͖Δ - ίϯιʔϧμογϡϘʔυͰ͸ECSͷૢ࡞Ͱ͖ͳ͍ʢ͓ͦΒ͘ϓϨϏϡʔ͔ͩΒʣ - AWS CLIΛ࢖ͬͯΫϥελ΍λεΫΛૢ࡞͢Δͷ͕લఏʢ͍·ͷͱ͜Ζʣ - JSONϑΝΠϧʹఆٛͯ͠ίϚϯυʹ౉͢ૢ࡞͕جຊ

    - Docker HubΛͦͷ··࢖͑ΔʢϓϥΠϕʔτͷϨδετϦͰ΋໰୊ͳ͍ʣ - ྉۚ͸EC2, EBSͷར༻ྉ͚ͩؾʹ͢Ε͹Α͍ʢECSར༻ྉ͸ଘࡏ͠ͳ͍ʣ - CoreOSΛECSͷΫϥελʹ௥Ճ͢Δ͜ͱ͕Մೳ - https://coreos.com/docs/running-coreos/cloud-providers/ecs/ - CoreOSىಈ࣌ʹECSͷΤʔδΣϯτ༻ͷίϯςφΛDocker pullͯ͠ىಈ͍ͯ͠Δ
  4. &$4ؔ࿈ͷΩʔϫʔυ Ϋϥελ - ίϯςφΛάϧʔϐϯάͨ͠΋ͷ - Ϧιʔεϓʔϧͱͯ͠ѻ͏ - ಉϦʔδϣϯ಺Ͱߏ੒ ΤʔδΣϯτ -

    ίϯςφΠϯελϯεʢEC2ʣʹىಈ͍ͯ͠ΔDockerͷ1ίϯςφͱͯ͠ىಈ - Docker Hub: https://registry.hub.docker.com/u/amazon/amazon-ecs-agent/ - GitHub: https://github.com/aws/amazon-ecs-agent λεΫ - ίϯςφ্Ͱ࣮ߦͤ͞ΔDockerΠϝʔδͷఆٛ - ༧໿͢ΔϝϞϦ΍CPU਺ͳͲͷϦιʔεͷఆٛ - Ϋϥελ಺Ͱಈ࡞͢Δίϯςφͷू߹
  5. ಈ࡞؀ڥʹ͍ͭͯ ίϯςφΠϯελϯεͷAMIʹ͍ͭͯ amzn-ami-2014.09.1-amazon-ecs-optimized-preview2 (ami-34ddbe5c) Amazon ECS-Optimized Amazon Linux AMI 2014.09.1

    x86_64 ECS HVM GP2 Preview 2 OSʹ͍ͭͯ Amazon Linux 2014.09.1 Kernel: 3.14.26-24.46.amzn1.x86_64 Dockerͷόʔδϣϯʹ͍ͭͯ Client version: 1.3.3 Client API version: 1.15 Go version (client): go1.3.3 Git commit (client): c78088f/1.3.3 OS/Arch (client): linux/amd64 Server version: 1.3.3 Server API version: 1.15 Go version (server): go1.3.3 Git commit (server): c78088f/1.3.3
  6. ·ͱΊ - ෳ਺ͷEC2ΠϯελϯεΛԣஅͯ͠DockerίϯςφΛ؅ཧͰ͖Δͷ͕Α͍ - API, CLIͰૢ࡞Ͱ͖ΔͷͰ֤छγεςϜͱ࿈ܞͰ͖Δ - طଘͷDockerΠϝʔδͳͲͷࢿ࢈Λ࠶ར༻Ͱ͖Δ - AWSͷηΩϡϦςΟάϧʔϓ΍ELBͳͲͷ࿈ܞ͕Ͱ͖Δͷ͸خ͍͠

    - Elastic IP΋࢖͑ΔΑ͏ʹͳΔΒ͍͠ - ͍ͭ౦ژϦʔδϣϯͰ࢖͑ΔΑ͏ʹͳΔ͔͸Θ͔Βͳ͍ - ຊ൪Ͱ࢖͏΂͖͔Ͳ͏͔΋·ͩΘ͔Βͳ͍ - ؅ཧϨΠϠʔ͕Ͱ͖ͨ͜ͱͰຊ൪ಋೖ͕͍ۙͮͨͷ͸ؒҧ͍ͳ͍ - ΦϯϓϨͱAWSͷซ༻ͰDockerΛ࢖͏ͷ͸·ͩϋʔυϧ͕ߴ͍ - ͦ΋ͦ΋Docker͕࠷దղͳͷ͔΋·ͩΘ͔Βͳ͍ʢRocketͱ͔΋͋Δ͠ʣ
  7. ࢀߟ৘ใ ɾAmazon EC2 Container Service ɹhttp://aws.amazon.com/jp/ecs/ ɾAmazon EC2 Container Service

    Developer Guide ɹhttp://docs.aws.amazon.com/AmazonECS/latest/developerguide/ ɾAWS CLI ecs ɹhttp://docs.aws.amazon.com/cli/latest/reference/ecs/index.html ɾECS for Docker Meetup #4 ɹhttp://www.slideshare.net/shot6/ecs-for-docker-meetup-4 ɾࠓ೔ಧ͍ͨAmazon EC2 Container Service (ECS)Λ࢖ͬͯΈͨ ɹhttp://tech.recruit-mp.co.jp/infrastructure/preview-amazon-ec2-container-service/ ɾAmazon EC2 Container Service(ECS)Ͱ੩తWebαΠτΛσϓϩΠ͢Δ ɹhttp://dev.classmethod.jp/cloud/aws/ecs-deploy-static-website/ ɾCoreOSΛECS(EC2 Container Service)Ϋϥελʹ௥Ճ͢Δ ɹhttp://dev.classmethod.jp/cloud/add-coreos-to-ecs-cluster/