0

I'm following this tutorial to get started with the Google Cloud Datastore: https://cloud.google.com/datastore/docs/getstarted/start_java/.

At this point I have my Cloud account all set up with the APIs needed to use Datastore and Endpoints for a project I am working on.

I was following the setup instructions and so far I have made an instance that I can ssh on to using the command

gcloud compute ssh my-instance

In the tutorial there is this line:

"When the instance is ready, log into the instance (for example, using gcloud compute ssh) and install Java and optionally Maven:"

So I followed the instructions to sudo apt-get Java and Maven but I already have Java and Maven installed on my computer that I am physically using, so when using this Compute instance (which I believe is a virtual machine?) where is the data stored?

1 Answer 1

1

It may not be obvious from the layout, but in the tutorial you linked to you can complete either step 1 or 2 to setup an environment.

Step 1 says:

In this step we'll show you how to create a Google Compute Engine (GCE) instance where you can run this example. If you already have an environment where you can run the code, go to Step 2.

Step 2 says:

Note: If you are running this code on Google Compute Engine, you do not have to create new service account credentials because the default service account for your project is used when you create an instance with the datastore and userinfo-email scopes. Go to Step 3.

If you already have everything you need to develop locally (java and maven), you can skip step 1 and just get a service account private key.


No matter which path you decide to take, the data will be saved in Google Datastore. The only question is weather you run your code from a Compute Engine instance (VM) or your local machine.


DO NOT FORGET TO DELETE YOUR INSTANCE WHEN YOU ARE DONE WITH IT

gcloud compute instances delete $INSTANCE_NAME

Not the answer you're looking for? Browse other questions tagged or ask your own question.