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

オンプレミスでもECS! Amazon ECS Anywhere で ハイブリッドなコンテナワークロードを実現する / Amazon ECS Anywhere 101

オンプレミスでもECS! Amazon ECS Anywhere で ハイブリッドなコンテナワークロードを実現する / Amazon ECS Anywhere 101

AWS Innovate - Modern Applications Edition 2021/10/27
「オンプレミスでも ECS! Amazon ECS Anywhere でハイブリッドなコンテナワークロードを実現する」
---
Amazon ECS Anywhere は、お客様で所有するオンプレミスのインフラストラクチャ上でも簡単にコンテナを実行・管理することができる Amazon ECS の新しいオプションです。本セッションでは、AWS とオンプレミスのハイブリッド環境でコンテナワークロードをどのように実現するか、そしてどんなユースケースとしてこのハイブリッドなワークロードを活用できるかをご説明します。

はまーん

December 08, 2021
Tweet

More Decks by はまーん

Other Decks in Programming

Transcript

  1. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. オンプレミスでも ECS! Amazon ECS Anywhere で ハイブリッドなコンテナワークロードを実現する 濱 真⼀ アマゾン ウェブ サービス ジャパン株式会社 ソリューションアーキテクト
  2. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ⾃⼰紹介 Shinichi Hama Twitter/@track3jyo Solutions Architect Amazon Web Service Japan ⻄⽇本のお客様の⽀援 & コンテナ技術のあれこれ <最近好きな AWS サービス> AWS App Runner AWS Lambda Amazon DynamoDB
  3. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 本セッションは… 想定聴講者 • コンテナ技術や Amazon ECS の特性をなんとなく理解している・触ったことがある • オンプレミスと AWS のハイブリッドなワークロードが今後必要になってくる⽅ • Amazon ECS Anywhere の仕組みや、どういうユースケースで活⽤できるのかを知りたい ゴール • Amazon ECS Anywhere が解決する課題や特性を知り、導⼊⼿順を知る • AWS とオンプレミスでコンテナアプリケーションをハイブリッドに動かすユースケースや設計 をイメージできるようになる
  4. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. アジェンダ • Amazon Elastic Container Service (ECS) 概要 • Amazon ECS Anywhere とは • ECS Anywhere を活⽤するユースケース例 • ECS Anywhere 以外のオンプレミスで実⾏できるオプション
  5. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon Elastic Container Service (ECS) 概要
  6. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. なぜ多くの企業がコンテナ活⽤に 向かっているのか • Run Anywhere • Portability • Isolated processes
  7. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. AWS のコンテナ関連サービス フルマネージド オーケストレーション イメージレジストリ ホスティング
  8. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. オーケストレータ イメージレジストリ Amazon ECR Amazon ECS Amazon EKS Amazon EC2 AWS Fargate
  9. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon ECS: Powerful simplicity Amazon ECS
  10. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon ECS と各種 AWS サービスの⾼度な連携 Amazon ECS Elastic Load Balancing(ELB) AWS App Mesh AWS Cloud Map Amazon VPC ネットワーキング AWS CodePipeline AWS CodeCommit AWS CodeBuild AWS CodeDeploy CI/CD Amazon CloudWatch AWS X-Ray モニタリング Amazon Elastic File System(EFS) NFS AWS CloudFormation IaC AWS Step Functions Amazon EventBridge Job実⾏ Amazon GuardDuty AWS Identity and Access Management(IAM) AWS CloudTrail セキュリティ AWS Secrets Manager Amazon Simple Storage Service(S3) AWS Systems Manager Parameter Store Secrets/Configs
  11. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ワークロードに応じたデプロイオプション Region Customer Data Center Amazon EC2 AWS Fargate AWS Local Zones AWS Wavelength AWS Outposts Customer managed infrastructure ECS Anywhere
  12. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Amazon ECS Anywhere とは
  13. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ECS Anywhere に対するお客様のニーズ オ ン プ レ ミ ス で コ ン テ ナ を 管 理 し た い 理 由 ⼀貫性のある オペレーション 市場や業界の規制に より、インフラスト ラクチャの⼤部分を ⾃⾝で所有する必要 がある オンプレミスとクラ ウドのそれぞれでア プリケーションを運 ⽤する際にオペレー ションモデルを分け たくない クラウドへ移⾏す る前に償却する必 要があるデータセ ンターに設備投資 を⾏なっている ⼤規模なデータセッ トを低レイテンシで 処理するために、 データの近くにアプ リケーションをデプ ロイする必要がある 設備投資の回収 コンプライアンス 要件 データに近接した ワークロード
  14. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ECS Anywhere: あらゆる場所でコンテナを実⾏
  15. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ECS Anywhere: ゲームチェンジャー Amazon ECS Amazon EC2: AWS リージョン AWS Local Zones AWS Wavelength AWS Fargate オンプレミス クラウドでの管理 Amazon EC2 AWS Outposts オンプレミス お客様管理の 仮想マシン、 ベアメタルサーバー クラウド上のフルマネージドな コントロールプレーン オンプレミスでコンテナ オーケストレーターの実⾏や アップデート、メンテナンスが不要 ツールやガバナンスの⼀貫性 運⽤している環境によらず、 すべてのコンテナアプリケーションに 同じツールや API を使⽤ ハイブリッドフットプリントの管理 オンプレミス環境でアプリケーションを 実⾏し、移⾏の際はクラウドへの拡張が容易に
  16. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ECS Anywhere の主なユースケース エッジロケーションでの データ処理 クラウドとオンプレミスで ⼀貫したワークロードを実⾏する オンプレミスの 既存アプリケーションを コンテナ化 IoT ハイブリッド モダナイゼーション
  17. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 「このコンテナを外部インスタンス上に 10個デプロイしてください」 「このコンテナを EC2 で 10個デプロイしてください」 Amazon ECS
  18. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 「このコンテナを外部インスタンス上に 10個デプロイしてください」 Amazon ECS
  19. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 「このコンテナを外部インスタンス上に 10個デプロイしてください」 オンプレミスデータセンター サーバー/VM Amazon ECS ※ ⼀部互換性のないパラメータはあり
  20. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 必要に応じたデプロイオプションの使い分け AWS Cloud Amazon ECS Region オンプレミスデータセンター サーバー/VM OS ECS Agent SSM Agent AWS Fargate Amazon EC2 AWS Outposts
  21. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. オンプレミスにデプロイする際の基本的な制限 • bridge、host、none ネットワークモードを使⽤可能 • awsvpc ネットワークモードは未サポート • ECS Service Discovery は未サポート • サービスのロードバランシング機能は未サポート • タスク定義での GPU 要件の指定は未サポート • 2021/10/08: GPU ベースのコンテナワークロードの管理ができるようになりました︕ • https://aws.amazon.com/jp/blogs/containers/running-gpu-based-container-applications-with-amazon-ecs-anywhere/ • …etc https://docs.aws.amazon.com/ja_jp/AmazonECS/latest/developerguide/ecs-anywhere.html#ecs-anywhere-considerations 2 0 2 1 / 1 2 / 0 8 現 在 の 制 限
  22. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. オンプレミスで管理されるインスタンスの前提条件 • AWS API サービスエンドポイントへのアウトバウンド接続 • インターネット • PrivateLink または VPN を経由した VPC • エンドポイントとコンテナランタイムスタック • Systems Manager (SSM) エージェント • ECS エージェント • Docker engine • サポートされている Linux ディストリビューション/システムアーキテクチャ • Ubuntu 18.04, 20.04 • RHEL7/CentOS 7/8 • Fedora32/33, Debian9/10, openSUSE Tumbleweed, SUSE Enterprise Server 15 • x86_64 および ARM64 インストールスクリプトを提供
  23. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ECS Anywhere 外部インスタンスの登録プロセス • 基本的にはオンプレミスのサーバーでインストールスクリプトを実⾏するのみ activation-id, activation-code: AWS 外にあるマシンをマネージドインスタンスとして アクティベーションするための秘密情報
  24. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ECS Anywhere の仕組み AWS Cloud Amazon ECS Systems Manager Region オンプレミスデータセンター サーバー/VM OS ECS Agent SSM Agent Container Container Container サーバー/VM OS ECS Agent SSM Agent Container Container Container
  25. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ECS Anywhere の仕組み AWS Cloud Amazon ECS Systems Manager Region オンプレミスデータセンター サーバー/VM OS SSM Agent IAM ECS Agent Docker engine
  26. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ECS Anywhere の仕組み AWS Cloud Amazon ECS Systems Manager Region オンプレミスデータセンター サーバー/VM OS SSM Agent アクティベーション ID と コードの送信 インスタンスロール 認証情報の受け取り IAM ECS Agent Docker engine
  27. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ECS Anywhere の仕組み AWS Cloud Amazon ECS Systems Manager Region オンプレミスデータセンター サーバー/VM OS SSM Agent アクティベーション ID と コードの送信 インスタンスロール 認証情報の受け取り IAM ECS Agent Docker engine インスタンスロール 認証情報の提供 インスタンスの登録
  28. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ECS Anywhere の仕組み AWS Cloud Amazon ECS Systems Manager Region オンプレミスデータセンター サーバー/VM OS SSM Agent アクティベーション ID と コードの送信 インスタンスロール 認証情報の受け取り IAM ECS Agent Docker engine インスタンスロール 認証情報の提供 インスタンスの登録 Container Container Container
  29. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ECS Anywhere の仕組み AWS Cloud Amazon ECS Systems Manager Region オンプレミスデータセンター サーバー/VM OS ECS Agent SSM Agent Container アクティベーション ID と コードの送信 インスタンスロール 認証情報の受け取り インスタンスロール 認証情報の提供 インスタンスの登録 タスクロール 認証情報の提供 Container Container コンテナランタイム として使⽤ Docker engine IAM Amazon S3 CloudWatch
  30. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ネットワーク切断時の挙動 • 切断中 • タスクは引き続き実⾏される(終了しない限り) • 新しいタスクを開始することはできない • タスクをスケールインすることはできない • 再接続時 • コントロールプレーンがインスタンスの状態を再評価 • タスクロールの認証情報をリフレッシュ • PENDING 状態のタスクを配置・開始
  31. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. ECS Anywhere を活⽤するユースケース例
  32. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. オンプレミス・AWS のハイブリッドなワークロード AWS Cloud Amazon CloudWatch Amazon SQS Amazon ECS AWS Fargate AWS IAM Amazon EFS Task Task NFS share 1 4 3 2 5 オンプレミスデータセンター
  33. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. オンプレミスから AWS へのシームレスな移⾏ AWS Cloud Region オンプレミスデータセンター VM OS データベース アプリケーション プロセス
  34. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. オンプレミスから AWS へのシームレスな移⾏ AWS Cloud Amazon ECS Region オンプレミスデータセンター サーバー/VM OS ECS Agent SSM Agent データベース
  35. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. オンプレミスから AWS へのシームレスな移⾏ AWS Cloud Amazon ECS Region オンプレミスデータセンター サーバー/VM OS ECS Agent SSM Agent AWS Fargate データベース Amazon Aurora
  36. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. オンプレミスから AWS へのシームレスな移⾏ AWS Cloud Amazon ECS Region オンプレミスデータセンター サーバー/VM OS ECS Agent SSM Agent AWS Fargate データベース Amazon Aurora
  37. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. オンプレミスから AWS へのシームレスな移⾏ AWS Cloud Amazon ECS Region AWS Fargate Amazon Aurora
  38. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. ECS Anywhere 以外の オンプレミスで実⾏できるオプション
  39. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. これまでの EKS デプロイオプション Amazon EKS + AWS Outposts オンプレミス クラウド お客様 お客様 Amazon EKS + AWS Fargate Amazon EKS + Amazon EC2 コントロールプレーン コンピューティング データプレーン サポート フルマネージド
  40. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. AWS 外部での Kubernetes クラスターの実⾏ Amazon EKS Distro ⼀般提供 Amazon EKS Anywhere 2021/09/08 ⼀般提供開始︕ EKS によってデプロイされた同⼀のオープンソース Kubernetes と依存関係のディストリビューション EKS Distro に基づくクラスター作成と管理のための ツールセットを提供
  41. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 現在の EKS デプロイオプション EKS + Fargate フルマネージド EKS + EC2 EKS + Outposts オンプレミス クラウド お客様 コントロールプレーン コンピューティング データプレーン お客様 サポート EKS Anywhere お客様 お客様 お客様 EKS Distro お客様 お客様 お客様 コミュニティ
  42. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. Amazon EKS Distro Kubernetes コントロールプレーン Scheduler Controller Manager Cloud Controller Manager API Server etcd Kubernetes データプレーン etcdctl kubelet Pause Container CSI Sidecar CNI kubectl CoreDNS Metrics server Amazon EKS が使⽤する Kubernetes ディストリビューション アップストリームで採⽤されている セキュリティパッチ、ツール、構成 信頼性と安全性 公開されているツールと環境変数で 再現可能なビルド Amazon EKS のサポートバージョン に対して修正をバックポート
  43. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 含まれない • eksctl • AWS オフィシャルの Kubernetes プラグイン: CNI および CSI • AWS Controllers for Kubernetes (ACK) EKS Distro に含まれるもの / 含まれないもの 含まれる Upstream Kubernetes etcd & etcdctl CoreDNS Upstream CNI CSI sidecar container
  44. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. EKS Anywhere お客様のデータセンターにおける既存のハードウェア上で、 EKS と同じ⼀貫性のある体験で Kubernetes を作成・管理 オープンソース標準の クラスターライフサイクル 管理ツールに基づいて構築 プロダクションクラスター の準備を加速する コンポーネントをバンドル お客様が管理する コンピューティング環境 の活⽤ EKS に使われている安全 かつ安定したテスト済み のコンポーネントを使⽤ してクラスターを実⾏ オンプレミスで EKS Distro クラスターのデプロイやライフサイクルを管理
  45. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. オープンソース標準に基づくクラスター構築 異 な る 環 境 に お い て ⼀ 貫 し た 体 験 を 提 供 eksctl config Kubernetes Cluster Amazon EKS-A はオンプレミスの Kubernetes クラスターに対して ツール、アドオン、サポートを提供 Bare Metal Cluster API Provider Cluster API EKS Console Integration 3rd party CNI 2022年サポート予定 ⼀般提供
  46. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. さいごに - お伝えしたかったこと - • ECS Anywhere を活⽤することで、お客様の管理するインフラストラ クチャ上でコンテナを実⾏・管理することが可能 • クラウド上のフルマネージドなコントロールプレーンで管理可能 • さまざまなワークロードや⽬的で、ECS Anywhere を活⽤ • オンプレミスとAWSでのハイブリッドなワークロード • コンテナ化から始めるクラウドマイグレーションの選択肢 • エッジコンピューティングでの処理実⾏ 皆様のさまざまなワークロードで ECS Anywhere をご活⽤ください︕
  47. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 次のステップ Containers from the Couch / [Japanese] Introducing "Amazon ECS Anywhere” https://youtu.be/Tqh0TLdZLvk
  48. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. 次のステップ • ECS Workshop - ECS Anywhere –︓ https://ecsworkshop.com/ecsanywhere/ • Blog / Amazn VPC と接続可能なおうち Amazon ECS Anywhere クラスターの構築︓ https://aws.amazon.com/jp/blogs/news/building-an-amazon-ecs-anywhere-home-lab-with- amazon-vpc-network-connectivity/ • Amazon ECS Anywhere ドキュメント︓ https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-anywhere.html
  49. © 2021, Amazon Web Services, Inc. or its affiliates. All

    rights reserved. ご清聴ありがとうございました © 2021, Amazon Web Services, Inc. or its affiliates. All rights reserved. Shinichi Hama track3jyo