马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?开始注册
x
root@storage:~/heat# cat demo-template.yml heat_template_version: 2015-10-15 description: Launch a basic instance with CirrOS image using the ``m1.tiny`` flavor, ``mykey`` key, and one network. parameters: NetID: type: string description: Network ID to use for the instance. resources: server: type: OS::Nova::Server properties: image: { get_parm: Image_ID } flavor: zoom.medium key_name: key networks: - network: { get_param: Net_ID } outputs: instance_name: description: Name of the instance. value: { get_attr: [ server, name ] } instance_ip: description: IP address of the instance. value: { get_attr: [ server, first_address ] }
$ C" Y+ W$ C6 o创建Stack root@storage:~/heat# vim create_stack.sh IMAGE_ID=$(nova image-list | awk '/ Ubuntu16.04-server-clouding-powerpc64el / { print $2 }') NET_ID=$(openstack network list | awk '/ private / { print $2 }') heat stack-create Ubuntu-clouding.stack -f demo-template.yml \ -P Image_ID=$IMAGE_ID \ -P Net_ID=$NET_ID \ #openstack stack create -t demo-template.yml --parameter "NetID=$NET_ID" --parameter "Net_ID=$IMAGE_ID" stack
" V2 ]# D% B6 Y! r |