简体   繁体   English

Openstack(devstack)Heat模板可在其上创建VM和应用程序

[英]Openstack (devstack) Heat template to create vm and app on it

Is it possible, using heat template, create VM instance (eg:. ubuntu) and install on it some application? 是否可以使用Heat模板创建VM实例(例如:.ubuntu)并在其上安装某些应用程序? I want create ubuntu instance and install on it apache ant using heat template 我想创建ubuntu实例并使用热模板在其上安装apache ant

You can use the user_data section of the Server resource to specify a script that installs software. 您可以使用服务器资源的user_data部分来指定安装软件的脚本。

buildslave:
    type: OS::Nova::Server
    properties:
      ..
      ..
      user_data: |
           #!/bin/bash -v
           apt-get update
           apt-get install ant

The script can also be external to the Heat template: 该脚本也可以在Heat模板的外部:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM