Load local IP using separate post-boot Metadata.
[apex-tripleo-heat-templates.git] / undercloud-vm.yaml
1 escription: All-in-one baremetal OpenStack and all dependencies.
2 HeatTemplateFormatVersion: '2012-12-12'
3 Parameters:
4   InstanceType:
5     Default: baremetal
6     Description: Flavor to request when deploying.
7     Type: String
8   KeyName:
9     Default: default
10     Description: Name of an existing EC2 KeyPair to enable SSH access to the instances
11     Type: String
12   Image:
13     Default: undercloud
14     Type: String
15   PowerUserName:
16     Default: stack
17     Description: What username to ssh to the virtual power host with.
18     Type: String
19 Resources:
20   AccessPolicy:
21     Properties:
22       AllowedResources:
23       - notcomputeConfig
24     Type: OS::Heat::AccessPolicy
25   Key:
26     Properties:
27       UserName:
28         Ref: User
29     Type: AWS::IAM::AccessKey
30   User:
31     Properties:
32       Policies:
33       - Ref: AccessPolicy
34     Type: AWS::IAM::User
35   notcomputeConfig:
36     Type: AWS::AutoScaling::LaunchConfiguration
37     Properties:
38       ImageId: '0'
39       InstanceType: foo
40     Metadata:
41       OpenStack::Heat::Stack: {}
42       Openstack::ImageBuilder::Elements: [ boot-stack, heat-cfntools, neutron-network-node ]
43       admin-password: unset
44       admin-token: unset
45       controller-address:
46         Fn::GetAtt:
47           - notcompute
48           - PrivateIp
49       cinder:
50         db: mysql://cinder:unset@localhost/cinder
51         volume_size_mb: '5000'
52       db-password: unset
53       glance:
54         db: mysql://glance:unset@localhost/glance
55         host: 127.0.0.1
56       heat:
57         admin_password: unset
58         admin_tenant_name: service
59         admin_user: heat
60         auth_encryption_key: unset___________
61         db: mysql://heat:unset@localhost/heat
62         heat_watch_server_url:
63           Fn::Join:
64             - ''
65             - - http://
66               - {"Fn::GetAtt": [ notcompute, PrivateIp ]}
67               - ":8003"
68         metadata_server_url:
69           Fn::Join:
70             - ''
71             - - http://
72               - {"Fn::GetAtt": [ notcompute, PrivateIp ]}
73               - ":8000"
74         waitcondition_server_url:
75           Fn::Join:
76             - ''
77             - - http://
78               - {"Fn::GetAtt": [ notcompute, PrivateIp ]}
79               - ":8000/v1/waitcondition"
80       os-collect-config:
81         cfn:
82           access_key_id:
83             Ref: Key
84           path: notcomputeConfig.Metadata
85           secret_access_key:
86             Fn::GetAtt:
87             - Key
88             - SecretAccessKey
89           stack_name:
90             Ref: AWS::StackName
91       interfaces:
92         control: eth2
93       keystone:
94         db: mysql://keystone:unset@localhost/keystone
95         host: 127.0.0.1
96       nova:
97         compute_hostname: ubuntu
98         compute_driver: baremetal.driver.BareMetalDriver
99         db: mysql://nova:unset@localhost/nova
100         host: 127.0.0.1
101         metadata-proxy: false
102         tuning:
103           ram_allocation_ratio: 1.0
104           reserved_host_memory_mb: 0
105         baremetal:
106           arch: i386
107           db: mysql://nova:unset@localhost/nova_bm
108           power_manager: nova.virt.baremetal.virtual_power_driver.VirtualPowerManager
109           pxe_deploy_timeout: 2400
110           virtual_power:
111             user:
112               Ref: PowerUserName
113             key: /opt/stack/boot-stack/virtual-power-key
114             ssh_host: 192.168.122.1
115             type: virsh
116       neutron:
117         host: 127.0.0.1
118         ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
119         ovs:
120           dnsmasq_range: [192.0.2.25, 192.0.2.44]
121           public_interface: eth0
122           physical_bridge: br-ctlplane
123           physical_network: ctlplane
124           network_vlan_ranges: ctlplane
125           bridge_mappings: ctlplane:br-ctlplane
126           tenant_network_type: vlan
127           enable_tunneling: 'False'
128       rabbit:
129         host: 127.0.0.1
130         password: guest
131       swift:
132         store_user: unset
133         store_key: unset
134       service-password: unset
135   notcompute:
136     Type: AWS::EC2::Instance
137     Properties:
138       ImageId:
139         Ref: Image
140       InstanceType:
141         Ref: InstanceType
142       KeyName:
143         Ref: KeyName
144     Type: AWS::EC2::Instance
145     Metadata:
146       os-collect-config:
147         cfn:
148           access_key_id:
149             Ref: Key
150           path: notcomputeConfig.Metadata
151           secret_access_key:
152             Fn::GetAtt:
153             - Key
154             - SecretAccessKey
155           stack_name:
156             Ref: AWS::StackName