Browse the Repo

file-type-icon.circleci
file-type-icon_docs
file-type-iconexamples
file-type-iconelasticsearch-docker
file-type-iconelasticsearch-only-cluster
file-type-iconuser-data
file-type-iconREADME.md
file-type-iconmain.tf
file-type-iconoutputs.tf
file-type-iconvars.tf
file-type-iconelk-amis
file-type-iconelk-multi-cluster
file-type-iconelk-single-cluster
file-type-iconmodules
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconCONTRIBUTING.md
file-type-iconLICENSE.md
file-type-iconREADME.md
file-type-iconterraform-cloud-enterprise-private-module-...

Browse the Repo

file-type-icon.circleci
file-type-icon_docs
file-type-iconexamples
file-type-iconelasticsearch-docker
file-type-iconelasticsearch-only-cluster
file-type-iconuser-data
file-type-iconREADME.md
file-type-iconmain.tf
file-type-iconoutputs.tf
file-type-iconvars.tf
file-type-iconelk-amis
file-type-iconelk-multi-cluster
file-type-iconelk-single-cluster
file-type-iconmodules
file-type-icontest
file-type-icon.gitignore
file-type-icon.pre-commit-config.yaml
file-type-iconCODEOWNERS
file-type-iconCONTRIBUTING.md
file-type-iconLICENSE.md
file-type-iconREADME.md
file-type-iconterraform-cloud-enterprise-private-module-...
Elasticsearch (self-hosted)

Elasticsearch (self-hosted)

Deploy a self-hosted Elasticsearch cluster. Supports automatic bootstrap, zero-downtime rolling deployment, auto healing, backup, and recovery.

Code Preview

Preview the Code

mobile file icon

README.md

down

Elasticsearch Single Cluster Example

This folder shows an example of Terraform code that uses the elasticsearch-cluster module to deploy a Elasticsearch cluster in AWS. The cluster consists of one Auto Scaling Group (ASG) that runs all Elasticsearch nodes. We use the ReadonlyREST plugin along with a self signed certificate in a Java Key Store to enable Elasticsearch nodes to use SSL for API requests/responses.

This example also deploys a Load Balancer in front of the Elasticsearch cluster using the load-balancer module.

You will need to create an Amazon Machine Image (AMI) that has Elasticsearch installed along with the ReadonlyREST plugin, which you can do using the elasticsearch-ami example).

To see an example of the Elasticsearch services deployed in separate clusters, see the elk-multi-cluster example. For more info on how the Elasticsearch cluster works, check out the elasticsearch-cluster documentation.

To deploy an Elasticsearch Cluster:

  1. git clone this repo to your computer.
  2. Build an Elasticsearch AMI. See the elasticsearch-ami example documentation for instructions. Make sure to note down the ID of the AMI.
  3. Install Terraform.
  4. Open vars.tf, set the environment variables specified at the top of the file, and fill in any other variables that don't have a default, including putting your AMI ID into the ami_id variable.
  5. Run terraform init.
  6. Run terraform apply.

Connecting to the cluster

Please see instructions here

Questions? Ask away.

We're here to talk about our services, answer any questions, give advice, or just to chat.

Ready to hand off the Gruntwork?