{"id":18746066,"url":"https://github.com/fscm/packer-aws-zookeeper","last_synced_at":"2025-04-12T21:33:30.426Z","repository":{"id":202050302,"uuid":"79817762","full_name":"fscm/packer-aws-zookeeper","owner":"fscm","description":"Packer Template to build a AWS Apache Zookeeper AMI","archived":false,"fork":false,"pushed_at":"2022-01-03T16:05:55.000Z","size":21,"stargazers_count":13,"open_issues_count":0,"forks_count":12,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T16:11:18.611Z","etag":null,"topics":["ami","aws","packer","zookeeper"],"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-23T15:34:44.000Z","updated_at":"2022-01-03T16:05:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"99ff3425-69b7-4ef7-8120-c0a23afc81fa","html_url":"https://github.com/fscm/packer-aws-zookeeper","commit_stats":null,"previous_names":["fscm/packer-aws-zookeeper"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-zookeeper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-zookeeper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-zookeeper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-zookeeper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fscm","download_url":"https://codeload.github.com/fscm/packer-aws-zookeeper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248636650,"owners_count":21137501,"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","zookeeper"],"created_at":"2024-11-07T16:20:43.677Z","updated_at":"2025-04-12T21:33:25.417Z","avatar_url":"https://github.com/fscm.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apache Zookeeper AMI\n\nAMI that should be used to create virtual machines with Apache Zookeeper\ninstalled.\n\n## Synopsis\n\nThis script will create an AMI with Apache Zookeeper installed and with all of\nthe required initialization scripts.\n\nThe AMI resulting from this script should be the one used to instantiate a\nZookeeper 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 'zookeeper_version=\u003cZOOKEEPER_VERSION\u003e' \\\n    [-var 'option=value'] \\\n    zookeeper.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: \"zookeeper\").\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- `system_locale` - Locale for the system (default value: \"en_US\").\n- `zookeeper_version` - *[required]* Zookeeper version.\n\n### Instantiate a Cluster\n\nIn order to end up with a functional Zookeeper Cluster some configurations have\nto 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 **zookeeper_config**.\n\n#### 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](#configuration-script) section for more details\n\n## Services\n\nThis AMI will have the SSH service running as well as the Zookeeper services.\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| JMX          | 7199      |    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-zookeeper/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-zookeeper/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-zookeeper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffscm%2Fpacker-aws-zookeeper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffscm%2Fpacker-aws-zookeeper/lists"}