From 862321a099d6ba6438a7d2f57d54f4b089e7259e Mon Sep 17 00:00:00 2001 From: Shubha Rajan Date: Tue, 4 Feb 2020 17:08:19 -0800 Subject: [PATCH 1/2] Updated commands for Cloud Run * Made service name consistent in steps 1, 2, and 3 * Removed beta command * Removed whitespace from step 3 so that it can be copy-pasted easily --- cloud-sql/mysql/sqlalchemy/README.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cloud-sql/mysql/sqlalchemy/README.md b/cloud-sql/mysql/sqlalchemy/README.md index 2e04f6a900f..b80c2447de4 100644 --- a/cloud-sql/mysql/sqlalchemy/README.md +++ b/cloud-sql/mysql/sqlalchemy/README.md @@ -84,13 +84,13 @@ for more details on connecting a Cloud Run service to Cloud SQL. 1. Build the container image: ```sh -gcloud builds submit --tag gcr.io/[YOUR_PROJECT_ID]/run-sql +gcloud builds submit --tag gcr.io/[YOUR_PROJECT_ID]/run-mysql ``` 2. Deploy the service to Cloud Run: ```sh -gcloud beta run deploy run-sql --image gcr.io/[YOUR_PROJECT_ID]/run-sql +gcloud run deploy run-sql --image gcr.io/[YOUR_PROJECT_ID]/run-mysql ``` Take note of the URL output at the end of the deployment process. @@ -98,10 +98,10 @@ Take note of the URL output at the end of the deployment process. 3. Configure the service for use with Cloud Run ```sh -gcloud beta run services update run-mysql \ +gcloud run services update run-mysql \ --add-cloudsql-instances [INSTANCE_CONNECTION_NAME] \ --set-env-vars CLOUD_SQL_CONNECTION_NAME=[INSTANCE_CONNECTION_NAME],\ - DB_USER=[MY_DB_USER],DB_PASS=[MY_DB_PASS],DB_NAME=[MY_DB] +DB_USER=[MY_DB_USER],DB_PASS=[MY_DB_PASS],DB_NAME=[MY_DB] ``` Replace environment variables with the correct values for your Cloud SQL instance configuration. @@ -111,4 +111,4 @@ This step can be done as part of deployment but is separated for clarity. 4. Navigate your browser to the URL noted in step 2. For more details about using Cloud Run see http://cloud.run. -Review other [Python on Cloud Run samples](../../../run/). \ No newline at end of file +Review other [Python on Cloud Run samples](../../../run/). From 6dc4ae2043388c3a9d6f54ac4abc10a351c483ce Mon Sep 17 00:00:00 2001 From: Shubha Rajan Date: Wed, 5 Feb 2020 10:50:05 -0800 Subject: [PATCH 2/2] Update README.md --- cloud-sql/mysql/sqlalchemy/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud-sql/mysql/sqlalchemy/README.md b/cloud-sql/mysql/sqlalchemy/README.md index b80c2447de4..96d2410be29 100644 --- a/cloud-sql/mysql/sqlalchemy/README.md +++ b/cloud-sql/mysql/sqlalchemy/README.md @@ -90,7 +90,7 @@ gcloud builds submit --tag gcr.io/[YOUR_PROJECT_ID]/run-mysql 2. Deploy the service to Cloud Run: ```sh -gcloud run deploy run-sql --image gcr.io/[YOUR_PROJECT_ID]/run-mysql +gcloud run deploy run-mysql --image gcr.io/[YOUR_PROJECT_ID]/run-mysql ``` Take note of the URL output at the end of the deployment process.