a7e8fcde3ed1007c003493798ce5e7a600ae5ab4
[fuel.git] / mcp / reclass / classes / cluster / mcp-common-ha / openstack_control.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 ---
9 classes:
10   - system.linux.system.repo.mcp.mirror.v1.openstack
11   - system.linux.system.repo.glusterfs
12   - system.ceilometer.client
13   - system.memcached.server.single
14   - system.keystone.server.cluster
15   - system.keystone.server.wsgi
16   - system.glance.control.cluster
17   - system.nova.control.cluster
18   - system.cinder.control.cluster
19   - system.cinder.control.backend.lvm
20   - system.heat.server.cluster
21   - system.designate.server.cluster
22   - system.designate.server.backend.bind
23   - system.barbican.server.cluster
24   - system.apache.server.site.barbican
25   - service.barbican.server.plugin.simple_crypto
26   - system.apache.server.single
27   - system.bind.server.single
28   - system.haproxy.proxy.listen.openstack.placement
29   - system.glusterfs.client.cluster
30   - system.glusterfs.client.volume.glance
31   - system.glusterfs.client.volume.keystone
32 {%- if not conf.MCP_VCP %}
33   # sync from kvm
34   - service.keepalived.cluster.single
35   - system.glusterfs.server.volume.glance
36   - system.glusterfs.server.volume.keystone
37   - system.glusterfs.server.cluster
38   # NOTE(armband): Disabled for novcp
39   # - system.salt.control.virt
40   # - system.salt.control.cluster.openstack_control_cluster
41   # - system.salt.control.cluster.openstack_proxy_cluster
42   # - system.salt.control.cluster.openstack_database_cluster
43   # - system.salt.control.cluster.openstack_message_queue_cluster
44   # - system.salt.control.cluster.openstack_telemetry_cluster
45   # - system.salt.control.cluster.stacklight_server_cluster
46   # - system.salt.control.cluster.stacklight_log_cluster
47   # - system.salt.control.cluster.stacklight_telemetry_cluster
48   - cluster.mcp-common-ha.infra.kvm_pdf
49   - cluster.all-mcp-arch-common.opnfv.maas_proxy
50   - cluster.all-mcp-arch-common.opnfv.lab_proxy_pdf
51 {%- endif %}
52 parameters:
53   _param:
54 {%- if not conf.MCP_VCP %}
55     linux_system_codename: xenial  # sync from kvm
56     # For NOVCP, we switch keepalived VIPs, to keep cluster_vip_address in ctl
57     single_nic: br-ctl  # for keepalive_vip_interface interpolation
58     control_nic: ~      # Dummy value to keep reclass 1.5.2 happy
59     keepalived_openstack_web_public_vip_address: ${_param:openstack_proxy_address}
60     keepalived_openstack_web_public_vip_interface: br-ex
61 {%- endif %}
62     keepalived_vip_interface: ${_param:single_nic}
63     keepalived_vip_virtual_router_id: 50
64     cluster_vip_address: ${_param:openstack_control_address}
65     cluster_local_address: ${_param:single_address}
66     cluster_node01_hostname: ${_param:openstack_control_node01_hostname}
67     cluster_node01_address: ${_param:openstack_control_node01_address}
68     cluster_node02_hostname: ${_param:openstack_control_node02_hostname}
69     cluster_node02_address: ${_param:openstack_control_node02_address}
70     cluster_node03_hostname: ${_param:openstack_control_node03_hostname}
71     cluster_node03_address: ${_param:openstack_control_node03_address}
72     nova_vncproxy_url: https://${_param:cluster_public_host}:6080
73     glusterfs_version: '3.13'
74     barbican_integration_enabled: 'false'
75   nova:
76     controller: &db_conn_recycle_time
77       database:
78         connection_recycle_time: ${_param:db_connection_recycle_time}
79       barbican:
80         enabled: ${_param:barbican_integration_enabled}
81   cinder:
82     controller:
83       <<: *db_conn_recycle_time
84   neutron:
85     server:
86       <<: *db_conn_recycle_time
87       vlan_aware_vms: true
88       root_helper_daemon: false
89   keystone:
90     server:
91       <<: *db_conn_recycle_time
92       cacert: /etc/ssl/certs/mcp_os_cacert
93       openrc_extra:
94         volume_device_name: vdc
95   glance:
96     server:
97       <<: *db_conn_recycle_time
98 {%- if conf.MCP_VCP %}
99   heat:
100     server:
101       <<: *db_conn_recycle_time
102       metadata:
103         host: ${_param:openstack_proxy_control_address}
104         port: 8000
105         protocol: http
106       waitcondition:
107         host: ${_param:openstack_proxy_control_address}
108         port: 8000
109         protocol: http
110       watch:
111         host: ${_param:openstack_proxy_control_address}
112         port: 8003
113         protocol: http
114 {%- else %}
115   libvirt:
116     server:
117       service: libvirtd
118       config_sys: /etc/default/libvirtd
119       unix_sock_group: libvirt
120   linux:
121     network:
122       # Add public IPs here as overrides, no need to fork another kvm_pdf.j2
123       interface:
124         br-ex:
125           address: ${_param:external_address}
126           proto: static
127   apache:
128     server:
129       bind:
130         listen_default_ports: false
131   # sync from common-ha kvm role
132   glusterfs:
133     server:
134       service: glusterd
135       volumes:
136         nova_instances:
137           storage: /srv/glusterfs/nova_instances
138           replica: 3
139           bricks:
140             - ${_param:cluster_node01_address}:/srv/glusterfs/nova_instances
141             - ${_param:cluster_node02_address}:/srv/glusterfs/nova_instances
142             - ${_param:cluster_node03_address}:/srv/glusterfs/nova_instances
143           options:
144             cluster.readdir-optimize: 'True'
145             nfs.disable: 'True'
146             network.remote-dio: 'True'
147             cluster.favorite-child-policy: mtime
148             diagnostics.client-log-level: WARNING
149             diagnostics.brick-log-level: WARNING
150 {%- endif %}
151   haproxy:
152     proxy:
153       listen:
154         heat_cloudwatch_api:
155           enabled: false
156         neutron_api:
157           # Set source balancing
158           type: heat
159   barbican:
160     server:
161       ks_notifications_enable: true
162       store:
163         software:
164           crypto_plugin: simple_crypto
165           store_plugin: store_crypto
166           global_default: true
167       database:
168         connection_recycle_time: ${_param:db_connection_recycle_time}
169         host: ${_param:openstack_database_address}
170   bind:
171     server:
172       control:
173         mgmt:
174           enabled: true
175           bind:
176             address: ${_param:single_address}
177             port: 953
178           allow:
179             - ${_param:openstack_control_node01_address}
180             - ${_param:openstack_control_node02_address}
181             - ${_param:openstack_control_node03_address}
182           keys:
183             - designate
184   designate:
185     server:
186       pools:
187         default:
188           description: 'test pool'
189           targets:
190             default:
191               description: 'test target1'
192             default1:
193               type: ${_param:designate_pool_target_type}
194               description: 'test target2'
195               masters: ${_param:designate_pool_target_masters}
196               options:
197                 host: ${_param:openstack_control_node02_address}
198                 port: 53
199                 rndc_host: ${_param:openstack_control_node02_address}
200                 rndc_port: 953
201                 rndc_key_file: /etc/designate/rndc.key
202             default2:
203               type: ${_param:designate_pool_target_type}
204               description: 'test target3'
205               masters: ${_param:designate_pool_target_masters}
206               options:
207                 host: ${_param:openstack_control_node03_address}
208                 port: 53
209                 rndc_host: ${_param:openstack_control_node03_address}
210                 rndc_port: 953
211                 rndc_key_file: /etc/designate/rndc.key