My notes while investigating Google Cloud Storage with the intention of deploying a static website on it as I’ve done with AWS S3.
- GCS supports S3 interface but pushes their XML API
- Upgraded account
- Updated billing credit card
- disabled billing on the two projects I created in my trial period in 2015
- I inadvertently ran through the $300 in credits in a month which scared me away from cloud computing for a year or two
- The two projects seemed to have no resources, but nuked them from orbit to be sure
- Enabled billing alert so costs don’t run away from me again
- Created a new project
- Starting with this guide
- Google Storage uses the same ownership proof that Webmaster Tools and Analytics do
- I have different Google accounts using webmaster tools than I’m using for Google Cloud
- No problem; I can change them over; I’ll lose Analytics history, but I wasn’t using it, anyway
- The guide says the GCS web servers don’t support HTTPS/SSL
- But this StackOverflow answer say can use their load balancer and/or CDN
- The guide says to verify the root domain, not e.g. www . Oops.
- Oh cool. More than one account can “own” a website in Webmaster Tools
- Cool, can use
gsutilfrom cloud shell which is web-launchable from the console
gsutil mb gs://www.funnydomainname.com
- The cloud shell has no access to my local machine; aws cli should be able to upload files with
aws s3 --endpoint https://storage.googleapis.com, but I don’t immediately see how to set my credentials, so I’ll come back to this later and use the web UI for now.
gsutil ls gs://www.funnydomainname.comsees the files I uploaded through the web UI
gsutil acl ch -u AllUsers:R gs://www.funnydomainname.com/index.html
curl -H 'host: www.funnydomainname.com' http://c.storage.googleapis.com/index.html(works from my PC and cloud console) - since I haven’t CNAMEd the DNS yet, this command will fetch items from my bucket as if the CNAME were in place. It worked!
- Used the UI select-all, then “Share Publicly” to share the rest instead of running the gsutil command repeatedly
- Glossed over the instructions on creating a deault ACL, but clearly I need to come back to that for future updates
At this point I accomplished the original goal of this post. But I also want to enable https/tls/ssl, so continued in the next post.