GAE地区 - 确切位置

时间:2017-12-18 13:21:44

标签: google-app-engine google-cloud-sql gcloud gsutil

我的GAE(标准)应用程序托管在欧洲西部地区。

我正在研究创建支持此应用的Cloud SQL实例,并希望将其置于最接近GAE的位置。

当前的Cloud SQL实例位于以下位置: Europe-west1比利时 Europe-west2伦敦 Europe-west3 Frankfurt

有没有办法找出我的GAE应用的其他位置详情,以决定使用哪个Cloud SQL位置?

1 个答案:

答案 0 :(得分:3)

您可以使用云外壳中的gcloud app describe来查找应用的位置信息。在shell中键入此命令(gcloud app describe)将返回如下内容:

authDomain: gmail.com
codeBucket: staging.my-project-id.appspot.com
defaultBucket: my-project-id.appspot.com
defaultHostname: my-project-id.appspot.com
featureSettings:
  splitHealthChecks: true
gcrDomain: eu.gcr.io
id: my-project-id
locationId: europe-west2
name: apps/my-project-id
servingStatus: SERVING

请参阅命令说明here

接下来,您可以通过键入gcloud sql instances create [your-instance-name] --region=[region-of-your-choice]来创建SQL实例。例如:

user-id@my-project-id:~$ gcloud sql instances create test-instance --region=europe-west2
Creating Cloud SQL instance...done.
Created [https://www.googleapis.com/sql/v1beta4/projects/my-project-id/instances/test-instance].
NAME           DATABASE_VERSION  REGION        TIER              ADDRESS         STATUS
test-instance  MYSQL_5_6         europe-west2  db-n1-standard-1  00.000.000.000  RUNNABLE
user-id@my-project-id:~$

所有可用选项均为here