Jetty Logo
Version: 9.4.0.RC0
Contact the core Jetty developers at www.webtide.com

private support for your internal/customer projects ... custom extensions and distributions ... versioned snapshots for indefinite support ... scalability guidance for your apps and Ajax/Comet projects ... development services for sponsored feature development

Configuring Session Clustering with Google Cloud DataStore

Preparation
Configuring Indexes for Session Data

Preparation

You will first need to create a project and enable the Google Cloud api: https://cloud.google.com/docs/authentication#preparation. Take note of the project id that you create in this step as you need to supply it in later steps.

Communicating with GCloudDataStore

When running Jetty outside of google infrastructure

Before running Jetty, you will need to choose one of the following methods to set up the local environment to enable remote GCloud DataStore communications.

  1. Using the GCloud SDK:

    • Ensure you have the GCloud SDK installed: https://cloud.google.com/sdk/?hl=en.
    • Use the GCloud tool to set up the project you created in the preparation step: GCloud config set project PROJECT_ID
    • Use the GCloud tool to authenticate a google account associated with the project created in the preparation step: GCloud auth login ACCOUNT
  2. Using environment variables

    • Define the environment variable GCLOUD_PROJECT with the project id you created in the preparation step.
    • Generate a JSON service account key and then define the environment variable GOOGLE_APPLICATION_CREDENTIALS=/path/to/my/key.json
When Running Jetty Inside of Google Infrastructure

The Google deployment tools will automatically configure the project and authentication information for you.

Configuring Indexes for Session Data

Regardless of whether you’re running inside or outside google infrastructure you will need to upload a file that defines some indexes that are needed by the GCloud datastore session data store. This file is named index.yaml and you can find it in your distribution in $jetty.home/etc/sessions/gcloud/index.yaml.

Follow the instructions here to upload the pre-generated index.yaml file.

Communicating with the GCloudDataStore Emulator

To enable communication using the GCloud Emulator:

  • Ensure you have the GCloud SDK installed: https://cloud.google.com/sdk/?hl=en
  • Follow the instructions here on how to start the GCloud datastore emulator, and how to propagate the environment variables that it creates to the terminal in which you run Jetty.

See an error or something missing? Contribute to this documentation at Github!(Generated: 2016-09-15)