Skip to content

massdriver-cloud/aws-ecs-cluster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Massdriver

aws-ecs-cluster

Release Contributors Forks Stargazers Issues MIT License

AWS ECS is Amazon's fully managed container orchestration service, making it easy for users to deploy, manage and scale containerized workloads.


Design

For detailed information, check out our Operator Guide for this bundle.

Usage

Our bundles aren't intended to be used locally, outside of testing. Instead, our bundles are designed to be configured, connected, deployed and monitored in the Massdriver platform.

What are Bundles?

Bundles are the basic building blocks of infrastructure, applications, and architectures in Massdriver. Read more here.

Bundle

Params

Form input parameters for configuring a bundle for deployment.

View

Properties

  • cluster (object)
    • ingress (object): Configure network ingress for your ECS cluster.
      • enable_ingress (boolean): Enabling ingress will create an ALB for your cluster to securely route traffic to your workloads. Default: False.
    • instances (array): AWS EC2 instances to associate with your ECS cluster for running workloads.
      • Items (object)
        • instance_type (string): Instance type to use in the node group.
          • One of
            • C5 High-CPU Large (2 vCPUs, 4.0 GiB)
            • C5 High-CPU Extra Large (4 vCPUs, 8.0 GiB)
            • C5 High-CPU Double Extra Large (8 vCPUs, 16.0 GiB)
            • C5 High-CPU Quadruple Extra Large (16 vCPUs, 32.0 GiB)
            • C5 High-CPU 9xlarge (36 vCPUs, 72.0 GiB)
            • C5 High-CPU 12xlarge (48 vCPUs, 96.0 GiB)
            • C5 High-CPU 18xlarge (72 vCPUs, 144.0 GiB)
            • C5 High-CPU 24xlarge (96 vCPUs, 192.0 GiB)
            • M7g General Purpose Medium (1 vCPUs, 4.0 GiB)
            • M7g General Purpose Large (2 vCPUs, 8.0 GiB)
            • M7g General Purpose Extra Large (4 vCPUs, 16.0 GiB)
            • M5 General Purpose Large (2 vCPUs, 8.0 GiB)
            • M5 General Purpose Extra Large (4 vCPUs, 16.0 GiB)
            • M5 General Purpose Double Extra Large (8 vCPUs, 32.0 GiB)
            • M5 General Purpose Quadruple Extra Large (16 vCPUs, 64.0 GiB)
            • M5 General Purpose Eight Extra Large (32 vCPUs, 128.0 GiB)
            • M5 General Purpose 12xlarge (48 vCPUs, 192.0 GiB)
            • M5 General Purpose 16xlarge (64 vCPUs, 256.0 GiB)
            • M5 General Purpose 24xlarge (96 vCPUs, 384.0 GiB)
            • T3 Small (2 vCPUs for a 4h 48m burst, 2.0 GiB)
            • T3 Medium (2 vCPUs for a 4h 48m burst, 4.0 GiB)
            • T3 Large (2 vCPUs for a 7h 12m burst, 8.0 GiB)
            • T3 Extra Large (4 vCPUs for a 9h 36m burst, 16.0 GiB)
            • T3 Double Extra Large (8 vCPUs for a 9h 36m burst, 32.0 GiB)
            • P2 General Purpose GPU Extra Large (4 vCPUs, 61.0 GiB)
            • P2 General Purpose GPU Eight Extra Large (32 vCPUs, 488.0 GiB)
            • P2 General Purpose GPU 16xlarge (64 vCPUs, 732.0 GiB)
            • G5 Single GPU Extra Large (4 vCPUs, 16 GiB)
            • G5 Single GPU Two Extra Large (8 vCPUs, 32 GiB)
            • G5 Single GPU Four Extra Large (16 vCPUs, 64 GiB)
        • max_size (integer): Maximum number of instances in the node group. Minimum: 0. Default: 10.
        • min_size (integer): Minimum number of instances in the node group. Minimum: 0. Default: 1.
        • name (string): The name of the node group. Default: ``.

Examples

{
    "__name": "Development",
    "cluster": {
        "instances": [
            {
                "instance_type": "t3.medium",
                "max_size": 10,
                "min_size": 1,
                "name": "instances"
            }
        ]
    }
}
{
    "__name": "Production",
    "cluster": {
        "instances": [
            {
                "instance_type": "t3.medium",
                "max_size": 10,
                "min_size": 1,
                "name": "instances"
            }
        ]
    }
}

Connections

Connections from other bundles that this bundle depends on.

View

Properties

  • aws_authentication (object): . Cannot contain additional properties.

    • data (object)
      • arn (string): Amazon Resource Name.

        Examples:

        "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
        "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
      • external_id (string): An external ID is a piece of data that can be passed to the AssumeRole API of the Security Token Service (STS). You can then use the external ID in the condition element in a role's trust policy, allowing the role to be assumed only when a certain value is present in the external ID.

    • specs (object)
      • aws (object): .
        • region (string): AWS Region to provision in.

          Examples:

          "us-west-2"
  • vpc (object): . Cannot contain additional properties.

    • data (object)
      • infrastructure (object)
        • arn (string): Amazon Resource Name.

          Examples:

          "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
          "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
        • cidr (string)

          Examples:

          "10.100.0.0/16"
          "192.24.12.0/22"
        • internal_subnets (array)

          • Items (object): AWS VCP Subnet.

            • arn (string): Amazon Resource Name.

              Examples:

              "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
              "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"

            Examples:

        • private_subnets (array)

          • Items (object): AWS VCP Subnet.

            • arn (string): Amazon Resource Name.

              Examples:

              "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
              "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"

            Examples:

        • public_subnets (array)

          • Items (object): AWS VCP Subnet.

            • arn (string): Amazon Resource Name.

              Examples:

              "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
              "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"

            Examples:

    • specs (object)
      • aws (object): .
        • region (string): AWS Region to provision in.

          Examples:

          "us-west-2"

Artifacts

Resources created by this bundle that can be connected to other bundles.

View

Properties

  • cluster (object): Cannot contain additional properties.
    • data (object)
      • capabilities (object)

        • ingress (array): Default: [].
          • Items (object)
            • listeners (array)

              • Items (object)
                • arn (string): Amazon Resource Name.

                  Examples:

                  "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
                  "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
                • domains (array): Default: [].

                  • Items (string)
                • port (integer): Port number. Minimum: 0. Maximum: 65535.

                • protocol (string): Must be one of: ['http', 'https'].

            • load_balancer_arn (string): Amazon Resource Name.

              Examples:

              "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
              "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
            • security_group_arn (string): Amazon Resource Name.

              Examples:

              "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
              "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
      • infrastructure (object)

        • arn (string): Amazon Resource Name.

          Examples:

          "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
          "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
        • vpc (object): . Cannot contain additional properties.

          • data (object)
            • infrastructure (object)
              • arn (string): Amazon Resource Name.

                Examples:

                "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
                "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
              • cidr (string)

                Examples:

                "10.100.0.0/16"
                "192.24.12.0/22"
              • internal_subnets (array)

                • Items (object): AWS VCP Subnet.

                  • arn (string): Amazon Resource Name.

                    Examples:

                    "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
                    "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"

                  Examples:

              • private_subnets (array)

                • Items (object): AWS VCP Subnet.

                  • arn (string): Amazon Resource Name.

                    Examples:

                    "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
                    "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"

                  Examples:

              • public_subnets (array)

                • Items (object): AWS VCP Subnet.

                  • arn (string): Amazon Resource Name.

                    Examples:

                    "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
                    "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"

                  Examples:

          • specs (object)
            • aws (object): .
              • region (string): AWS Region to provision in.

                Examples:

                "us-west-2"
      • security (object): Informs downstream services of network and/or IAM policies. Cannot contain additional properties.

        • iam (object): IAM Policies. Cannot contain additional properties.

          • ^[a-z]+[a-z_]*[a-z]+$ (object)
            • policy_arn (string): AWS IAM policy ARN.

              Examples:

              "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
              "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
        • identity (object): For instances where IAM policies must be attached to a role attached to an AWS resource, for instance AWS Eventbridge to Firehose, this attribute should be used to allow the downstream to attach it's policies (Firehose) directly to the IAM role created by the upstream (Eventbridge). It is important to remember that connections in massdriver are one way, this scheme perserves the dependency relationship while allowing bundles to control the lifecycles of resources under it's management. Cannot contain additional properties.

          • role_arn (string): ARN for this resources IAM Role.

            Examples:

            "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
            "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
        • network (object): AWS security group rules to inform downstream services of ports to open for communication. Cannot contain additional properties.

          • ^[a-z-]+$ (object)
            • arn (string): Amazon Resource Name.

              Examples:

              "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
              "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
            • port (integer): Port number. Minimum: 0. Maximum: 65535.

            • protocol (string): Must be one of: ['tcp', 'udp'].

    • specs (object)
      • aws (object): .
        • region (string): AWS Region to provision in.

          Examples:

          "us-west-2"

Contributing

Bug Reports & Feature Requests

Did we miss something? Please submit an issue to report any bugs or request additional features.

Developing

Note: Massdriver bundles are intended to be tightly use-case scoped, intention-based, reusable pieces of IaC for use in the Massdriver platform. For this reason, major feature additions that broaden the scope of an existing bundle are likely to be rejected by the community.

Still want to get involved? First check out our contribution guidelines.

Fix or Fork

If your use-case isn't covered by this bundle, you can still get involved! Massdriver is designed to be an extensible platform. Fork this bundle, or create your own bundle from scratch!

Connect

Questions? Concerns? Adulations? We'd love to hear from you!

Please connect with us!

Email GitHub LinkedIn Twitter YouTube Reddit