all: Pin Ubuntu kernel to 5.0.0-37 for Bionic
[fuel.git] / mcp / reclass / classes / cluster / all-mcp-arch-common / infra / maas.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 # NOTE: pod_config is generated and transferred into its final location on
11 # cfg01 only during deployment to prevent leaking sensitive data
12 classes:
13   - system.maas.region.single
14   - service.maas.cluster.single
15   - cluster.all-mcp-arch-common.opnfv.lab_proxy_pdf
16   - cluster.all-mcp-arch-common.opnfv.pod_config
17 parameters:
18   _param:
19     linux_system_codename: bionic
20     maas_admin_username: opnfv
21     dns_server01: '{{ nm.dns_public[0] }}'
22     single_address: ${_param:infra_maas_node01_deploy_address}
23     hwe_kernel: 'hwe-18.04'
24     opnfv_maas_timeout_comissioning: {{ nm.maas_timeout_comissioning }}
25     opnfv_maas_timeout_deploying: {{ nm.maas_timeout_deploying }}
26   maas:
27     region:
28 {%- if '-ovs-' in conf.MCP_DEPLOY_SCENARIO or '-fdio-' in conf.MCP_DEPLOY_SCENARIO %}
29       tags:
30         aarch64_hugepages_1g:
31           comment: 'Enable 1G pagesizes on aarch64'
32           definition: '//capability[@id="asimd"]|//capability[@id="cp15_barrier"]'
33           kernel_opts: 'default_hugepagesz=1G hugepagesz=1G'
34 {%- endif %}
35       timeout:
36         # Set maas.wait_for_<state> timeouts to ~2.5x of MaaS <state> timeout
37         ready: {{ nm.maas_timeout_comissioning * 150 }}
38         deployed: {{ nm.maas_timeout_deploying * 150 }}
39         attempts: 3
40       boot_sources_delete_all_others: true
41       boot_sources:
42         resources_mirror:
43           url: http://images.maas.io/ephemeral-v3/daily
44           keyring_file: /usr/share/keyrings/ubuntu-cloudimage-keyring.gpg
45       boot_sources_selections:
46         bionic:
47           url: "http://images.maas.io/ephemeral-v3/daily"
48           os: "ubuntu"
49           release: "${_param:linux_system_codename}"
50           arches:
51 {%- for arch in nm.cluster.arch %}
52             - "{{ arch | dpkg_arch }}"
53 {%- endfor %}
54           subarches:
55             - "generic"
56             - "ga-18.04"
57             - "hwe-18.04"
58           labels: '"*"'
59       fabrics:
60         pxe_admin:
61           name: 'pxe_admin'
62           description: Fabric for PXE/admin
63           vlans:
64             0:
65               name: 'vlan 0'
66               description: PXE/admin VLAN
67               dhcp: true
68               primary_rack: "${linux:network:hostname}"
69       subnets:
70         {{ nm.net_admin }}:
71           name: {{ nm.net_admin }}
72           cidr: {{ nm.net_admin }}
73           gateway_ip: ${_param:single_address}
74           fabric: ${maas:region:fabrics:pxe_admin:name}
75           vlan: 0
76           ipranges:
77             1:
78               start: {{ nm.net_admin_pool_start }}
79               end: {{ nm.net_admin_pool_end }}
80               type: dynamic
81       sshprefs:
82         - '{{ conf.MAAS_SSH_KEY }}'
83 {%- if 'aarch64' in nm.cluster.arch %}
84       package_repositories:
85         armband:
86           name: armband
87           enabled: '1'
88           url: 'http://linux.enea.com/mcp-repos/${_param:armband_repo_version}/xenial'
89           distributions: '${_param:armband_repo_version}-armband'
90           components: 'main'
91           arches: 'arm64'
92           key: ${_param:armband_key}
93 {%- endif %}
94       salt_master_ip: ${_param:reclass_config_master}
95       domain: ${_param:cluster_domain}
96       ~maas_config:
97         maas_name: mas01
98         active_discovery_interval: 600
99         ntp_external_only: true
100         upstream_dns: ${_param:dns_server01}
101         commissioning_distro_series: 'bionic'
102         default_distro_series: 'bionic'
103         default_osystem: 'ubuntu'
104         default_storage_layout: 'lvm'
105         enable_http_proxy: true
106         disk_erase_with_secure_erase: false
107         dnssec_validation: 'no'
108         enable_third_party_drivers: true
109         network_discovery: 'enabled'
110         default_min_hwe_kernel: ${_param:hwe_kernel}
111     cluster:
112       saltstack_repo_bionic: "deb [arch=amd64] http://repo.saltstack.com/apt/ubuntu/18.04/amd64/2017.7/ bionic main"
113       region:
114         host: ${_param:single_address}
115         port: 5240
116 {%- if '-iec-' not in conf.MCP_DEPLOY_SCENARIO and conf.MCP_KERNEL_VER %}
117       curtin_vars:
118         amd64:
119           bionic: &curtin_vars_bionic
120             kernel_package:
121               enabled: True
122               value: 'linux-image-{{ conf.MCP_KERNEL_VER }}-generic'
123             extra_pkgs:
124               enabled: True
125               pkgs:
126                 - linux-image-{{ conf.MCP_KERNEL_VER }}-generic
127                 - linux-headers-{{ conf.MCP_KERNEL_VER }}-generic
128                 - linux-modules-extra-{{ conf.MCP_KERNEL_VER }}-generic
129         arm64:
130           bionic:
131             <<: *curtin_vars_bionic
132 {%- endif %}
133   linux:
134     system:
135       repo:
136         armband_3:
137           enabled: false
138       ~locale: ''
139       ~kernel:
140         sysctl:
141           net.ipv4.ip_forward: 1
142   iptables:
143     schema:
144       epoch: 1
145     service:
146       v4:
147         enabled: true
148         persistent_config: /etc/iptables/rules.v4
149       v6:
150         enabled: false
151     tables:
152       v4:
153         filter:
154           chains:
155             INPUT:
156               ruleset:
157                 10:
158                   rule: -s ${_param:single_address}/${_param:opnfv_net_admin_mask}
159                 11:
160                   rule: -d ${_param:single_address}/${_param:opnfv_net_admin_mask}
161         nat:
162           chains:
163             POSTROUTING:
164               policy: ACCEPT
165               ruleset:
166                 10:
167                   rule: -s ${_param:single_address}/${_param:opnfv_net_admin_mask}
168                   action: MASQUERADE