Skip to content

Provisioning Source Cluster for Testing

Tanner Lewis edited this page Aug 8, 2024 · 9 revisions

This guide walks through steps to provision an Elasticsearch cluster on EC2. The CDK that will provision this cluster can be found on the migration-es branch of the opensearch-cluster-cdk Github forked repo

  1. Download repository for source cluster CDK
git clone https://github.com/lewijacn/opensearch-cluster-cdk.git && cd opensearch-cluster-cdk && git checkout migration-es
  1. Configure cluster options

The below options configure a single node Elasticsearch 7.10.2 cluster on EC2 as well as a VPC to place the cluster into, though alternatively a vpcId could be provided for an existing VPC. These options can be copied and pasted into a cdk.context.json file in the current repository root directory to use for a deployment. Be sure to swap the <STAGE> placeholders with the desired deployment stage e.g. dev

{
  "source-single-node-ec2": {
    "suffix": "ec2-source-<STAGE>",
    "networkStackSuffix": "ec2-source-<STAGE>",
    "distVersion": "7.10.2",
    "cidr": "12.0.0.0/16",
    "distributionUrl": "https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-oss-7.10.2-linux-x86_64.tar.gz",
    "captureProxyEnabled": false,
    "securityDisabled": true,
    "minDistribution": false,
    "cpuArch": "x64",
    "isInternal": true,
    "singleNodeCluster": true,
    "networkAvailabilityZones": 2,
    "dataNodeCount": 1,
    "managerNodeCount": 0,
    "serverAccessType": "ipv4",
    "restrictServerAccessTo": "0.0.0.0/0"
  }
}

For a full list of options, please reference the CDK options here

Owner: @lewijacn

Clone this wiki locally