Prep work for a scalable control plane.
[apex-tripleo-heat-templates.git] / undercloud-source.yaml
1 Description: All-in-one baremetal OpenStack and all dependencies.
2 HeatTemplateFormatVersion: '2012-12-12'
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   AdminToken:
10     Default: unset
11     Description: The keystone auth secret.
12     Type: String
13     NoEcho: true
14   BaremetalArch:
15     Default: i386
16     Description: The architecture to use in Nova-BM - i386 or amd64.
17     Type: String
18   Flavor:
19     Default: baremetal
20     Description: Flavor to request when deploying.
21     Type: String
22   GlancePassword:
23     Default: unset
24     Description: The password for the glance service account, used by the glance services.
25     Type: String
26     NoEcho: true
27   KeyName:
28     Default: default
29     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
30     Type: String
31   HeatPassword:
32     Default: unset
33     Description: The password for the Heat service account, used by the Heat services.
34     Type: String
35     NoEcho: true
36   Image:
37     Default: undercloud
38     Type: String
39   NeutronPassword:
40     Default: unset
41     Description: The password for the neutron service account, used by neutron agents.
42     Type: String
43     NoEcho: true
44   NovaPassword:
45     Default: unset
46     Description: The password for the nova service account, used by nova-api.
47     Type: String
48     NoEcho: true
49 Resources:
50   AccessPolicy:
51     Properties:
52       AllowedResources:
53       - undercloudConfig
54     Type: OS::Heat::AccessPolicy
55   notCompute0Key:
56     Properties:
57       UserName:
58         Ref: User
59     Type: AWS::IAM::AccessKey
60   notCompute0CompletionCondition:
61     Type: AWS::CloudFormation::WaitCondition
62     DependsOn: undercloud
63     Properties:
64       Handle: {Ref: notCompute0CompletionHandle}
65       Count: '1'
66       Timeout: '1800'
67   notCompute0CompletionHandle:
68     Type: AWS::CloudFormation::WaitConditionHandle
69   User:
70     Properties:
71       Policies:
72       - Ref: AccessPolicy
73     Type: AWS::IAM::User
74   undercloudConfig:
75     Type: AWS::AutoScaling::LaunchConfiguration
76     Properties:
77       ImageId: '0'
78       InstanceType: foo
79     Metadata:
80       OpenStack::Role: undercloudConfig
81       OpenStack::Heat::Stack: {}
82       OpenStack::ImageBuilder::Elements: [ boot-stack, heat-cfntools, neutron-network-node ]
83       admin-password:
84         Ref: AdminPassword
85       admin-token: 
86         Ref: AdminToken
87       controller-address:
88         Fn::Select:
89           - 0
90           - Fn::Select:
91             - "ctlplane"
92             - Fn::GetAtt:
93               - undercloud
94               - networks
95       cinder:
96         db: mysql://cinder:unset@localhost/cinder
97         volume_size_mb: '5000'
98       completion-handle:
99         Ref: notCompute0CompletionHandle
100       db-password: unset
101       glance:
102         backend: file
103         db: mysql://glance:unset@localhost/glance
104         host: 127.0.0.1
105         service-password:
106           Ref: GlancePassword
107       heat:
108         admin_password:
109           Ref: HeatPassword
110         admin_tenant_name: service
111         admin_user: heat
112         auth_encryption_key: unset___________
113         db: mysql://heat:unset@localhost/heat
114         watch_server_url:
115           Fn::Join:
116             - ''
117             - - http://
118               - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ undercloud, networks ]} ]}]}
119               - ":8003"
120         metadata_server_url:
121           Fn::Join:
122             - ''
123             - - http://
124               - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ undercloud, networks ]} ]}]}
125               - ":8000"
126         waitcondition_server_url:
127           Fn::Join:
128             - ''
129             - - http://
130               - {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [ undercloud, networks ]} ]}]}
131               - ":8000/v1/waitcondition"
132       os-collect-config:
133         cfn:
134           access_key_id:
135             Ref: notCompute0Key
136           path: undercloudConfig.Metadata
137           secret_access_key:
138             Fn::GetAtt:
139             - notCompute0Key
140             - SecretAccessKey
141           stack_name:
142             Ref: AWS::StackName
143       keystone:
144         db: mysql://keystone:unset@localhost/keystone
145         host: 127.0.0.1
146       neutron:
147         host: 127.0.0.1
148         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
149         ovs:
150           dnsmasq_range: [192.0.2.25, 192.0.2.44]
151           public_interface:
152             Ref: NeutronPublicInterface
153           physical_bridge: br-ctlplane
154           physical_network: ctlplane
155           network_vlan_ranges: ctlplane
156           bridge_mappings: ctlplane:br-ctlplane
157           tenant_network_type: vlan
158           enable_tunneling: 'False'
159         service-password:
160           Ref: NeutronPassword
161       rabbit:
162         host: 127.0.0.1
163         password: guest
164   undercloud:
165     Type: OS::Nova::Server
166     Properties:
167       image:
168         Ref: Image
169       flavor:
170         Ref: Flavor
171       key_name:
172         Ref: KeyName
173     Metadata:
174       os-collect-config:
175         cfn:
176           access_key_id:
177             Ref: notCompute0Key
178           path: undercloudConfig.Metadata
179           secret_access_key:
180             Fn::GetAtt:
181             - notCompute0Key
182             - SecretAccessKey
183           stack_name:
184             Ref: AWS::StackName