google-cloud-platform - Startup scripts in GCP deployment manager
问题描述
I'm deploying a VM instance using GCP deployment manager. There are some initialization actions which should be executed over deployment process.
I have imported a startup script and added the metadata-from-file
property following this example:
https://github.com/GoogleCloudPlatform/deploymentmanager-samples/blob/master/examples/v2/metadata_from_file/jinja/config.yaml
But I don't see those actions getting executed. Any other way to have such scripts included in the deployment plan?
解决方案
我建议您查看有关在部署管理器中设置启动脚本的文档。它声明以不同的格式设置元数据,试一试它应该可以工作。
metadata:
items:
- key: startup-script
value: "STARTUP-SCRIPT-CONTENTS"
如果您仍有问题,请在此处分享您的部署的 YAML,不要提供敏感信息,我很乐意提供帮助。
推荐阅读
- c# - 查找属于 6 小时间隔的 30 分钟间隔值
- extjs - 在 Extjs (6.xx) 中归档的组合框有时可以正常工作,有时不能
- android-studio - 在 android studio 中使用 opencv 进行人脸检测。E/AndroidRuntime: 致命异常: main
- sql-server - 仅在 Azure Pipelines 上用户“sa”登录失败
- firebase - 在同一项目的两个 Firestore 应用之间共享本地离线缓存
- flutter - 如何在画布上制作自定义可编辑文本框,其中背景随文本传播?
- python - 内生变量的长度必须大于使用的滞后数
- scala - 对包含另一个案例类 Seq 的案例类进行排序
- javascript - 这个函数如何运行?
- aem - 如何在 Touch UI 页面属性中启用图像裁剪