{"id":18746069,"url":"https://github.com/fscm/packer-aws-elasticsearch","last_synced_at":"2026-03-18T00:48:03.182Z","repository":{"id":202050288,"uuid":"80128924","full_name":"fscm/packer-aws-elasticsearch","owner":"fscm","description":"Packer Template to build a AWS Elasticsearch AMI","archived":false,"fork":false,"pushed_at":"2022-01-03T16:05:45.000Z","size":26,"stargazers_count":9,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T22:36:14.326Z","etag":null,"topics":["ami","aws","elasticsearch","packer"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fscm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-01-26T15:51:32.000Z","updated_at":"2022-01-03T16:05:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"847f5af6-0f9a-4480-b727-c38def32a36f","html_url":"https://github.com/fscm/packer-aws-elasticsearch","commit_stats":null,"previous_names":["fscm/packer-aws-elasticsearch"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fscm/packer-aws-elasticsearch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-elasticsearch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-elasticsearch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-elasticsearch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-elasticsearch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fscm","download_url":"https://codeload.github.com/fscm/packer-aws-elasticsearch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-elasticsearch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30637746,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-18T00:09:27.587Z","status":"ssl_error","status_checked_at":"2026-03-18T00:09:26.123Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ami","aws","elasticsearch","packer"],"created_at":"2024-11-07T16:20:45.242Z","updated_at":"2026-03-18T00:48:03.163Z","avatar_url":"https://github.com/fscm.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Elasticsearch AMI\n\nAMI that should be used to create virtual machines with Elasticsearch\ninstalled.\n\n## Synopsis\n\nThis script will create an AMI with Elasticsearch installed and with all of\nthe required initialization scripts.\n\nThe AMI resulting from this script should be the one used to instantiate a\nElasticsearch server (standalone or cluster).\n\n## Getting Started\n\nThere are a couple of things needed for the script to work.\n\n### Prerequisites\n\nPacker and AWS Command Line Interface tools need to be installed on your local\ncomputer.\nTo build a base image you have to know the id of the latest Debian AMI files\nfor the region where you wish to build the AMI.\n\n#### Packer\n\nPacker installation instructions can be found\n[here](https://www.packer.io/docs/installation.html).\n\n#### AWS Command Line Interface\n\nAWS Command Line Interface installation instructions can be found [here](http://docs.aws.amazon.com/cli/latest/userguide/installing.html)\n\n#### Debian AMI's\n\nThis AMI will be based on an official Debian AMI. The latest version of that\nAMI will be used.\n\nA list of all the Debian AMI id's can be found at the Debian official page:\n[Debian official Amazon EC2 Images](https://wiki.debian.org/Cloud/AmazonEC2Image/)\n\n### Usage\n\nIn order to create the AMI using this packer template you need to provide a\nfew options.\n\n```\nUsage:\n  packer build \\\n    -var 'aws_access_key=AWS_ACCESS_KEY' \\\n    -var 'aws_secret_key=\u003cAWS_SECRET_KEY\u003e' \\\n    -var 'aws_region=\u003cAWS_REGION\u003e' \\\n    -var 'elasticsearch_version=\u003cELASTICSEARCH_VERSION\u003e' \\\n    [-var 'option=value'] \\\n    elasticsearch.json\n```\n\n#### Script Options\n\n- `aws_access_key` - *[required]* The AWS access key.\n- `aws_ami_name` - The AMI name (default value: \"elasticsearch\").\n- `aws_ami_name_prefix` - Prefix for the AMI name (default value: \"\").\n- `aws_instance_type` - The instance type to use for the build (default value: \"t2.micro\").\n- `aws_region` - *[required]* The regions were the build will be performed.\n- `aws_secret_key` - *[required]* The AWS secret key.\n- `java_build_number` - Java build number (default value: \"11\").\n- `java_major_version` - Java major version (default value: \"8\").\n- `java_token` - Java link token (default version: \"d54c1d3a095b4ff2b6607d096fa80163\").\n- `java_update_version` - Java update version (default value: \"131\").\n- `elasticsearch_version` - *[required]* Elasticsearch version.\n- `system_locale` - Locale for the system (default value: \"en_US\").\n\n### Instantiate a Cluster\n\nIn order to end up with a functional Elasticsearch Cluster some configurations\nhave to be performed after instantiating the servers.\n\nTo help perform those configurations a small script is included on the AWS\nimage. The script is called **elasticsearch_config**.\n\n#### Configuration Script\n\nThe script can and should be used to set some of the Elasticsearch options as\nwell as setting the Elasticsearch service to start at boot.\n\n```\nUsage: elasticsearch_config [options]\n```\n\n##### Options\n\n* `-a \u003cADDRESS\u003e` - Sets the Elasticsearch node publish address (default value is 'localhost').\n* `-c \u003cNAME\u003e` - Sets the Elasticsearch cluster name (default value is 'es-cluster').\n* `-D` - Disables the Elasticsearch service from start at boot time.\n* `-E` - Enables the Elasticsearch service to start at boot time.\n* `-m \u003cMEMORY\u003e` - Sets Elasticsearch heap size. Values should be provided following the same Java heap nomenclature.\n* `-n \u003cNAME\u003e` - Sets the Elasticsearch node name (default value is the \\`hostname\\` value).\n* `-p \u003cENDPOINT\u003e` - Sets a Elasticsearch peer endpoint for discovery purposes (default value is 'localhost').\n* `-S` - Starts the Elasticsearch service after performing the required configurations (if any given).\n* `-W \u003cSECONDS\u003e` - Waits the specified amount of seconds before starting the Elasticsearch service (default value is '0').\n\n#### Configuring a Elasticsearch node\n\nTo prepare an instance to act as a Elasticsearch node the following steps\nneed to be performed.\n\nRun the configuration tool (*elasticsearch_config*) to configure the instance.\n\n```\nelasticsearch_config -a es-node.mydomain.tld -E -S\n```\n\nAfter this steps a Elasticsearch node (for a single node cluster) should be\nrunning and configured to start on server boot.\n\nFor a cluster with more than one Elasticsearch node other options have to be\nconfigured on each instance using the same configuration tool\n(*elasticsearch_config*).\n\n```\nelasticsearch_config -a es-node01.mydomain.tld -c My-Cluster -E -p es-node01.mydomain.tld -p es-node02.mydomain.tld,es-node03.mydomain.tld -S\n```\n\nAfter this steps, the first node of the Elasticsearch cluster (for a three node\ncluster) should be running and configured to start on server boot.\n\nMore options can be used on the instance configuration, see the\n[Configuration Script](#configuration-script) section for more details\n\n## Services\n\nThis AMI will have the SSH service running as well as the Elasticsearch\nservices. The following ports will have to be configured on Security Groups.\n\n| Service                                 | Port   | Protocol |\n|-----------------------------------------|:------:|:--------:|\n| SSH                                     | 22     |    TCP   |\n| Elasticsearch RESTful API               | 9200   |    TCP   |\n| Elasticsearch Native Transport Protocol | 9300   |    TCP   |\n\n## Contributing\n\n1. Fork it!\n2. Create your feature branch: `git checkout -b my-new-feature`\n3. Commit your changes: `git commit -am 'Add some feature'`\n4. Push to the branch: `git push origin my-new-feature`\n5. Submit a pull request\n\nPlease read the [CONTRIBUTING.md](CONTRIBUTING.md) file for more details on how\nto contribute to this project.\n\n## Versioning\n\nThis project uses [SemVer](http://semver.org/) for versioning. For the versions\navailable, see the [tags on this repository](https://github.com/fscm/packer-aws-elasticsearch/tags).\n\n## Authors\n\n* **Frederico Martins** - [fscm](https://github.com/fscm)\n\nSee also the list of [contributors](https://github.com/fscm/packer-aws-elasticsearch/contributors)\nwho participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE)\nfile for details\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffscm%2Fpacker-aws-elasticsearch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffscm%2Fpacker-aws-elasticsearch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffscm%2Fpacker-aws-elasticsearch/lists"}