第2章 インストール

2.1. 前提条件

Ansible Automation Platform をインストールして登録する前に、サービスの動作方法、データの保存方法、およびこれらのサービスを使用することによるプライバシーへの影響など、AWS についてよく理解しておく必要があります。また、Amazon Web Services でアカウントを設定してください。

AWS Marketplace から Ansible Automation Platform をセットアップするには、SSH キーペアまたは Amazon Elastic Compute Cloud (EC2) ペアも必要です。詳細は、EC2 ペアの作成 を参照してください。

Amazon Web Services の以下の点について実用的な知識を備えていることを前提としています。

  • AWS Marketplace からのソリューションのデプロイ
  • Elastic Compute Cloud (EC2) インスタンス
  • Elastic Block Store (EBS) ボリューム
  • Elastic File Storage (EFS)
  • AWS Virtual Private Clouds (VPC)

    • サブネット
    • ルートテーブル
    • Security Groups
    • ロードバランサー
  • ネットワーク設計
  • ハブアンドスポークネットワーク設計
  • VPC ピアリング
  • CIDR (Class Inter-Domain Routing) ブロック
  • トランジットルーティング
  • AWS CloudWatch
  • SSH
  • RDS
  • AWS SecretsManager

Amazon Web Services および用語についての詳細は、AWS の製品ドキュメント を参照してください。

2.1.1. ポリシーおよび権限

Ansible Automation Platform デプロイメントおよび アプリケーションアーキテクチャー で説明されているリソースを作成および管理するには、AWS アカウントに次の Identity and Access Management (IAM) パーミッションが必要です。

AWS Marketplace で入手可能な Ansible Automation Platform をデプロイするには、AWS アカウントにもライセンスが必要です。

IAM ポリシーでこれらのリソースのデプロイメントおよび管理が制限されている場合、アプリケーションのデプロイに失敗する可能性があります。

アプリケーションには 2 つのデプロイメントオプションがあります。

  1. 新しい VPC を使用したデプロイメント
  2. 既存の VPC を使用したデプロイメント

次の表に、必要な IAM ポリシーのリストを示します。

新しい VPC を使用したデプロイの場合既存の VPC を使用したデプロイメントの場合
  • 管理ポリシー

    • AWSMarketplaceFullAccess
  • 管理ポリシー

    • AWSMarketplaceFullAccess
  • CloudFormation インライン IAM ポリシー

    • cloudformation:DeleteStack
    • cloudformation:CreateUploadBucket
    • cloudformation:CreateStack
    • cloudformation:UpdateStack
    • cloudformation:GetTemplateSummary
    • cloudformation:ListStacks
    • cloudformation:GetStackPolicy
    • cloudformation:DescribeStacks
    • cloudformation:ListStackResources
    • cloudformation:DescribeStackEvents
  • CloudFormation インライン IAM ポリシー

    • cloudformation:DeleteStack
    • cloudformation:CreateUploadBucket
    • cloudformation:CreateStack
    • cloudformation:UpdateStack
    • cloudformation:GetTemplateSummary
    • cloudformation:ListStacks
    • cloudformation:GetStackPolicy
    • cloudformation:DescribeStacks
    • cloudformation:ListStackResources
    • cloudformation:DescribeStackEvents
  • S3 インライン IAM ポリシー

    • s3:CreateBucket
    • s3:PutObject
    • s3:GetObject
  • S3 インライン IAM ポリシー

    • s3:CreateBucket
    • s3:PutObject
    • s3:GetObject
  • IAM インライン IAM ポリシー

    • iam:DetachRolePolicy
    • iam:RemoveRoleFromInstanceProfile
    • iam:DeleteInstanceProfile
    • iam:DeleteRolePolicy
    • iam:CreateRole
    • iam:PutRolePolicy
    • iam:DeleteRole
    • iam:AttachRolePolicy
    • iam:CreateInstanceProfile
    • iam:AddRoleToInstanceProfile
    • iam:PassRole
    • iam:ListRoles
    • iam:GetRolePolicy
    • iam:TagRole
  • IAM インライン IAM ポリシー

    • iam:DetachRolePolicy
    • iam:RemoveRoleFromInstanceProfile
    • iam:DeleteInstanceProfile
    • iam:DeleteRolePolicy
    • iam:CreateRole
    • iam:PutRolePolicy
    • iam:DeleteRole
    • iam:AttachRolePolicy
    • iam:CreateInstanceProfile
    • iam:AddRoleToInstanceProfile
    • iam:PassRole
    • iam:ListRoles
    • iam:GetRolePolicy
    • iam:TagRole
  • SecretsManager インライン IAM ポリシー

    • secretsmanager:DeleteSecret
    • secretsmanager:GetSecretValue
    • secretsmanager:GetRandomPassword
    • secretsmanager:CreateSecret
    • secretsmanager:TagResource
    • secretsmanager:PutSecretValue
  • SecretsManager インライン IAM ポリシー

    • secretsmanager:DeleteSecret
    • secretsmanager:GetSecretValue
    • secretsmanager:GetRandomPassword
    • secretsmanager:CreateSecret
    • secretsmanager:TagResource
    • secretsmanager:PutSecretValue
  • RDS インライン IAM ポリシー

    • rds:DeleteDBSubnetGroup
    • rds:DeleteDBInstance
    • rds:CreateDBSubnetGroup
    • rds:AddTagsToResource
    • rds:CreateDBInstance
    • rds:DescribeDBSubnetGroups
    • rds:DescribeDBInstances
  • RDS インライン IAM ポリシー

    • rds:DeleteDBSubnetGroup
    • rds:DeleteDBInstance
    • rds:CreateDBSubnetGroup
    • rds:AddTagsToResource
    • rds:CreateDBInstance
    • rds:DescribeDBSubnetGroups
    • rds:DescribeDBInstances
  • Elastic File System インライン IAM ポリシー

    • elasticfilesystem:DeleteFileSystem
    • elasticfilesystem:DeleteMountTarget
    • elasticfilesystem:DeleteAccessPoint
    • elasticfilesystem:CreateFileSystem
    • elasticfilesystem:CreateAccessPoint
    • elasticfilesystem:CreateMountTarget
    • elasticfilesystem:DescribeFileSystems
    • elasticfilesystem:DescribeFileSystemPolicy
    • elasticfilesystem:DescribeBackupPolicy
    • elasticfilesystem:DescribeLifecycleConfiguration
    • elasticfilesystem:DescribeAccessPoints
    • elasticfilesystem:DescribeMountTargets
  • Elastic File System インライン IAM ポリシー

    • elasticfilesystem:DeleteFileSystem
    • elasticfilesystem:DeleteMountTarget
    • elasticfilesystem:DeleteAccessPoint
    • elasticfilesystem:CreateFileSystem
    • elasticfilesystem:CreateAccessPoint
    • elasticfilesystem:CreateMountTarget
    • elasticfilesystem:DescribeFileSystems
    • elasticfilesystem:DescribeFileSystemPolicy
    • elasticfilesystem:DescribeBackupPolicy
    • elasticfilesystem:DescribeLifecycleConfiguration
    • elasticfilesystem:DescribeAccessPoints
    • elasticfilesystem:DescribeMountTargets
  • EC2 インライン IAM ポリシー

    • ec2:RevokeSecurityGroupEgress
    • ec2:RevokeSecurityGroupIngress
    • ec2:DescribeKeyPairs
    • ec2:CreateSecurityGroup
    • ec2:DescribeSecurityGroups
    • ec2:DeleteSecurityGroup
    • ec2:CreateTags
    • ec2:AuthorizeSecurityGroupEgress
    • ec2:AuthorizeSecurityGroupIngress
    • ec2:DescribeInstances
    • ec2:CreateVpc
    • ec2:DescribeVpcs
    • ec2:DeleteVpc
    • ec2:CreateSubnet
    • ec2:DeleteSubnet
    • ec2:DescribeSubnets
    • ec2:DeleteSubnetCidrReservation
    • ec2:AssociateSubnetCidrBlock
    • ec2:DisassociateSubnetCidrBlock
    • ec2:CreateSubnetCidrReservation
    • ec2:GetSubnetCidrReservations
    • ec2:DescribeAvailabilityZones
    • ec2:CreateRouteTable
    • ec2:DeleteRouteTable
    • ec2:CreateRoute
    • ec2:DeleteRoute
    • ec2:CreateInternetGateway
    • ec2:DeleteInternetGateway
    • ec2:DescribeInternetGateways
    • ec2:AttachInternetGateway
    • ec2:DetachInternetGateway
    • ec2:AssociateRouteTable
    • ec2:DescribeRouteTables
    • ec2:DisassociateRouteTable
    • ec2:ModifyVpcAttribute
    • ec2:DescribeAccountAttributes
    • ec2:DescribeAddresses
    • ec2:AssociateAddress
    • ec2:DisassociateAddress
    • ec2:DescribeAddressesAttribute
    • ec2:ModifyAddressAttribute
    • ec2:AssociateNatGatewayAddress
    • ec2:DisassociateNatGatewayAddress
    • ec2:CreateNatGateway
    • ec2:DeleteNatGateway
    • ec2:DescribeNatGateways
    • ec2:AllocateAddress
    • ec2:ReleaseAddress
  • EC2 インライン IAM ポリシー

    • ec2:RevokeSecurityGroupEgress
    • ec2:RevokeSecurityGroupIngress
    • ec2:DescribeKeyPairs
    • ec2:CreateSecurityGroup
    • ec2:DescribeSecurityGroups
    • ec2:DeleteSecurityGroup
    • ec2:CreateTags
    • ec2:AuthorizeSecurityGroupEgress
    • ec2:AuthorizeSecurityGroupIngress
    • ec2:DescribeInstances
  • AutoScaling インライン IAM ポリシー

    • autoscaling:CreateLaunchConfiguration
    • autoscaling:CreateAutoScalingGroup
    • autoscaling:DeleteLaunchConfiguration
    • autoscaling:UpdateAutoScalingGroup
    • autoscaling:DeleteAutoScalingGroup
    • autoscaling:DescribeAutoScalingGroups
    • autoscaling:DescribeLaunchConfigurations
    • autoscaling:DescribeScalingActivities
    • autoscaling:DescribeAutoScalingInstances
  • AutoScaling インライン IAM ポリシー

    • autoscaling:CreateLaunchConfiguration
    • autoscaling:CreateAutoScalingGroup
    • autoscaling:DeleteLaunchConfiguration
    • autoscaling:UpdateAutoScalingGroup
    • autoscaling:DeleteAutoScalingGroup
    • autoscaling:DescribeAutoScalingGroups
    • autoscaling:DescribeLaunchConfigurations
    • autoscaling:DescribeScalingActivities
    • autoscaling:DescribeAutoScalingInstances
  • ElasticLoadBalancing インライン IAM ポリシー

    • elasticloadbalancing:CreateTargetGroup
    • elasticloadbalancing:ModifyTargetGroupAttributes
    • elasticloadbalancing:DeleteTargetGroup
    • elasticloadbalancing:AddTags
    • elasticloadbalancing:CreateLoadBalancer
    • elasticloadbalancing:ModifyLoadBalancerAttributes
    • elasticloadbalancing:DescribeTargetGroups
    • elasticloadbalancing:DescribeListeners
    • elasticloadbalancing:CreateListener
    • elasticloadbalancing:DeleteListener
    • elasticloadbalancingv2:DeleteLoadBalancer
    • elasticloadbalancingv2:DescribeLoadBalancers
  • ElasticLoadBalancing インライン IAM ポリシー

    • elasticloadbalancing:CreateTargetGroup
    • elasticloadbalancing:ModifyTargetGroupAttributes
    • elasticloadbalancing:DeleteTargetGroup
    • elasticloadbalancing:AddTags
    • elasticloadbalancing:CreateLoadBalancer
    • elasticloadbalancing:ModifyLoadBalancerAttributes
    • elasticloadbalancing:DescribeTargetGroups
    • elasticloadbalancing:DescribeListeners
    • elasticloadbalancing:CreateListener
    • elasticloadbalancing:DeleteListener
    • elasticloadbalancingv2:DeleteLoadBalancer
    • elasticloadbalancingv2:DescribeLoadBalancers
  • SNS インライン IAM ポリシー

    • sns:ListTopics
  • SNS インライン IAM ポリシー

    • sns:ListTopics

2.1.2. EC2 ペアの作成

AWS Marketplace で入手可能な Ansible Automation Platform を設定するには、SSH キーペアが必要です。既存のキーペアを使用するか、新しいキーペアを作成できます。既存のキーペアがある場合は、この手順を省略できます。

手順

  1. AWS コンソールで、EC2 に移動します。
  2. Network and Security セクションで、Key Pairs をクリックします。
  3. Create key pair をクリックします。
  4. 入力フォームのフィールドに入力します。

    • キーペアタイプとして ED25519 を使用します。
    • 鍵ファイル形式として PEM を使用します。
  5. Create key pair をクリックします。
  6. 秘密鍵は、/downloads フォルダーに自動的にダウンロードされます。適切なローカルファイル権限を適用して、キーファイルを保護します。