Massdriver

aws-elasticache-redis

Release Contributors Forks Stargazers Issues MIT License

Amazon ElastiCache for Redis is a blazing fast in-memory data store that provides sub-millisecond latency to power internet-scale real-time applications.


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_mode_enabled (boolean): Cluster mode allows you to scale your cluster horizontally across multiple node groups. This is useful at massive scale (beyond limits of vertical scaling). NOTE: this setting cannot be changed after cluster creation. Default: False.
  • node_groups (integer): Number of node groups (shards) in the cluster. Each node group will have a primary node and the number of read replicas specified above. Minimum: 2. Maximum: 250. Default: 2.
  • node_type (string): AWS node type to use for the cluster. Must be one of: ['cache.m5.large', 'cache.m5.xlarge', 'cache.m5.2xlarge', 'cache.m5.4xlarge', 'cache.m5.12xlarge', 'cache.m5.24xlarge', 'cache.r5.large', 'cache.r5.xlarge', 'cache.r5.2xlarge', 'cache.r5.4xlarge', 'cache.r5.12xlarge', 'cache.r5.24xlarge', 'cache.t3.micro', 'cache.t3.small', 'cache.t3.medium'].
  • redis_version (string): Major Redis version to use. Must be one of: ['3.2', '4.0', '5.0', '6.x']. Default: 6.x.
  • replicas (integer): Number of read replicas per node group. Each node group will have a single primary instace, and 0 to 5 read replicas. If you would like automatic fail-over for high-availability, you need at least 1 replica. Must be one of: [0, 1, 2, 3, 4, 5]. Default: 0.
  • secure (boolean): Enabling this will auto-generate an auth token (password) and enable TLS encrypted client connections. NOTE: this setting cannot be changed after cluster creation. Default: True.
  • subnet_type (string): Deploy Redis to internal subnets (cannot reach the internet) or private subnets (internet egress traffic allowed). Must be one of: ['internal', 'private']. Default: internal.

Examples

{
    "__name": "Free Tier",
    "allow_vpc_access": true,
    "cluster_mode_enabled": false,
    "node_type": "cache.t3.micro",
    "redis_version": "6.x",
    "replicas": 0,
    "secure": true
}
{
    "__name": "Highly Available",
    "allow_vpc_access": true,
    "cluster_mode_enabled": false,
    "node_type": "cache.t3.micro",
    "redis_version": "6.x",
    "replicas": 1,
    "secure": true
}
{
    "__name": "Sharded Cluster",
    "allow_vpc_access": true,
    "cluster_mode_enabled": true,
    "node_groups": 2,
    "node_type": "cache.r5.large",
    "redis_version": "6.x",
    "replicas": 1,
    "secure": true
}

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"
            • aws_zone (string): AWS Availability Zone.

              Examples:

            • cidr (string)

              Examples:

              "10.100.0.0/16"
              "192.24.12.0/22"

            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"
            • aws_zone (string): AWS Availability Zone.

              Examples:

            • cidr (string)

              Examples:

              "10.100.0.0/16"
              "192.24.12.0/22"

            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"
            • aws_zone (string): AWS Availability Zone.

              Examples:

            • cidr (string)

              Examples:

              "10.100.0.0/16"
              "192.24.12.0/22"

            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

  • authentication (object): Redis cluster authentication and cloud-specific configuration. Cannot contain additional properties.
    • data (object)
      • authentication (object)

        • hostname (string)
        • password (string)
        • port (integer): Port number. Minimum: 0. Maximum: 65535.
        • username (string)
      • infrastructure (object): Cloud specific Redis configuration data.

        • One of
          • AWS Infrastructure ARNobject: Minimal AWS Infrastructure Config. Cannot contain additional properties.

            • arn (string): Amazon Resource Name.

              Examples:

              "arn:aws:rds::ACCOUNT_NUMBER:db/prod"
              "arn:aws:ec2::ACCOUNT_NUMBER:vpc/vpc-foo"
          • GCP Infrastructure GRNobject: Minimal GCP Infrastructure Config. Cannot contain additional properties.

            • grn (string): GCP Resource Name (GRN).

              Examples:

              "projects/my-project/global/networks/my-global-network"
              "projects/my-project/regions/us-west2/subnetworks/my-subnetwork"
              "projects/my-project/topics/my-pubsub-topic"
              "projects/my-project/subscriptions/my-pubsub-subscription"
              "projects/my-project/locations/us-west2/instances/my-redis-instance"
              "projects/my-project/locations/us-west2/clusters/my-gke-cluster"
          • Azure Redis Cache infrastructure configobject: . Cannot contain additional properties.

            • ari (string): Azure Resource ID.

              Examples:

              "/subscriptions/12345678-1234-1234-abcd-1234567890ab/resourceGroups/resource-group-name/providers/Microsoft.Network/virtualNetworks/network-name"
      • security (object): TBD.

        • Any of
          • AWS Security informationobject: 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'].

          • Securityobject: GCP Security Configuration. Cannot contain additional properties.

            • iam (object): IAM Roles And Conditions. Cannot contain additional properties.
              • ^[a-z]+[a-z_]*[a-z]$ (object)
                • condition (string): GCP IAM Condition.

                • role: GCP Role.

                  Examples:

                  "roles/owner"
                  "roles/redis.editor"
                  "roles/storage.objectCreator"
                  "roles/storage.legacyObjectReader"
          • Securityobject: Azure Security Configuration. Cannot contain additional properties.

            • iam (object): IAM Roles And Scopes. Cannot contain additional properties.
              • ^[a-z]+[a-z_]*[a-z]$ (object)
                • role: Azure Role.

                  Examples:

                  "Storage Blob Data Reader"
                • scope (string): Azure IAM Scope.

    • specs (object)
      • aws (object): .

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

          Examples:

          "us-west-2"
      • azure (object): .

        • region (string): Select the Azure region you'd like to provision your resources in.
      • cache (object): The root schema comprises the entire JSON document.

        • engine (string): The cache engine. Default: ``.

          Examples:

          "redis"
        • version (string): The version of the engine. Default: ``.

          Examples:

          "6.2"

        Examples:

        {
            "engine": "redis",
            "version": "6.2"
        }
      • gcp (object): .

        • project (string)

        • region (string): The GCP region to provision resources in.

          Examples:

          "us-east1"
          "us-east4"
          "us-west1"
          "us-west2"
          "us-west3"
          "us-west4"
          "us-central1"

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