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