brygom / terraform-aws Goto Github PK
View Code? Open in Web Editor NEWThis project forked from nitish2611/terraform-aws
Multi-tier architecture postgreSQL deployment on AWS using ansible, packer and terraform.
This project forked from nitish2611/terraform-aws
Multi-tier architecture postgreSQL deployment on AWS using ansible, packer and terraform.
# Terraform-AWS Multi-tier architecture postgreSQL deployment on AWS using ansible, packer and terraform. Base OS AMI : Ubuntu Server 16.04 LTS (HVM), SSD Volume Type - ami-835b4efa File information: 1: ansible.yml: Ansible script to • install postgresql-9.5 • Change listening port to 9988 • Create database • Create 3 users 2: template.json: Packer template to • Install python2.7 • Install ansible2.0 • Build an AWS AMI and run the ansible playbook to install and configure postgresql server • Repack the configuration onto new AWS AMI 3: main.tf : Terraform configuration file to • Manage credentials required for building AWS resources • Module to build VPC • Module to build Bastion host for public access • Security groups to configure for bastion host • Security groups to configure for private instances • Resource to build postgresql private instances 4: access.tfvars: Terraform configuration file to contain AWS_ACCESS_KEY and AWS_SECRET_KEY Required installations: 1. Packer • Wget https://releases.hashicorp.com/packer/1.0.3/packer_1.0.3_freebsd_amd64.zip • Unzip and mv /usr/local • Set linux environment path • Packer validate template.json # To validate the template o https://jsonlint.com/ to validate the json format. • Packer build template.json (Executes ansible and builds an AMI stored in AWS account-AMI’s owned by me) 2. Terraform • Wget https://releases.hashicorp.com/terraform/0.9.11/terraform_0.9.11_linux_amd64.zip • Mv /opt/terraform and unzip • Set linux environment path • Terraform import aws_key_pair.<key_name> <key_name> # for existing key pair to avoid key conflict • Terraform get # To get all the module dependencies • Terraform plan # to view the infrastructure to be built • Terraform apply # to apply the template and build the infrastructure • Terraform destroy # to tear down the infrastructure. 3. SSH forwarding to access private instances. • Ssh-add –K yourpemfile.pem • Ssh –A Ubuntu@Bastion IP • Ssh Ubuntu@instance_private IP
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.