Skip to content

Instantly share code, notes, and snippets.

@whelmed

whelmed/bootstrap.sh

Created Jul 14, 2019
Embed
What would you like to do?
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