Make Resource names suitable for merge/include
[apex-tripleo-heat-templates.git] / nova-compute-instance.yaml
1 HeatTemplateFormatVersion: '2012-12-12'
2 Description: 'Nova Compute'
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: baremetal
12   NovaImage:
13     Type: String
14     Default: overcloud-compute
15   KeystoneHost:
16     Type: String
17   ServicePassword:
18     Description: admin_password for setting up auth in nova.
19     Type: String
20   NeutronHost:
21     Type: String
22   RabbitHost:
23     Type: String
24   RabbitPassword:
25     Type: String
26   NovaInterfaces:
27     Type: String
28     Default: eth0
29   NovaComputeDriver:
30     Type: String
31     Default: libvirt.LibvirtDriver
32   NovaComputeLibvirtType:
33     Type: String
34     Default: ''
35   NovaApiHost:
36     Type: String
37   GlanceHost:
38     Type: String
39   NovaDSN:
40     Type: String
41   NeutronDSN:
42     Type: String
43   NeutronBridgeMappings:
44     Type: String
45   NeutronNetworkVLANRanges:
46     Type: String
47   NeutronNetworkType:
48     Type: String
49   NeutronEnableTunnelling:
50     Type: String
51 Resources:
52   ComputeAccessPolicy:
53     Type: OS::Heat::AccessPolicy
54     Properties:
55       AllowedResources: [ NovaCompute0 ]
56   ComputeUser:
57     Type: AWS::IAM::User
58     Properties:
59       Policies: [ { Ref: ComputeAccessPolicy } ]
60   ComputeKey:
61     Type: AWS::IAM::AccessKey
62     Properties:
63       UserName:
64         Ref: ComputeUser
65   NovaCompute0:
66     Type: AWS::EC2::Instance
67     Properties:
68       ImageId:
69         {Ref: NovaImage}
70       InstanceType: {Ref: InstanceType}
71       KeyName: {Ref: KeyName}
72     Metadata:
73       OpenStack::ImageBuilder::Elements: [ nova-compute ]
74       heat: 
75         access_key_id:
76           Ref: ComputeKey
77         secret_key:
78           Fn::GetAtt: [ ComputeKey, SecretAccessKey ]
79         stack:
80           name: {Ref: 'AWS::StackName'}
81           region: {Ref: 'AWS::Region'}
82         refresh:
83           - resource: NovaCompute0
84       nova:
85         compute_driver: {Ref: NovaComputeDriver}
86         compute_libvirt_type: {Ref: NovaComputeLibvirtType}
87         db: {Ref: NovaDSN}
88         host: {Ref: NovaApiHost}
89       glance:
90         host: {Ref: GlanceHost}
91       keystone:
92         host: {Ref: KeystoneHost}
93       neutron:
94         host: {Ref: NeutronHost}
95         ovs_db: {Ref: NeutronDSN}
96         ovs:
97           local_ip: 0.0.0.0
98           tenant_network_type: {Ref: NeutronNetworkType}
99           network_vlan_ranges: {Ref: NeutronNetworkVLANRanges}
100           bridge_mappings: {Ref: NeutronBridgeMappings}
101           enable_tunneling: {Ref: NeutronEnableTunnelling}
102
103       service-password: {Ref: ServicePassword}
104       admin-password: {Ref: ServicePassword}
105       rabbit:
106         host: {Ref: RabbitHost}
107         password: {Ref: RabbitPassword}
108       swift:
109         store_user: ''
110         store_key: ''
111       interfaces:
112         control: {Ref: NovaInterfaces}