Giter VIP home page Giter VIP logo

terraform-aws-cassandra's Introduction

terraform-aws-cassandra

Build Status Latest Release pre-commit checkov Infrastructure Tests Infrastructure Tests Infrastructure Tests

A project to set up infrastructure in AWS for an Apache Cassandra cluster. This module will create Cassandra on EC2 and auto-cluster all of its nodes.


alt text It's 100% Open Source and licensed under the APACHE2.

Usage

The folder example/examplea contains a complete sample illustration of how to use this module.

├───examplea
│       data.tf
│       examplea.auto.tfvars
│       Makefile
│       module.cassandra.tf
│       outputs.tf
│       provider.aws.tf
│       variables.tf

As a minimum you must include a module reference in your own template Terraform code e.g. module.cassandra.tf:

module "cassandra" {
  source            = "JamesWoolfenden/cassandra/aws"
  version           = "0.3.1"
  instance_type     = var.instance_type
  subnet_ids        = data.aws_subnet_ids.subs.ids
  #add the private ips
  private_ips       = []
  allowed_ranges    = [module.myip.cidr]
  ssh-inbound-range = [module.myip.cidr]
  ami               = local.ami
  vpc_id            = tolist(data.aws_vpcs.main.ids)[0]
}

You will also need to define variables variables.tf and supply values examplea.auto.tfvars. You'll need to adjust the values to your own. You will also need build a Cassandra AMI, see the Packer folder for that template. If you want to test the modules usage execute Terraform in the examplea folder:

cd example/examplea
✔ /mnt/c/code/jimw/aws/terraform-aws-cassandra/example/examplea [master|✚ 1⚑ 1]
09:56 $ make init
rm -rf .terraform/
terraform init -reconfigure
Initializing modules...
- cassandra in ../..
Downloading jameswoolfenden/ip/http 0.2.7 for myip...
- myip in .terraform/modules/myip/terraform-http-ip-0.2.7

Initializing the backend...

Initializing provider plugins...
- Checking for available provider plugins...
- Downloading plugin for provider "aws" (hashicorp/aws) 2.54.0...

Terraform has been successfully initialized!

You may now begin working with Terraform. Try running "terraform plan" to see
any changes that are required for your infrastructure. All Terraform commands
should now work.

If you ever set or change modules or backend configuration for Terraform,
rerun this command to reinitialize your working directory. If you forget, other
commands will detect it and remind you to do so if necessary.

terraform apply
....

Requirements

No requirements.

Providers

Name Version
aws n/a

Modules

No modules.

Resources

Name Type
aws_instance.cassandra resource
aws_security_group.cassandra resource
aws_ami.ami data source

Inputs

Name Description Type Default Required
allowed_ranges Allowed ranges that can access the cluster list(any)
[
"0.0.0.0/0"
]
no
ami Contains information to select desired AWS AMI any n/a yes
config-file n/a string "/etc/dse/cassandra/cassandra.yaml" no
instance_type aws instance type and class string n/a yes
private_ips List of ips for the cassandra nodes list(any) n/a yes
ssh-inbound-range CIDRs of address that are allowed to ssh in. list(any) n/a yes
subnet_ids List of subnet Ids list(any) n/a yes
template-file n/a string "cassandra.tmpl" no
vpc_id The id for the vpc string n/a yes

Outputs

Name Description
instances n/a
security_group n/a

Related Projects

Check out these related projects.

Help

Got a question?

File a GitHub issue.

Contributing

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or file feature requests.

Copyrights

Copyright © 2019-2021 James Woolfenden

License

License

See LICENSE for full details.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contributors

James Woolfenden
James Woolfenden

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.