This is less of a question than it is just a teaser problem.
Before I started watching this lesson I Looked over the provided bash script.
I was like cool but I wanted to try something a little bit different.
It other course acloudguru makes one of the easy ways and quite real world examples is setting up an apache server to serve some basic HTML.
I spent a lot of time splashing commands of gcloud cli to get what i wanted out of my instance creation and setting up the gcloud config
I settled with gcloud compute instances create –machine-type=f1-micro testvm
I waited for it to spin up and gcloud compute ssh testvm into the machine.
Now to run the basics
sudo apt-get update
sudo apt-get update
sudo apt-get install httpd
well woops turns out there is a lot of different versions debian has to offer
I went with nginx-full
installed and cd’d myway over to the var/www/html directory and catted out that file
Ok cool now to test my connection
I exited that vm and did a gcloud compute instances list to get the public IP
and expected I got nothing
I went over to the console to check the allow http and https tags to see they were unchecked
after some googling….its not 100% clear from the docs I found https://stackoverflow.com/questions/35590641/what-is-the-gcloud-command-to-allow-http-traffic-on-a-vm-instance-its-not-cre
back over to the cloud terminal
I applied gcloud compute instances add-tags testvm –tags http-server, https-server
refeshed my browser of the public IP
and done my nginx server is working as expected.
I am sure this gets covered off in a future lecture but I was curious and wanted to figure it out NOW.