AcloudA

How to Upload File Buckets on Google Cloud Storage

Posted by Karim Buzdar on March 13, 2020

Google Cloud Storage is a RESTful file storage and web hosting service that uses the Google Cloud Platform(GCP) infrastructure. With GCP, you can build, deploy, and scale your applications, webpages, and services on exactly the same infrastructure as Google itself.

What are Buckets?

The term Bucket refers to a container that holds your data in a Google Cloud project. Any object, such as a file and any piece of object metadata, in your cloud storage should be stored in a bucket. The purpose of using these buckets is that all relevant data is organized so that helps in controlled access to the information. Your bucket needs to have a globally unique name. Although you can add/remove bucket contents, change its default storage class, but you can not change the name of the bucket and its location. For this to happen, you will have to delete and recreate a bucket.

In this article, we will explain how you can:

  • Create a Google Cloud Platform(GCP) Account
  • Create a New Project from scratch
  • Create a Sample Bucket for your Project
  • Add an Object/File in the Bucket
  • Clean Up the Sample Bucket

Creating a Google Cloud Platform(GCP) Account

Open your browser and access the official Google Cloud Console at https://console.cloud.google.com If you do not already have an account on the Google Cloud Platform, you will need to create one by following these steps:

1. Sign Up for a New Account by clicking the Sign Up link on the GCP page. We are setting up a Free Trial account for this tutorial.

2. On the Following Sign Up page, Enter your country name, check the Terms of Service checkbox, and then click the CONTINUE button.

Google Cloud Console

Please note that you will not be charged automatically when the free trial ends. You will have to manually upgrade to a paid account and then you will be charged accordingly.

3. In the next step of the account setup, please enter your Account type. We are setting up an Individual account for this tutorial.

Enter your Account type

You also need to provide your name, address, and credit card details on this page.

Provide your name, address, and credit card details

The credit card details are only to make sure by Google that you are not a robot. Click on the START MY FREE TRIAL button to complete the account setup. You will then be directed to the following page on a successful GCP account setup completion:

START MY FREE TRIAL button

You are now ready to use the unified object storage on Google Cloud for your live and archived data.

Creating a New Project from Scratch

The Google Cloud Platform organizes your resources into projects. With projects, you can have all your application-related resources in one place. Now that you are on the GCP Home page, click on the My First Project link from the top bar. This will open the following Select a project view:

Google Cloud Platform

Here, you will see some automatically created projects. We will, however, create one of our own so that we have the freedom to make our customized settings to that. Click on the NEW PROJECT button on this view. On the following New Project page, provide a Project name which will, in turn, create a Project ID for you.

NEW PROJECT button

In location, you can link a parent organization or folder to your project. Since we have no such organization, we will leave this option as it is.

Click on the CREATE button and your first Google Cloud project will be created.

Creating a Sample Bucket for your Project

To create a Bucket for your new project, click on the Navigation menu from the top-left corner of the GCP console. Then click on the Storage option from the menu as follows:

Creating a Sample Bucket for your Project

Select your newly created project from the My First Project drop-down to view its storage resources. Select your newly created project

From the following view, click on the CREATE BUCKET link. This will open the Create a Bucket view. To keep things simplified, we will keep default values for all the other bucket properties except the bucket name.

CREATE BUCKET link

Please choose a unique name for your bucket. The information in the Naming guidelines link will help you in picking a bucket name that fulfill the mandatory bucket name requirements. Other information that you need to know at this stage includes:

The Location type corresponds to the geographic placement of your data. This affects the performance, availability, and cost of your project.

A default storage class is assigned to your project bucket’s files/objects. Please read the information on the page carefully as your choice of storage cost may affect the cost of your project.

Click on the CREATE button after providing the bucket name and a new bucket will be created in your project.

Adding an Object/File in the Bucket

On the Bucket details page, you can add files/objects to a bucket in two ways:

Bucket details page

Click on the Upload files button to browse for the files to add. You can also upload an entire folder by using the Upload Folder button and even create one for uploading files.

Or,

Drag and drop the files from your file browser to the Drop files here location on this page.

As you do one of these, the file(s) will be added to your bucket.

Cleaning Up the Sample Bucket

Since we just created a sample bucket for tutorial, which is otherwise useless, and do not want it to add it to any unexpected charges, we will clean it up now. This means that we need to delete the objects and the bucket from our project.

Go to the Storage Browser page of your project, select the bucket you want to delete by checking the box against it, and then click the DELETE button located at the top. This will delete the bucket along with all its contents. You can also click the Delete bucket options by selecting ‘Delete bucket’ from the options button drop-down menu, as shown below.

Storage Browser page

This was all the basic information you needed to get started with the GCP projects. This will serve as a basis when you proceed with more useful applications such as using the gsutil command line tool, hosting a static website and using other GCP services.

Related materials:

Views All Time
4
Views Today
4
Return to all posts

How Microsoft Azure Is Responding To COVID-19
Red Hat to Acquire CoreOS for $250 million