Allow making the public interface a vlan.
[apex-tripleo-heat-templates.git] / nova-compute-instance.yaml
1 HeatTemplateFormatVersion: '2012-12-12'
2 Description: 'Nova Compute'
3 Parameters:
4   AdminPassword:
5     Default: unset
6     Description: The password for the keystone admin account, used for monitoring, querying neutron etc.
7     Type: String
8     NoEcho: true
9   KeyName: 
10     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
11     Type: String
12     Default: default
13   Flavor:
14     Description: Use this flavor
15     Type: String
16     Default: baremetal
17   NovaImage:
18     Type: String
19     Default: overcloud-compute
20   KeystoneHost:
21     Type: String
22   NeutronHost:
23     Type: String
24   RabbitHost:
25     Type: String
26   RabbitPassword:
27     Type: String
28     NoEcho: true
29   NovaComputeDriver:
30     Type: String
31     Default: libvirt.LibvirtDriver
32   NovaComputeLibvirtType:
33     Type: String
34     Default: ''
35   NovaApiHost:
36     Type: String
37   NovaPassword:
38     Default: unset
39     Description: The password for the nova service account, used by nova-api.
40     Type: String
41     NoEcho: true
42   GlanceHost:
43     Type: String
44   NovaDSN:
45     Type: String
46   NeutronDSN:
47     Type: String
48   NeutronBridgeMappings:
49     Type: String
50   NeutronNetworkVLANRanges:
51     Type: String
52   NeutronNetworkType:
53     Type: String
54   NeutronEnableTunnelling:
55     Type: String
56 Resources:
57   ComputeAccessPolicy:
58     Type: OS::Heat::AccessPolicy
59     Properties:
60       AllowedResources: [ NovaCompute0 ]
61   ComputeUser:
62     Type: AWS::IAM::User
63     Properties:
64       Policies: [ { Ref: ComputeAccessPolicy } ]
65   ComputeKey:
66     Type: AWS::IAM::AccessKey
67     Properties:
68       UserName:
69         Ref: ComputeUser
70   NovaCompute0:
71     Type: OS::Nova::Server
72     Properties:
73       image:
74         {Ref: NovaImage}
75       flavor: {Ref: Flavor}
76       key_name: {Ref: KeyName}
77     Metadata:
78       os-collect-config:
79         cfn:
80           access_key_id:
81             Ref: ComputeKey
82           secret_access_key:
83             Fn::GetAtt: [ ComputeKey, SecretAccessKey ]
84           stack_name: {Ref: 'AWS::StackName'}
85           path: NovaCompute0Config.Metadata
86       OpenStack::ImageBuilder::Elements: [ nova-compute ]
87   NovaCompute0Config:
88     Type: AWS::AutoScaling::LaunchConfiguration
89     Properties:
90       InstanceType: '0'
91       ImageId: '0'
92     Metadata:
93       os-collect-config:
94         cfn:
95           access_key_id:
96             Ref: ComputeKey
97           secret_access_key:
98             Fn::GetAtt: [ ComputeKey, SecretAccessKey ]
99           stack_name: {Ref: 'AWS::StackName'}
100           path: NovaCompute0Config.Metadata
101       nova:
102         compute_driver: {Ref: NovaComputeDriver}
103         compute_libvirt_type: {Ref: NovaComputeLibvirtType}
104         db: {Ref: NovaDSN}
105         host: {Ref: NovaApiHost}
106         service-password:
107           Ref: NovaPassword
108       glance:
109         host: {Ref: GlanceHost}
110       keystone:
111         host: {Ref: KeystoneHost}
112       neutron:
113         host: {Ref: NeutronHost}
114         ovs_db: {Ref: NeutronDSN}
115         ovs:
116           local_ip:
117             Fn::Select:
118               - 0
119               - Fn::Select:
120                 - ctlplane
121                 - Fn::GetAtt:
122                   - NovaCompute0
123                   - networks
124           tenant_network_type: {Ref: NeutronNetworkType}
125           network_vlan_ranges: {Ref: NeutronNetworkVLANRanges}
126           bridge_mappings: {Ref: NeutronBridgeMappings}
127           enable_tunneling: {Ref: NeutronEnableTunnelling}
128         service-password:
129           Ref: NeutronPassword
130       admin-password: {Ref: AdminPassword}
131       rabbit:
132         host: {Ref: RabbitHost}
133         password: {Ref: RabbitPassword}
134       swift:
135         store_user: ''
136         store_key: ''