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?
A.
Export Cloud Datastore data using gcloud datastore export.
B.
Create a Cloud Datastore index using gcloud datastore indexes create.
C.
Install the google-cloud-sdk-datastore-emulator component using the apt get install command.
D.
Install the cloud-datastore-emulator component using the gcloud components install command.
I believe answer is C
https://cloud.google.com/sdk/docs/downloads-apt-get
The question is not about the datastore command itself but from where we should run the update command on the Ubuntu to install the component.
I agree with this comment. The answer is C.
If you installed the SDK from the Ubuntu repo and try to do the following:
$ gcloud components install cloud-datastore-emulator
You will receive this message:
ERROR: (gcloud.components.install)
You cannot perform this action because the Cloud SDK component manager
is disabled for this installation. You can run the following command
to achieve the same result for this installation:
sudo apt-get install google-cloud-sdk-datastore-emulator
Yes, but it says that "The Cloud SDK was installed from the Google Cloud Ubuntu package repository", then to install datastore emulator you should use the command in Option C.
Wrong! The answer is C! When you install SDK using apt Cloud SDK Component Manager is disabled and you need to install extra packages again using apt.
https://cloud.google.com/sdk/docs/components#managing_cloud_sdk_components
Note: These instructions will not work if you have installed Cloud SDK using a package manager such as APT or yum because Cloud SDK Component Manager is disabled when using that method of installation.
I believe the answer is C...
It is a tricky question!! The question states, "The Cloud SDK was installed from the Google Cloud Ubuntu package repository." For those, who aren't that familiar with Debian/Ubuntu, D seems like an attractive answer. It works as a way to install Datastore...but it does NOT fit the context of the question.
I recommend looking back to G Cloud SDK installation (Debian/Ubuntu): https://cloud.google.com/sdk/docs/install#deb
Read the "Installation Steps" in the documentation. In Step 3, "sudo apt-get update && sudo apt-get install google-cloud-sdk". Then, Step 4 is additionally adding other components, such as "sudo apt-get install google-cloud-sdk-datastore-emulator".
Proving C the correct answer.
Go With 'C' ... just tried creating a ubuntu server and verified these.. Dont worry about any other options. https://cloud.google.com/sdk/docs/quickstart#deb check this link .
C is correct because the datastore emulator is installed using apt and not gcloud.
D is incorrect because the "cloud-datastore-emulator" component is a legacy component and is not recommended for use. The correct component to install is "google-cloud-sdk-datastore-emulator".
https://cloud.google.com/datastore/docs/tools/datastore-emulator
Looks like it may be "C" as there is an error when I try to install emulator by gcloud command.
===
gcloud components install cloud-datastore-emulator
ERROR: (gcloud.components.install)
You cannot perform this action because the Google Cloud CLI component manager
is disabled for this installation. You can run the following command
to achieve the same result for this installation:
sudo apt-get install google-cloud-cli-datastore-emulator
===
C. Install the google-cloud-sdk-datastore-emulator component using the apt get install command.
Here's why:
A. Export Cloud Datastore data: This wouldn't help with local testing as it simply exports your data, not the Datastore environment itself.
B. Create a Cloud Datastore index: Creating an index wouldn't allow you to run a local emulator for testing.
C. Install the google-cloud-sdk-datastore-emulator component using apt get install: This method is the recommended way to install the Cloud Datastore Emulator on Ubuntu when the Cloud SDK is installed from the Google Cloud Ubuntu package repository.
D. Install the cloud-datastore-emulator component using the gcloud components install command: This command would work if you had installed the Cloud SDK using the gcloud installer instead of the Ubuntu package repository.
D -Option C suggests installing the google-cloud-sdk-datastore-emulator component using the apt-get install command. However, the Cloud SDK components are typically managed using the gcloud components command, and the correct component name for the Cloud Datastore Emulator is cloud-datastore-emulator.
So, to ensure consistency and compatibility with the Cloud SDK's management commands, it's recommended to use the gcloud components install command to install the Cloud Datastore Emulator, making option D the more appropriate choice.
Option C suggests installing the google-cloud-sdk-datastore-emulator component using the apt-get install command. However, the Cloud SDK components are typically managed using the gcloud components command, and the correct component name for the Cloud Datastore Emulator is cloud-datastore-emulator.
So, to ensure consistency and compatibility with the Cloud SDK's management commands, it's recommended to use the gcloud components install command to install the Cloud Datastore Emulator, making option D the more appropriate choice.
Installing the emulator
The Datastore emulator is a component of the Google Cloud CLI's gcloud CLI. Use the gcloud components install command to install the Datastore emulator:
gcloud components install cloud-datastore-emulator
//Please go through the documentation and the ans has to be D.
D
Now that you have the gcloud command - Cloud SDK- better to use it: https://cloud.google.com/datastore/docs/tools/datastore-emulator#installing_the_emulator
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
someoneinthecloud
Highly Voted 4 years, 4 months agoXRiddlerX
4 years, 3 months agostepkurniawan
4 years, 3 months agoAle1973
4 years, 2 months agoAle1973
4 years, 2 months agomyuniquename
3 years, 2 months agoprofessor
Highly Voted 4 years, 5 months agoEshkrkrkr
4 years agoSWObaby
3 years, 11 months agoShakthiGCP
3 years, 8 months agojuankloyd
Most Recent 1 week, 6 days agodeskj
1 month, 1 week agoTimfdklfajlksdjlakf
2 months, 3 weeks agowojanx77
4 months, 3 weeks agoPiperMe
9 months, 1 week agoBagibo
10 months, 3 weeks agoBagibo
10 months, 3 weeks agoAndyMandy
10 months, 3 weeks agokaby1987
10 months, 4 weeks agoRahul001
11 months, 2 weeks agoDZ_Ben
12 months agothewalker
1 year agomufuuuu
1 year agowalker1988
1 year agowalker1988
1 year ago