2022-07-13 09:59:38 +00:00
|
|
|
NAME
|
|
|
|
|
gcloud alpha spanner samples run - run the given Cloud Spanner sample app
|
|
|
|
|
|
|
|
|
|
SYNOPSIS
|
|
|
|
|
gcloud alpha spanner samples run APPNAME --instance-id=INSTANCE_ID
|
|
|
|
|
[--no-cleanup] [--database-id=DATABASE_ID]
|
2022-09-21 11:28:40 +00:00
|
|
|
[--duration=DURATION; default="1h"] [--skip-init]
|
|
|
|
|
[GCLOUD_WIDE_FLAG ...]
|
2022-07-13 09:59:38 +00:00
|
|
|
|
|
|
|
|
DESCRIPTION
|
|
|
|
|
(ALPHA) Each Cloud Spanner sample application includes a backend gRPC
|
|
|
|
|
service backed by a Cloud Spanner database and a workload script that
|
|
|
|
|
generates service traffic. This command creates and initializes the Cloud
|
|
|
|
|
Spanner database and runs both the backend service and workload script.
|
|
|
|
|
|
|
|
|
|
These sample apps are open source and available at
|
|
|
|
|
https://github.com/GoogleCloudPlatform/cloud-spanner-samples.
|
|
|
|
|
|
|
|
|
|
To see a list of available sample apps, run:
|
|
|
|
|
|
|
|
|
|
$ gcloud alpha spanner samples list
|
|
|
|
|
|
|
|
|
|
EXAMPLES
|
|
|
|
|
To run the 'finance' sample app using instance 'my-instance', run:
|
|
|
|
|
|
|
|
|
|
$ gcloud alpha spanner samples run finance --instance-id=my-instance
|
|
|
|
|
|
|
|
|
|
POSITIONAL ARGUMENTS
|
|
|
|
|
APPNAME
|
|
|
|
|
The sample app name, e.g. "finance".
|
|
|
|
|
|
|
|
|
|
REQUIRED FLAGS
|
|
|
|
|
--instance-id=INSTANCE_ID
|
|
|
|
|
The Cloud Spanner instance ID for the sample app.
|
|
|
|
|
|
|
|
|
|
OPTIONAL FLAGS
|
|
|
|
|
--cleanup
|
|
|
|
|
Delete the instance after running the sample app. Enabled by default,
|
|
|
|
|
use --no-cleanup to disable.
|
|
|
|
|
|
|
|
|
|
--database-id=DATABASE_ID
|
|
|
|
|
ID of the new Cloud Spanner database to create for the sample app.
|
|
|
|
|
|
|
|
|
|
--duration=DURATION; default="1h"
|
|
|
|
|
Duration of time allowed to run the sample app before stopping the
|
|
|
|
|
service.
|
|
|
|
|
|
2022-09-21 11:28:40 +00:00
|
|
|
--skip-init
|
|
|
|
|
Use an existing database instead of creating a new one.
|
|
|
|
|
|
2022-07-13 09:59:38 +00:00
|
|
|
GCLOUD WIDE FLAGS
|
|
|
|
|
These flags are available to all commands: --access-token-file, --account,
|
|
|
|
|
--billing-project, --configuration, --flags-file, --flatten, --format,
|
|
|
|
|
--help, --impersonate-service-account, --log-http, --project, --quiet,
|
|
|
|
|
--trace-token, --user-output-enabled, --verbosity.
|
|
|
|
|
|
|
|
|
|
Run $ gcloud help for details.
|
|
|
|
|
|
|
|
|
|
NOTES
|
|
|
|
|
This command is currently in alpha and might change without notice. If this
|
|
|
|
|
command fails with API permission errors despite specifying the correct
|
|
|
|
|
project, you might be trying to access an API with an invitation-only early
|
2022-08-24 09:45:53 +00:00
|
|
|
access allowlist. These variants are also available:
|
|
|
|
|
|
|
|
|
|
$ gcloud spanner samples run
|
|
|
|
|
|
|
|
|
|
$ gcloud beta spanner samples run
|
2022-07-13 09:59:38 +00:00
|
|
|
|