|
|
楼主 |
发表于 2017-11-20 15:55:50
|
显示全部楼层
使用下面的内容创建``demo-template.yml``文件:
' U* P& |3 ~4 q6 {$ @6 A0 E) }2 A4 J& C! A9 e
heat_template_version: 2015-10-15
, H* g. E$ u) w/ e8 b2 m jdescription: Launch a basic instance using the ``m1.tiny`` flavor and one network.
* D7 {: ?% K$ {; s/ o/ G5 c
3 o3 z8 o8 s& Y: s5 Vparameters:
- }& {3 X/ |' _! m M+ u ImageID:
1 h2 d! V+ j7 d6 J- K5 T type: string0 o8 y3 k- }$ C6 _9 ] c
description: Image to use for the instance.5 M2 s; l3 F/ p: d
NetID:
9 o- Z* C. T, M$ a! K type: string, A( U6 o+ ] }+ n
description: Network ID to use for the instance.+ i( z/ N) B; P2 |
1 d- \$ W6 d, Dresources:
% G! v# f7 O' k% e( S' V0 J server:
$ h; T R; O l* H. `8 d! W type: OS::Nova::Server
4 ^( e( z; z* h0 j7 {8 g properties:
( X7 ]: H2 M& Q; ^7 |* B) D image: { get_param: ImageID }# g7 v# M; |" P/ ~$ g% C
flavor: m1.tiny
- n9 q. U: h$ @& i; e networks:' g0 r: ]- J6 y( N9 G( @
- network: { get_param: NetID }
6 u% t, a# ?- E9 A
2 L, Z6 _ A/ i% z% t+ Eoutputs:+ ]0 C1 E+ i4 l& I+ i3 c/ N1 h8 ^
instance_name:2 ?9 q s% d$ a( S
description: Name of the instance.
5 {% b# W) ?1 U) y value: { get_attr: [ server, name ] }
, i4 c0 w2 @# Z5 g instance_ip:' X1 B0 F" j1 w2 f9 X
description: IP address of the instance.* Y6 y; Y3 O% U ^1 z# |
value: { get_attr: [ server, first_address ] } |
|