Created
July 14, 2019 20:49
-
-
Save whelmed/9b688aa4bf7d1d7d55900753f023d0ae to your computer and use it in GitHub Desktop.
Cross-region GCP Web App Test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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