commit | aaebb71cb5b8a2de1e0121b9d90bb19c3c6e7898 | [log] [tgz] |
---|---|---|
author | Wendy Wen Wang <wendy.wang10@sap.com> | Thu Sep 14 14:38:57 2023 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Thu Sep 14 14:38:57 2023 +0000 |
tree | 84c9e87be5c6f5bec677ded3af87be4a90422e0c | |
parent | 751109c0ccec296351cd5068368ef819f2e944c6 [diff] | |
parent | c51cdb1b891df11b82c602115959206c7af1238c [diff] |
Merge "Rename SpannerLifeCycleManager -> DatabaseSchemaCreator"
This plugin provides an implementation of the Gerrit global refdb backed by Cloud Spanner.
Requirements for using this plugin are:
A global refdb implementation is a requirement for a Gerrit multi-master scenario in a multi-site setup to ensure refs are updated consistently across multiple Gerrit primary sites.
Refer to the Gerrit multi-site plugin for more details on the high level architecture.
The in-memory Cloud Spanner emulator can be used during development. There are several limitations of the emulator that differ from the production service.
An easy way to run the emulator is to use gcloud CLI and Docker. Following the install instructions here will provide a local instance that the plugin can access. The gcloud CLI commands will be sent to the emulator instead of the production service. A test spanner instance and database will need to be created.
gcloud spanner instances create test-instance --config=emulator-config --description="Test Instance" --nodes=1 gcloud spanner databases create global-refdb --instance=test-instance
There are several limitations of the emulator which differ from the production service.
In order to easily set up and begin testing the @PLUGIN@ plugin, the multi-site plugin's local environment setup can be used.
This simulates a multi-site setup using two local gerrit instances. Build the release.war to include @PLUGIN@ and follow the linked example setup.
Configuration details can be found in the @PLUGIN@ config documentation.
When not used with the emulator, the plugin requires the path to credentials in the config to authenticate with google. To create the key see the official documentation.