Skip to content

Instantly share code, notes, and snippets.

@whelmed
Created July 14, 2019 20:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save whelmed/9b688aa4bf7d1d7d55900753f023d0ae to your computer and use it in GitHub Desktop.
Save whelmed/9b688aa4bf7d1d7d55900753f023d0ae to your computer and use it in GitHub Desktop.
Cross-region GCP Web App Test
#!/bin/bash
set -e
sudo apt-get update
sudo apt-get install apache2 -y
sudo a2ensite default-ssl
sudo a2enmod ssl
sudo service apache2 restart
# Grab some details about the instance and zone to display.
ZONE_ID=$(curl -H "Metadata-Flavor: Google" http://metadata.google.internal/computeMetadata/v1/instance/zone)
echo "<!doctype html><html><body><h1>This server is running in zone: $ZONE_ID</h1></body></html>" | sudo tee /var/www/html/index.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment