Open philanderson888 opened 2 months ago
latest commits on the matter
1) upgrades to docker 2) upgrades to terraform - removing errors 3) ansible removing ssh requirements for trivial commands eg ping another machine
commit here
https://github.com/philanderson888/scripts/commit/eea17738ac62c214d2188c18e4877e94822d1e6b
Master Script is here (running in Azure)
https://github.com/philanderson888/scripts/blob/master/aws/awsWindows/scriptMasterWindows.sh
install docker
https://github.com/philanderson888/scripts/blob/master/aws/awsWindows/scriptMasterWindows.sh#L743
running docker - seems OK
install terraform
https://github.com/philanderson888/scripts/blob/master/aws/awsWindows/scriptMasterWindows.sh#L762
terraform script is here
https://github.com/philanderson888/scripts/blob/master/aws/awsWindows/script-52-terraform.zsh
terraform yaml 1
https://github.com/philanderson888/scripts/blob/master/aws/awsWindows/script-52-terraform.tf
just running some trivial commands
resource "null_resource" "default" {
provisioner "local-exec" {
command = "echo 'Hello World' && pwd && whoami && ping -c 4 127.0.0.1"
}
}
getting OK output though
terraform initialise
terraform apply
terraform yaml 2
installs a docker container running nginx then runs it
https://github.com/philanderson888/scripts/blob/master/aws/awsWindows/script-52-terraform-main.tf
verify the container is working by doing a curl command against localhost:8000 and getting the nginx default web page as a response, so we know this is working
output
create docker container
nginx output
spent 5 to 6 hours on this work this week, super happy the way it's going :)
over to you for comments
thanks
Just getting to grip with terraform
from what I can see it enables us to set infrastructure as code so we can define an environment according to a given plan and let terraform ensure the infrastructure meets the plan requirements ...