-
Notifications
You must be signed in to change notification settings - Fork 0
Configuring Local Datastore Environment
To run the sample on a local installation of Google Cloud Datastore, or to use it for working with the Datastore in your tests, please perform the following steps:
-
Download the SDK and install. The SDK contains
gcloud
utility. To install the sdk, run the install script from it. -
Make sure that
gcloud
utility is accessible from command line. -
Run
gcloud init
to initialize the SDK: -
Run
gcloud components install gcd-emulator
to install datastore emulator. -
Make sure running
gcloud beta emulators datastore env-init
displays:
export DATASTORE_DATASET=spine
export DATASTORE_HOST=http://localhost:8080
export DATASTORE_EMULATOR_HOST=localhost:8080
export DATASTORE_PROJECT_ID=spine
To run tests, it is required to start the local Datastore Server manually, until this issue is fixed and this fix is added to the next GCD library release.
To start the local Datastore Server, please run the following command:
gcloud beta emulators datastore start --project=spine --host-port=localhost:8080 --consistency 1.0
These commands are also available as .sh
and .bat
scripts in the root of a project.
It is also required to checkout Spine core-java project, build it via Gradle and install to the local Maven repository.
Please run the following command:
gradlew publishToMavenLocal