f1bdf01d0e6ee94a56eabeb9ca6e3d6ade1b9da8
[fuel.git] / mcp / reclass / classes / cluster / mcp-common-ha / infra / kvm.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 {%- import 'net_map.j2' as nm with context %}
9 ---
10 classes:
11   - system.linux.system.repo.glusterfs
12   - service.keepalived.cluster.single
13   - system.glusterfs.server.volume.glance
14   - system.glusterfs.server.volume.keystone
15   - system.glusterfs.server.cluster
16   - system.salt.control.virt
17   - system.salt.control.cluster.openstack_control_cluster
18   - system.salt.control.cluster.openstack_proxy_cluster
19   - system.salt.control.cluster.openstack_database_cluster
20   - system.salt.control.cluster.openstack_message_queue_cluster
21   - system.salt.control.cluster.openstack_telemetry_cluster
22   # - system.salt.control.cluster.stacklight_server_cluster
23   # - system.salt.control.cluster.stacklight_log_cluster
24   # - system.salt.control.cluster.stacklight_telemetry_cluster
25   - cluster.mcp-common-ha.infra.kvm_pdf
26   - cluster.all-mcp-arch-common.opnfv.maas_proxy
27   - cluster.all-mcp-arch-common.opnfv.lab_proxy_pdf
28 parameters:
29   _param:
30     linux_system_codename: xenial
31     glusterfs_version: '3.13'
32     cluster_vip_address: ${_param:infra_kvm_address}
33     cluster_node01_address: ${_param:infra_kvm_node01_address}
34     cluster_node02_address: ${_param:infra_kvm_node02_address}
35     cluster_node03_address: ${_param:infra_kvm_node03_address}
36     keepalived_vip_interface: br-ctl
37     keepalived_vip_virtual_router_id: 69
38   linux:
39     system:
40       kernel:
41         boot_options:
42           - spectre_v2=off
43           - nopti
44   libvirt:
45     server:
46       service: libvirtd
47       config_sys: /etc/default/libvirtd
48       unix_sock_group: libvirt
49   salt:
50     control:
51       size:  # RAM 4096,8192,16384,32768,65536
52         # Default production sizing
53         openstack.control:
54           cpu: 4
55           ram: 12288
56           disk_profile: small
57           net_profile: default
58         openstack.database:
59           cpu: 4
60           ram: 6144
61           disk_profile: large
62           net_profile: default
63         openstack.message_queue:
64           cpu: 4
65           ram: 2048
66           disk_profile: small
67           net_profile: default
68         openstack.telemetry:
69           cpu: 2
70           ram: 3072
71           disk_profile: xxlarge
72           net_profile: default
73         # stacklight.log:
74         #   cpu: 2
75         #   ram: 4096
76         #   disk_profile: xxlarge
77         #   net_profile: default
78         # stacklight.server:
79         #   cpu: 2
80         #   ram: 4096
81         #   disk_profile: small
82         #   net_profile: default
83         # stacklight.telemetry:
84         #   cpu: 2
85         #   ram: 4096
86         #   disk_profile: xxlarge
87         #   net_profile: default
88         openstack.proxy:
89           cpu: 2
90           ram: 2048
91           disk_profile: small
92           net_profile: default_ext
93       cluster:
94         internal:
95           node:
96             mdb01: &salt_control_xenial_image_common_attr
97               image: ${_param:salt_control_xenial_image}
98 {%- if conf.nodes[nm.ctl01.idx].node.arch == 'aarch64' %}
99               machine: virt
100               cpu_mode: host-passthrough
101               loader:
102                 readonly: 'yes'
103                 type: pflash
104                 path: /usr/share/AAVMF/AAVMF_CODE.fd
105 {%- endif %}
106             mdb02:
107               <<: *salt_control_xenial_image_common_attr
108             mdb03:
109               <<: *salt_control_xenial_image_common_attr
110             ctl01:
111               <<: *salt_control_xenial_image_common_attr
112             ctl02:
113               <<: *salt_control_xenial_image_common_attr
114             ctl03:
115               <<: *salt_control_xenial_image_common_attr
116             dbs01:
117               <<: *salt_control_xenial_image_common_attr
118             dbs02:
119               <<: *salt_control_xenial_image_common_attr
120             dbs03:
121               <<: *salt_control_xenial_image_common_attr
122             msg01:
123               <<: *salt_control_xenial_image_common_attr
124             msg02:
125               <<: *salt_control_xenial_image_common_attr
126             msg03:
127               <<: *salt_control_xenial_image_common_attr
128             prx01:
129               <<: *salt_control_xenial_image_common_attr
130             prx02:
131               <<: *salt_control_xenial_image_common_attr
132               provider: kvm03.${_param:cluster_domain}
133   virt:
134     nic:
135       default:
136         eth1:
137           bridge: br-mgmt
138           model: virtio
139         eth0:
140           bridge: br-ctl
141           model: virtio
142       default_ext:
143         eth2:
144           bridge: br-mgmt
145           model: virtio
146         eth1:
147           bridge: br-ex
148           model: virtio
149         eth0:
150           bridge: br-ctl
151           model: virtio
152   glusterfs:
153     server:
154       service: glusterd
155       volumes:
156         nova_instances:
157           storage: /srv/glusterfs/nova_instances
158           replica: 3
159           bricks:
160             - ${_param:cluster_node01_address}:/srv/glusterfs/nova_instances
161             - ${_param:cluster_node02_address}:/srv/glusterfs/nova_instances
162             - ${_param:cluster_node03_address}:/srv/glusterfs/nova_instances
163           options:
164             cluster.readdir-optimize: 'True'
165             nfs.disable: 'True'
166             network.remote-dio: 'True'
167             cluster.favorite-child-policy: mtime
168             diagnostics.client-log-level: WARNING
169             diagnostics.brick-log-level: WARNING