|
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 ] } , f1 }# h7 }3 J5 S
创建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 - r( P6 V- H* ~" k" ^
|