[keepalived] Check proccess id of nginx on proxy
[fuel.git] / mcp / reclass / classes / cluster / mcp-pike-common-ha / openstack_compute_pdf.yml.j2
1 ##############################################################################
2 # Copyright (c) 2018 Mirantis Inc., Enea AB and others.
3 # All rights reserved. This program and the accompanying materials
4 # are made available under the terms of the Apache License, Version 2.0
5 # which accompanies this distribution, and is available at
6 # http://www.apache.org/licenses/LICENSE-2.0
7 ##############################################################################
8 {#- NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
9 {%- import 'net_map.j2' as nm with context %}
10 {#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
11 {%- set nics = { nm.cmp001.nic_admin: True, nm.cmp001.nic_mgmt: True } %}
12 {%- set vlans = { nm.vlan_admin: nm.cmp001.nic_admin, nm.vlan_mgmt: nm.cmp001.nic_mgmt } %}
13 ---
14 parameters:
15   _param:
16     # Should later be determined via PDF/IDF, AArch64 has ESP on /dev/sda1
17 {%- if conf.nodes[nm.cmp001.idx].node.arch == 'aarch64' or
18        conf.nodes[nm.cmp001.idx].disks.0.disk_capacity | storage_size_num | float > 2000000000000 %}
19     ~cinder_lvm_devices: ['/dev/sda2']
20 {%- else %}
21     ~cinder_lvm_devices: ['/dev/sda1']
22 {%- endif %}
23   linux:
24     network:
25       bridge: openvswitch
26       interface:
27 {%- for nic in nics %}
28     {%- if nic == nm.cmp001.nic_admin %}
29         {{ nic }}:
30           enabled: true
31           type: eth
32           proto: dhcp
33           name: {{ nic }}
34     {%- else %}
35         {{ nic }}:
36           enabled: true
37           type: eth
38           proto: manual
39           address: 0.0.0.0
40           {%- if nic == nm.cmp001.nic_public %}
41           netmask: ${_param:opnfv_net_public_mask}
42           {%- else %}
43           netmask: 255.255.255.0
44           {%- endif %}
45           mtu: ${_param:interface_mtu}
46           name: {{ nic }}
47     {%- endif %}
48 {%- endfor %}
49
50 {%- for vlan in vlans %}
51     {%- if vlan | int > 0 %}
52         {{ vlans[vlan] }}.{{ vlan }}:
53           enabled: true
54           proto: manual
55           type: vlan
56           name: {{ vlans[vlan] }}.{{ vlan }}
57           use_interfaces:
58             - {{ vlans[vlan] }}
59     {%- endif %}
60 {%- endfor %}
61
62         br-ctl:
63           enabled: true
64           type: bridge
65           proto: static
66           address: ${_param:single_address}
67           netmask: 255.255.255.0
68           use_interfaces:
69             - {{ nm.cmp001.nic_mgmt }}{% if nm.vlan_mgmt | int > 0 %}.{{ nm.vlan_mgmt }}{% endif %}
70         br-floating:
71           enabled: true
72           type: ovs_bridge
73           mtu: ${_param:interface_mtu}
74           proto: static
75           address: ${_param:external_address}
76           netmask: ${_param:opnfv_net_public_mask}
77           route:
78             public:
79               address: 0.0.0.0
80               netmask: 0.0.0.0
81               gateway: ${_param:opnfv_net_public_gw}
82         ovs_port_{{ nm.cmp001.nic_public }}:
83           enabled: true
84           name: {{ nm.cmp001.nic_public }}{% if nm.vlan_public | int > 0 %}.{{ nm.vlan_public }}{% endif %}
85           proto: manual
86           ovs_port_type: OVSPort
87           type: ovs_port
88           ovs_bridge: br-floating
89           bridge: br-floating