This repo just contains scripts to help deploy CockroachDB onto GKE, per this doc, with the addition of:
- The locality-checker,
which injects the
--locality
flag so you getregion
andzones
- The PGWeb Web UI SQL client
- The cockroach workload demo
- The Geo Tourist demo app which is available in this GitHub repo
Note: over time, parts of this may change and need to be updated; for example:
- CockroachDB versions
- Geo Tourist app version
- Documentation links
00_setup_gke.sh
: Set up your GKE cluster. Note the prerequisites listed in this document01_gen_certs.sh
: Generate the required SSL certificates and create the required K8s secrets02_apply_stateful_set.sh
: Applying CockroachDB stateful set configuration; when ready, it will print the public IP address which can be used to connect via SQL client of web browser, for DB Console (port 8080)03_sql_client.sh
: Start a SQL client pod and use it to create a demouser account in CockroachDB04_pgweb_start.sh
: Use the PGWeb SQL UI to access the CockroachDB cluster as demouser
- Specify the time in minutes to run the workload:
export WORKLOAD_RUN_MINUTES=15
06_run_workload.sh
: Runs cockroach workload bank for the specified duration (the script runs it all for you)
08_geo_load_data.sh
: Deploy the data loader app which creates tables and loads data09_geo_app_start.sh
: Deploy the app itself; when finished, it will print the public IP address of the app
10_scale_out.sh
: Add a 4th node to the CockroachDB cluster (zero down time)11_rolling_upgrade.sh
: Perform a zero downtime rolling upgrade of the CockroachDB cluster12_kill_a_node.sh
: Kill one of the CockroachDB nodes and observe effects via DB Console and/or the app13_psql_cli.sh
: Use thepsql
CLI to connect to the CockroachDB cluster14_create_backup_schedule.sh
: Create a backup schedule for defaultdb. When this script is run, it outputs a list of requirements (Enterprise license, Cloud Storage bucket, service account with key).
20_clean_up.sh
: Clean up the app and the CockroachDB components21_gke_delete_cluster.sh
: Delete the GKE cluster itself