This repository contains terraform infrastructure as code for building the infrastructure components (AWS resources) for the GitHub Cloud Proxy application.
Make sure all following prerequisites are followed
install aws-cli
These Terraform configurations support attaching a key_pair to the ec2 instances to enable ssh onto those servers provisioned as a way for troubleshooting where necessary although generally not required.
To make things simple, to run these Terraform configurations would require a key pair to be created beforehand.
cd infrastructure-global/state
terraform init
terraform plan
terraform apply
cd infrastructure-platform/src/environments/{environment}
terraform init ../../
terraform plan ../../ -var-file=placeholder.tfvars
terraform apply ./../ -var-file=placeholder.tfvars
where {environment} is any of "dev", "staging", "prod"
The terraform code does the following...
- Setup IAM Roles
- Create S3 Bucket for storing InfluxDB Backups
- Create EBS Volumes for InfluxDB backing storage
- Setting up the network VPC
- Provision the InfluxDB instance
- Provision the Java Proxy instance
- Creating SNS Topic for notifications
- Creating Cloudwatch Metric Alarms for Monitoring
- Create Lamdba function to reboot the ec2 instances
Colin But