我想使用terraform
在谷歌云计算引擎中部署MongoDB。由于这是一个实验性的设置,我想使用一些预先配置的映像来节省时间。浏览Google Cloud Launcher,我找到了这个MongoDB deployments。
经过更多的谷歌搜索,我找到了this Google Deployment Manager example,其中我找到了Cloud Launcher镜像的项目名称:click-to-deploy
。
使用它,我成功地列出了所有MongoDB click-to-deploy
镜像:
gcloud compute images list --project click-to-deploy-images --regexp mongodb.+ --uri
它给了我这份清单:
https://www.googleapis.com/compute/v1/projects/click-to-deploy-images/global/images/mongodb-3-2-debian-8-jessie-20161006-083532
https://www.googleapis.com/compute/v1/projects/click-to-deploy-images/global/images/mongodb-3-2-debian-8-jessie-20161111-154124
https://www.googleapis.com/compute/v1/projects/click-to-deploy-images/global/images/mongodb-3-4-debian-8-jessie-20170117-113500
https://www.googleapis.com/compute/v1/projects/click-to-deploy-images/global/images/mongodb-3-4-debian-8-jessie-20170119-150929
https://www.googleapis.com/compute/v1/projects/click-to-deploy-images/global/images/mongodb-32-1607281513-debian-8-jessie-v20160718
https://www.googleapis.com/compute/v1/projects/click-to-deploy-images/global/images/mongodb-cloud-manager-bootstrap-ubuntu-v20160516a
但是没有办法将这些镜像与Cloud Launcher部署相关联。我考虑过使用映像/部署时间戳,但不幸的是它们不匹配。
所以,问题是,如何为Google Cloud Launcher部署获取底层镜像?
发布于 2017-08-18 20:13:34
这不是我想要的答案,但这是我目前得到的最好的答案。
您必须使用Google Cloud Launcher部署VM,然后从Google Deployment Manager获取镜像名称。为此,您必须展开Template details
并单击模板类型(在我的示例中为mongodb.jinja
)。
它还为您提供了完整的Deployment Manager配置(包括元数据、脚本和其他内容)。
截图如下:
https://stackoverflow.com/questions/45282289
复制相似问题