Skip to content

Configuring Local Datastore Environment

Mikhail Mikhaylov edited this page Apr 25, 2016 · 4 revisions

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:

  1. Download the SDK and install. The SDK contains gcloud utility. To install the sdk, run the install script from it.

  2. Make sure that gcloud utility is accessible from command line.

  3. Run gcloud init to initialize the SDK:

  4. Run gcloud components install gcd-emulator to install datastore emulator.

  5. 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

Temporarily: start Local Datastore Server

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.

Temporarily: install Spine core-java to the local Maven repository

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

See Also