README: Update to include deployment and connection steps

Include steps for the current manual deployment and steps for
connecting to the database to verify changes.

BUG=b:265977912
TEST=None

Change-Id: Ieb4be5dc0c3651195404c691de1c7cf32c1fd2f5
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/build/prebuilts-cloud/+/4180022
Reviewed-by: Nikhil Gumidelli <nikhilgm@google.com>
Tested-by: Cindy Lin <xcl@google.com>
1 file changed
tree: 3f41afb1d6cf9ce0f029e57dd7c6bbd15c64cf5e
  1. cloudsql/
  2. DIR_METADATA
  3. OWNERS
  4. README.md
README.md

The CrOS Build Prebuilts Cloud Repo

This repo houses all the GCP code for the chromeos-prebuilts project.

Cloud SQL

We have two Cloud SQL instances:

  1. prebuilts - the production instance
  2. prebuilts-staging - the staging instance

Databases

Each instance currently contains a lookup_service database for the project.

Deployments

To manually deploy changes:

  1. Upload the .sql file to Cloud Storage in the cloudsql-manual-deployments bucket.
  2. In the Cloud SQL instance overview page, select IMPORT.
  3. Select the .sql file uploaded to Cloud Storage above and select lookup_service as the database destination.
  4. Select Import and wait a few minutes for the import to complete.

Connections

The following steps can be used to connect to the database and verify deployments and/or query data:

  1. SSH to the VM instance created for the project.
  2. Open (2) SSH connections to the cloudsql-connection instance.
  3. In the (1) SSH-in-browser window, run ./cloud_sql_proxy -instances=chromeos-prebuilts:us-central1:prebuilts-staging=tcp:5432.
  4. In the (2) SSH-in-browser window, run psql "host=127.0.0.1 port=5432 sslmode=disable dbname=lookup_service user=postgres".
  5. The postgres user password can be found here.