{"id":18746062,"url":"https://github.com/fscm/packer-aws-solr","last_synced_at":"2025-07-07T02:07:17.368Z","repository":{"id":202050311,"uuid":"80423143","full_name":"fscm/packer-aws-solr","owner":"fscm","description":"Packer Template to build a AWS Apache Solr AMI","archived":false,"fork":false,"pushed_at":"2022-01-03T16:05:51.000Z","size":24,"stargazers_count":7,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-19T22:35:40.246Z","etag":null,"topics":["ami","aws","packer","solr"],"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-30T13:20:37.000Z","updated_at":"2024-05-30T21:58:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"95ed8f44-c5bb-4cb9-8c75-f8d994c7d875","html_url":"https://github.com/fscm/packer-aws-solr","commit_stats":null,"previous_names":["fscm/packer-aws-solr"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fscm/packer-aws-solr","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-solr","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-solr/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-solr/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-solr/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fscm","download_url":"https://codeload.github.com/fscm/packer-aws-solr/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-solr/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264000627,"owners_count":23542112,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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","packer","solr"],"created_at":"2024-11-07T16:20:42.734Z","updated_at":"2025-07-07T02:07:17.346Z","avatar_url":"https://github.com/fscm.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apache Solr AMI\n\nAMI that should be used to create virtual machines with Apache Solr\ninstalled.\n\n## Synopsis\n\nThis script will create an AMI with Apache Solr installed and with all of\nthe required initialization scripts.\n\nThe AMI resulting from this script should be the one used to instantiate a\nSolr 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 'solr_version=\u003cSOLR_VERSION\u003e' \\\n    [-var 'option=value'] \\\n    solr.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: \"Solr\").\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- `solr_version` - *[required]* Solr version.\n- `system_locale` - Locale for the system (default value: \"en_US\").\n- `zookeeper_version` - Zookeeper version (default value: \"3.4.9\").\n\n### Instantiate a Cluster\n\nIn order to end up with a functional Solr Cluster some configurations have to\nbe performed after instantiating the servers.\n\nTo help perform those configurations a small script is included on the AWS\nimage. The script is called **solr_config**.\n\nA Zookeeper instance or cluster (for production environments) is required to\ninstantiate a Solr cluster.\n\nIf required, a Zookeeper server/node can be started within this image (see\nbelow for more information) however, for production environments, it is\nrecommended to use a dedicated and separated Zookeeper instance or cluster.\n\n#### Solr Configuration Script\n\nThe script can and should be used to set some of the Solr options as well as\nsetting the Solr service to start at boot.\n\n```\nUsage: solr_config [options]\n```\n\n##### Options\n\n* `-a \u003cADDRESS\u003e` - Sets the Solr node address exposed to the cluster (default value is 'localhost').\n* `-D` - Disables the Solr service from start at boot time.\n* `-E` - Enables the Solr service to start at boot time.\n* `-m \u003cMEMORY\u003e` - Sets Solr heap size. Values should be provided following the same Java heap nomenclature.\n* `-S` - Starts the Solr service after performing the required configurations (if any given).\n* `-W \u003cSECONDS\u003e` - Waits the specified amount of seconds before starting the Solr service (default value is '0').\n* `-z \u003cENDPOINT\u003e` - Sets a Zookeeper server endpoint to be used by the Solr node (defaut value is 'localhost:2181'). Several Zookeeper endpoints can be set by either using extra `-z` options or if separated with a comma on the same `-z` option.\n\n#### Configuring a Solr node\n\nTo prepare an instance to act as a Solr node the following steps need to be\nperformed.\n\nRun the configuration tool (*solr_config*) to configure the instance.\n\n```\nsolr_config -a solr01.mydomain.tld -E -S -z zookeeper01.mydomain.tld:2181\n```\n\nAfter this steps a Solr node (for either a single instance or a cluster setup)\nshould be running and configured to start on server boot.\n\nMore options can be used on the instance configuration, see the\n[Configuration Script](#solr-configuration-script) section for more details\n\n### Instantiate Zookeeper\n\nIs it possible to use the included Zookeeper installation to instantiate a\nZookeeper node (standalone or as part of a cluster).\n\nIn order to end up with a functional Zookeeper node some configurations have to\nbe performed after instantiating the servers.\n\nTo help perform those configurations a small script is included on the AWS\nimage. The script is called **zookeeper_config**.\n\n#### Zookeeper Configuration Script\n\nThe script can and should be used to set some of the Zookeeper options as well\nas setting the Zookeeper service to start at boot.\n\n```\nUsage: zookeeper_config [options]\n```\n\n##### Options\n\n* `-D` - Disables the Zookeeper service from start at boot time.\n* `-E` - Enables the Zookeeper service to start at boot time.\n* `-i \u003cID\u003e` - Sets the Zookeeper broker ID (default value is '1').\n* `-m \u003cMEMORY\u003e` - Sets Zookeeper maximum heap size. Values should be provided following the same Java heap nomenclature.\n* `-n \u003cID:ADDRESS\u003e` - The ID and Address of a cluster node (e.g.: '1:127.0.0.1'). Should be used to set all the Zookeeper nodes. Several Zookeeper nodes can be set by either using extra `-n` options or if separated with a comma on the same `-n` option.\n* `-S` - Starts the Zookeeper service after performing the required configurations (if any given).\n* `-W \u003cSECONDS\u003e` - Waits the specified amount of seconds before starting the Zookeeper service (default value is '0').\n\n#### Configuring a Zookeeper Node\n\nTo prepare an instance to act as a Zookeeper node the following steps need to\nbe performed.\n\nRun the configuration tool (*zookeeper_config*) to configure the instance.\n\n```\nzookeeper_config -E -S\n```\n\nAfter this steps a Zookeeper node (for a standalone setup) should be running\nand configured to start on server boot.\n\nFor a cluster with more than one Zookeeper node other options have to be\nconfigured on each instance using the same configuration tool\n(*zookeeper_config*).\n\n```\nzookeeper_config -E -i 1 -n 1:zookeeper01.mydomain.tld -n 2:zookeeper02.mydomain.tld,3:zookeeper03.mydomain.tld -S\n```\n\nAfter this steps, the first node of the Zookeeper 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](#zookeeper-configuration-script) section for more details\n\n## Services\n\nThis AMI will have the SSH service running as well as the Solr services. The\nZookeeper service may also be running on this AMI.\nThe following ports will have to be configured on Security Groups.\n\n| Service      | Port      | Protocol |\n|--------------|:---------:|:--------:|\n| SSH          | 22        |    TCP   |\n| Zookeeper    | 2181      |    TCP   |\n| Zookeeper    | 2888:3888 |    TCP   |\n| Solr         | 8983      |    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-solr/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-solr/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-solr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffscm%2Fpacker-aws-solr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffscm%2Fpacker-aws-solr/lists"}