{"id":18746067,"url":"https://github.com/fscm/packer-aws-cassandra","last_synced_at":"2026-02-16T23:08:49.757Z","repository":{"id":202050289,"uuid":"79719164","full_name":"fscm/packer-aws-cassandra","owner":"fscm","description":"Packer Template to build a AWS Apache Cassandra AMI","archived":false,"fork":false,"pushed_at":"2022-01-03T16:05:43.000Z","size":40,"stargazers_count":10,"open_issues_count":0,"forks_count":7,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-26T16:11:17.640Z","etag":null,"topics":["ami","aws","cassandra","packer"],"latest_commit_sha":null,"homepage":"","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-22T13:24:08.000Z","updated_at":"2024-08-12T19:27:18.000Z","dependencies_parsed_at":null,"dependency_job_id":"1fc07a86-ba8c-40d0-a026-c55f4a4354ae","html_url":"https://github.com/fscm/packer-aws-cassandra","commit_stats":null,"previous_names":["fscm/packer-aws-cassandra"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-cassandra","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-cassandra/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-cassandra/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fscm%2Fpacker-aws-cassandra/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fscm","download_url":"https://codeload.github.com/fscm/packer-aws-cassandra/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","cassandra","packer"],"created_at":"2024-11-07T16:20:44.280Z","updated_at":"2026-02-16T23:08:44.737Z","avatar_url":"https://github.com/fscm.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Apache Cassandra AMI\n\nAMI that should be used to create virtual machines with Apache Cassandra\ninstalled.\n\n## Synopsis\n\nThis script will create an AMI with Apache Cassandra installed and with all of\nthe required initialization scripts.\n\nThe AMI resulting from this script should be the one used to instantiate a\nCassandra 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 'cassandra_version=\u003cCASSANDRA_VERSION\u003e' \\\n    [-var 'option=value'] \\\n    cassandra.json\n```\n#### Script Options\n\n- `aws_access_key` - *[required]* The AWS access key.\n- `aws_ami_name` - The AMI name (default value: \"cassandra\").\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- `cassandra_version` - *[required]* Cassandra version.\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\n### Instantiate a Cluster\n\nIn order to end up with a functional Cassandra 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 **cassandra_config**.\n\n#### Configuration Script\n\nThe script can and should be used to set some of the Cassandra options as well\nas setting the Cassandra service to start at boot.\n\n```\nUsage: cassandra_config [options]\n```\n\n##### Options\n\n* `-a` - Sets the auto_bootstrap option to 'on'.\n* `-c \u003cNAME\u003e` - Sets the cluster_name option to the value given (default value is 'Cassandra Cluster').\n* `-D` - Disables the Cassandra service from start at boot time.\n* `-E` - Enables the Cassandra service to start at boot time.\n* `-i \u003cADDRESS\u003e` - Sets the cassandra listen address (default value is '127.0.0.1').\n* `-m \u003cMEMORY\u003e` - Sets Cassandra maximum heap size. Values should be provided following the same Java heap nomenclature.\n* `-n \u003cMEMORY\u003e` - Sets Cassandra heap new size. Values should be provided following the same Java heap nomenclature.\n* `-r` - Sets the endpoint_snitch option to 'EC2MultiRegionSnitch' (default value is 'SimpleSnitch').\n* `-s \u003cADDRESS\u003e` - Sets the address of one seed node (or several seed nodes if the addressess are separated with a comma).\n* `-S` - Starts the Cassandra service after performing the required configurations (if any given).\n* `-t \u003cNUMBER\u003e` - Sets the number of tokens (default value is '4').\n* `-W \u003cSECONDS\u003e` - Waits the specified amount of seconds before starting the Cassandra service (default value is '0').\n\n#### Configuring a Cassandra Node\n\nTo prepare an instance to act as a Cassandra cluster node the following steps\nneed to be performed.\n\nRun the configuration tool (*cassandra_config*) to configure the instance.\n\n```\ncassandra_config -E -S\n```\n\nAfter this steps a Cassandra node (for a single node cluster) should be running\nand configured to start on server boot.\n\nFor a cluster with more than one Cassandra node other options have to be\nconfigured on each instance using the same configuration tool\n(*cassandra_config*).\n\n```\ncassandra_config -c 'My Cluster' -E -i 10.0.0.1 -s 10.0.0.1 -s 10.0.0.2,10.0.0.3 -S\n```\n\nAfter this steps, the first node of the Cassandra 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 Cassandra services.\nThe following ports will have to be configured on Security Groups.\n\n| Service                            | Port   | Protocol |\n|------------------------------------|:------:|:--------:|\n| SSH                                | 22     |    TCP   |\n| Cassandra Inter-Node Cluster       | 7000   |    TCP   |\n| Cassandra SSL inter-node cluster   | 7001   |    TCP   |\n| JMX Monitoring                     | 7199   |    TCP   |\n| Cassandra CQL Native Transport     | 9042   |    TCP   |\n| Cassandra SSL CQL Native Transport | 9142   |    TCP   |\n| Cassandra Thrift                   | 9160   |    TCP   |\n\nMore details can be found\n[here](http://docs.datastax.com/en/cassandra/3.x/cassandra/configuration/secureFireWall.html?hl=firewall).\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-cassandra/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-cassandra/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-cassandra","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffscm%2Fpacker-aws-cassandra","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffscm%2Fpacker-aws-cassandra/lists"}