Last active
August 29, 2015 14:13
-
-
Save jkawamoto/8c8ea77840a564bbd2f5 to your computer and use it in GitHub Desktop.
Startup script loading a script on GCS
This file contains 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 | |
URL=$(curl http://metadata/computeMetadata/v1/instance/attributes/startup -H "Metadata-Flavor: Google") | |
docker pull google/cloud-sdk | |
cd /tmp | |
docker run -t --rm google/cloud-sdk /google-cloud-sdk/bin/gsutil cat $URL | tr -d "\r" > startup.sh | |
chmod a+x startup.sh | |
./startup.sh |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment