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