Add an example of Type: FileInclude.
[apex-tripleo-heat-templates.git] / heat.yaml
1 HeatTemplateFormatVersion: '2012-12-12'
2 Description: 'Heat Engine and API'
3 Parameters:
4   KeyName: 
5     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
6     Type: String
7     Default: default
8   InstanceType:
9     Description: Use this flavor
10     Type: String
11     Default: bm.small
12   HeatUser:
13     Description: Heat database username.
14     Type: String
15     Default: heat
16   HeatEngineImage:
17     Type: String
18   HeatApiImage:
19     Type: String
20   RabbitMQHost:
21     Description: Host for RabbitMQ
22     Type: String
23   RabbitMQPassword:
24     Description: Password for RabbitMQ
25     Type: String
26   ApiGroupSize:
27     Description: How many API nodes to run
28     Type: Integer
29     Default: 1
30   AvailabilityZones:
31     Type: List
32     Default: [ 1 ]
33 Resources:
34   EngineAccessPolicy:
35     Type: OS::Heat::AccessPolicy
36     Properties:
37       AllowedResources: [ HeatEngine ]
38   EngineUser:
39     Type: AWS::IAM::User
40     Properties:
41       Policies: [ { Ref: EngineAccessPolicy } ]
42   EngineKey:
43     Type: AWS::IAM::AccessKey
44     Properties:
45       UserName:
46         Ref: EngineUser
47   ApiAccessPolicy:
48     Type: OS::Heat::AccessPolicy
49     Properties:
50       AllowedResources: [ HeatAPI, HeatAPILaunch ]
51   ApiUser:
52     Type: AWS::IAM::User
53     Properties:
54       Policies: [ { Ref: ApiAccessPolicy } ]
55   ApiKey:
56     Type: AWS::IAM::AccessKey
57     Properties:
58       UserName:
59         Ref: ApiUser
60   HeatAPILaunch:
61     Type: AWS::AutoScaling::LaunchConfiguration
62     Metadata:
63       OpenStack::ImageBuilder::Elements: [ heat-api ]
64       heat:
65         rpc_backend: heat.openstack.common.rpc.impl_kombu
66         rabbit:
67           host: {Ref: RabbitMQHost}
68           password: {Ref: RabbitMQPassword}
69         access_key_id:
70           Ref: ApiKey
71         secret_key:
72           Fn::GetAtt: [ ApiKey, SecretAccessKey ]
73         stack:
74           name: {Ref: 'AWS::StackName'}
75           region: {Ref: 'AWS::Region'}
76         refresh:
77           - resource: HeatAPILaunch
78     Properties:
79       ImageId:
80         {Ref: HeatApiImage}
81       InstanceType: {Ref: InstanceType}
82       KeyName: {Ref: KeyName}
83   HeatAPI:
84     Type: OS::Heat::InstanceGroup
85     Properties:
86       LaunchConfiguration: {Ref: HeatApiLaunch}
87       Size: {Ref: ApiGroupSize}
88       AvailabilityZones: {Ref: AvailabilityZones}
89   HeatEngine:
90     Type: AWS::EC2::Instance
91     Properties:
92       ImageId:
93         {Ref: HeatEngineImage}
94     Metadata:
95       OpenStack::Role: stateful
96       OpenStack::ImageBuilder::Elements: [ heat-engine ]
97       heat:
98         rpc_backend: heat.openstack.common.rpc.impl_kombu
99         rabbit:
100           host: {Ref: RabbitMQHost}
101           password: {Ref: RabbitMQPassword}
102         access_key_id:
103           Ref: EngineKey
104         secret_key:
105           Fn::GetAtt: [ EngineKey, SecretAccessKey ]
106         stack:
107           name: {Ref: 'AWS::StackName'}
108           region: {Ref: 'AWS::Region'}
109         refresh:
110           - resource: HeatEngine