You have a developer laptop with the Cloud SDK installed on Ubuntu.
The Cloud SDK was installed from the Google Cloud Ubuntu package repository.
You want to test your application locally on your laptop with Cloud Datastore.
What should you do?
Click on the arrows to vote for the correct answer
A. B. C. D.D.
To test your application locally on your laptop with Cloud Datastore, you need to use the Cloud Datastore emulator. The Cloud Datastore emulator is a local version of the Google Cloud Datastore service that can be used for testing and development purposes.
Option A, Exporting Cloud Datastore data using gcloud datastore export
command is not useful in this scenario as it exports data from an existing Cloud Datastore instance, it doesn't provide a local development environment.
Option B, Creating a Cloud Datastore index using gcloud datastore indexes create
command, is not necessary to use the emulator as indexes can be automatically created.
Option C, Installing the google-cloud-sdk-datastore-emulator
component using the apt-get install
command is not correct as this package is not available in Ubuntu repositories and is not needed to use the emulator.
Therefore, the correct option is D, Installing the Cloud Datastore emulator component using the gcloud components install
command. This command installs the Cloud Datastore emulator component, which provides a local development environment for Cloud Datastore. Once installed, you can start the emulator using the command gcloud beta emulators datastore start
and your application can be configured to use the emulator instead of the actual Cloud Datastore instance.