首页 > 解决方案 > 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?

标签: google-cloud-platformgoogle-deployment-manager

解决方案


我建议您查看有关在部署管理器中设置启动脚本的文档。它声明以不同的格式设置元数据,试一试它应该可以工作。

metadata:
     items:
     - key: startup-script
       value: "STARTUP-SCRIPT-CONTENTS"

如果您仍有问题,请在此处分享您的部署的 YAML,不要提供敏感信息,我很乐意提供帮助。


推荐阅读