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