Skip to content

Commit

Permalink
addition of part 1 demo
Browse files Browse the repository at this point in the history
  • Loading branch information
jordzn committed Apr 17, 2016
1 parent b3eba2b commit e1f0d24
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ Terraform provisioning will contain examples of:

Terraform code for the above code is to be released incrementally in parts, accompanied by a blog. The releases will be split as follows:

- Release 1: Directory Structure and Basic Compute in AWS
- Release 1: Directory Structure and Basic Compute in AWS (Demo found in './aws/README.md')
- Release 2: Basic Compute in Microsoft Azure, Google Cloud & Rackspace
- Release 3: Networking Infrastructure in AWS, Microsoft Azure, Google Cloud & Rackspace
- Release 4: Terraform Provisioning with Puppet, Chef & Ansible
Expand Down
25 changes: 25 additions & 0 deletions aws/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,28 @@
* [`terraform plan`](https://www.terraform.io/docs/commands/plan.html)
* [`terraform apply`](https://www.terraform.io/docs/commands/apply.html)
* [`terraform destroy`](https://www.terraform.io/docs/commands/destroy.html)

## AWS Basic Compute Demo

This basic compute demo will consist of the orchestration of blank t2.micro (free tier) EC2 instances into AWS.

### Pre-requisites

- It is assumed that this demo is being ran from a UNIX based machine
- An AWS account [-Sign up here-](https://aws.amazon.com/premiumsupport/signup/)
- AWS SSH key-pair created and private key stored locally (this is used as the SSH key placed onto each new instance by Terraform, this key is then used for SSH access after creation is complete)
- This repository cloned locally (install Git [here](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git))
- Terraform installed (install it [here](https://www.terraform.io/downloads.html))

### Instructions

1. cd into {location_of_this_repo}/aws/environments/{environment_you_wish_to_build}/compute
2. open 'terraform.tfvars' and enter a value for variable 'owner' and 'ssh_key_name' (the name of the key associated with your AWS account), and save
3. run command 'export AWS_ACCESS_KEY_ID={your_access_key}'
4. run command 'export AWS_SECRET_ACCESS_KEY={your_secret_key}'
5. run command 'export AWS_DEFAULT_REGION={your_preferred_region}'
6. run command 'terraform get'
7. run command 'terraform plan -var-file=./terraform.tfvars'
8. run command 'terraform apply -state=./terraform.tfstate -var-file=./terraform.tfvars'

To destroy the infrastructure you have built, run command 'terraform destroy -state=./terraform.tfstate -var-file=./terraform.tfvars'

0 comments on commit e1f0d24

Please sign in to comment.