Skip to content

SparkleFormation template for resource AWS::Elasticsearch::Domain

Notifications You must be signed in to change notification settings

slyness/sparkleformation-aws-elasticsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SparkleFormation AWS::Elasticsearch::Domain Example

This is a SparkleFormation template example for creating an AWS Elasticsearch Service Cluster.

This template is an implementation of the CloudFormation resource example provided for AWS::Elasticsearch::Domain.

And now, because my CloudFormation template is expressed using SparkleFormation I have a re-usable and updatable way to create Amazon AWS Resources. Like as many Elasticsearch domains I would ever need. Woooo!

As you see I have parameterized some of the more interesting or important configuration settings. You can chose which elasticsearch instance type you determine your cluster members should run on, choose how many master only and master data instances should be created to make the cluster, and choose the size of the EBS volume for data.

This was some personal practice. However, I also wrote it as and example of using SparkleFormation to create a CloudFormation stack implementing a AWS CloudFormation Resource. Thus using SparkleFormation to directly describe the example in the documentation so they can be compared to each other.

I also wanted to set up the repository so that it is easy for anyone to give sfn and SparkleFormation a try. You just need to have ruby and bundler installed, clone this repository and run bundle install. Oh, and set a couple of environment variables....

I encourage you to give it a shot.

A few commands to remember:

  • bundle exec sfn create mystack
  • bundle exec sfn destroy mystack
  • And if you'd like to look at the json CloudFormation template that this template creates
    • bundle exec sfn print mystack --file sparkleformation/elasticsearch.rb

See Usage for steps to build a stack.

What is SparkleFormation? SparkleFormation Documentation

Dependencies

Environment Variables

You are required to set three environment variables to provide correct authentication information to AWS.

export AWS_ACCESS_KEY_ID="AKIAINSANIKEY322BPKQ"
export AWS_SECRET_ACCESS_KEY="jkasdfjA/DJFASDJF1ASCRAZYKEY009235jadf"
export AWS_REGION="us-west-2"

SparkleFormation Configuration

sfn is configured with the .sfn file located in this repository.

Installation

SparkleFormation and the sfn are installed as gems using bundler. You will need to make sure Ruby and bundler are installed.

Usage

  • Clone repository
    • git clone https://github.com/slyness/sparkleformation-aws-elasticsearch.git
  • Set appropriate environment variables
  • bundle install
  • bundle exec sfn create elasticsearch --file elasticsearch

About

SparkleFormation template for resource AWS::Elasticsearch::Domain

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages