Table of Contents
- Accessing the Cloud Shell
- Copying the Google Cloud image to your Compute Instance
- Checking the status of the image
- Creating the Google Cloud Instance
- Select a zone
- Editing the Cloud Instance
- Allow HTTP traffic
- Running the Cloud Instance
Your first step would be to log in to Google Cloud Platform with your Google account (create one if you don’t already have one). Sign up for a free trial (credit card required for verification only).
Note: Make sure that you have the Compute Engine API enabled! You would have
to enable the Compute Engine by selecting the tour or you may be able to do it by
clicking on your
Dashboard and selecting
Customize and clicking the slider
Compute Engine. (It may take a couple minutes to be enabled)
Once logged in, you will want to click on the
Activate Google Cloud Shell
icon on the top right of the page (which looks the icon)
Enter the following command to create an image from the Google Cloud bucket (it may take a few minutes):
biostats2 is the name of the image to be created.
gcloud compute images create biostats2 --source-uri gs://cunysph-biostat/bios2-image.tar.gz
The image file is about
1 GB large and can take quite some time to transfer
an create the image on your Cloud Platform.
Once created, you can check to see if the image is ready for use with the command:
gcloud compute images describe biostats2
You can open the side menu on the Google Cloud Platform website and select
You should see
status: READY in the output
Now you’re ready to create a computing instance with the image:
gcloud compute instancees create bios2-instance --image biostats2
You can create the instance by selecting the
biostats2 image from the list of images and selecting
Select a zone in
us-east1 by entering the numeric choice (from 11 to 13)
You will be able to customize the image settings after clicking on
In the web browser, select
VM instances under the
Compute Engine and find
bios2-instance and then
EDIT the instance at the top menu.
Select the square button under Firewall for
Allow HTTP traffic and click
SAVE at the bottom.
This option is also available if you are using the
Google Cloud Platform website after selecting
Create to run your instance.
Now that your instance is running, click on the IP address for your instance under the External IP section.
You can now log in to the RStudio interface using the credentials
for both username and password.