devopsacademyau / 2020-feb-project1-group2

Creative Commons Attribution Share Alike 4.0 International
0 stars 2 forks source link

3Musketeers V 1.0 #55

Closed starkmatt closed 4 years ago

starkmatt commented 4 years ago

3Musketeers

I decided to re-release the code I was working on regarding local automation. The approach I've taken now, is to automate the whole terraform process / WP Creation within containers. (As shown in Class 5)

Meaning, that you will not need terraform installed at all to build the infrastructure within AWS. You'll just need the Makefiles.

Please review / test using the following commands

(Ensure that you're in the same dir as the Makefile file)

Firstly, you must initialize the AWS Component, that is to pass your credentials to terraform. To do this type.

make _awsinit

You'll then be asked for your Secret key via the AWSCLI Container

AWS Access Key ID [None]: AWS Secret Access Key [None]: Default region name [None]: Default output format [None]

After completing these, It will store the credentials within the terraform folder in a folder titled "Creds"

Then run

make init

To start the terraform init

make plan To start terraform plan

make apply

To apply

make destroy

To destroy.

Please test this out and let me know how you go.

I'm also going to be adding the WP Container build and push to ECR. Will be coming tomorrow

EDIT:

I've added the Docker build and deploy into the ECR, as a shell script. Please review and take a look!