gcloud compute instance-templates create lb-backend-template \ —region=default \ —network=default \ —subnet=default \ —tags=allow-health-check \ —image-family=debian-9 \ —image-project=debian-cloud \ —metadata=startup-script=’#! /bin/bash cat << EOF > startup.sh #! /bin/bash apt-get update apt-get install -y nginx service nginx start sed -i — ‘s/nginx/Google Cloud Platform - ’“$HOSTNAME”’/’ /var/www/html/index.nginx-debian.html EOF’
https://www.youtube.com/watch?v=xAAn7Cgu-OE
https://www.youtube.com/watch?v=_ckChw6NuoI