Basics and Terminology for Google Cloud Storage
*Check out the updated version of this post, here*
There’s plenty of reading material about Google Cloud Storage, and this is no exception. While you’ll still have to exercise your literacy, or your power of persuasion to have someone read for you, I’ll consolidate plenty of the information for you and point you in the right direction for learning more.
If you build applications, you probably find yourself constantly needing to serve data to users. Write a website, serve images. Write an Android app, serve configuration files. You really just need a place to store files and data in the cloud, and then allow yourself, and your users to fetch as needed.
This is exactly what Google Cloud Storage is for. It’s a cloud-based service that lets you store data, and serve it worldwide.
Now, while that makes sense at a high level, using cloud storage requires a bit more understanding. Over the next few blog posts, I’m going to dig into the nuts and bolts of the product, but for now, let’s start off with the basics: Terminology.
A Few Key Terms to Get things Going
No technology would be proper without its own nuanced set of terminology that makes understanding and using it easier. GCS is no different; So before we drill into some getting started data, let’s talk about a few small words with big meanings.
Any piece of data you store in Google Cloud Storage is called an OBJECT, and objects are organized into BUCKETS. All data in Cloud storage belongs inside a Google Cloud PROJECT, which consists of users, API’s, and billing, among other things. All three of these are also known as RESOURCES, which refers to any entity within Google Cloud Platform.
Both objects and Buckets are flexible, and extremely powerful. They both come with a federation of APIs and functionality depending on your use case, letting you create delete, rename, and set properties on all of them. Check out this handy article on Key Terms for more.
Starting off in Google Cloud Storage
With all that out of the way, let’s take a look at getting started with GCS:
The majority of your first few steps will take place in the Google Cloud Platform console. This is where you’ll create or select your project, set up your buckets and upload objects. There’s a handy quickstart for using the Console that can help you get up to speed on this process. And I’ll walk through it here, too.
In your cloud console, select or create a project, and choose CLOUD STORAGE from the menu menu on the left.
Doing so will bring up the cloud storage page, where you’ll be prompted to create a Bucket, which you’ll need to do in order to upload and serve your first asset.
This pops up a set of options that allow you to extend and shape how your bucket works — but if you’re a first time user, I’d suggest following the quickstart as I did, filling in the unique bucket name, setting it to regional, and the default location, and moving along to get the hang of uploading and serving your objects
When you click “continue” after naming your bucket, you’ll be presented with the additional options.
Once you’ve created your bucket, you’ll see an interface where you can add folders or files (Objects) to your bucket. You can drag and drop, or click a button to add to your bucket.
After you’ve uploaded an item, you can use the three dot menu to the side of the asset to do more with it — assign permissions, move, delete, and so on.
If you’d like to share publicly, this is where you’ll want to be. Select “Edit Permissions” from this dropdown menu, and then “add item” in the overlay that appears. Choose “User” for the Entity, and add “allusers” for the name. Then choose “Reader” as the access type, and click save.
You’ll know it worked when a link appears next to your asset in the bucket — It will be noted as publicly accessible, and you’ll be able to access the shareable url by clicking on the link button.
To stop sharing publicly, simply go back to those 3 dots, “sharing permissions” and press the X by the “allusers” permission we just created.
Creating folders, subfolders, and deleting your buckets, objects, and folders works in a similarly intuitive way, and is covered in the quickstart as well.
Lots of Options, But that’s for Next Time
Now, it’s important to note that we’ve only shown one way of getting started, and understanding the basics of cloud storage. There’s a TON of functionality here, and over the next few blog posts, I’ll be going into more detail on things which can help you understand how to use Google Cloud Storage to get the most for your application.
That’s enough reading for now — Next week I’ll be back with a deeper dive into choosing from those bucket options, but be sure to watch our first episode of Google Cloud Storage Bytes if you haven’t already!