[MaaS] Implement aarch64 tags for kernel_opts
[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     mcpcontrol_interface: ${_param:opnfv_fn_vm_primary_interface}
20     primary_interface: ${_param:opnfv_fn_vm_secondary_interface}
21     pxe_admin_interface: ${_param:opnfv_fn_vm_tertiary_interface}
22     linux_system_codename: xenial
23     maas_admin_username: opnfv
24     dns_server01: '{{ nm.dns_public[0] }}'
25     pxe_admin_address: ${_param:infra_maas_node01_deploy_address}
26     single_address: ${_param:pxe_admin_address}
27     hwe_kernel: 'hwe-16.04'
28     opnfv_maas_timeout_comissioning: {{ nm.maas_timeout_comissioning }}
29     opnfv_maas_timeout_deploying: {{ nm.maas_timeout_deploying }}
30   maas:
31     region:
32 {%- if '-ovs-' in conf.MCP_DEPLOY_SCENARIO or '-fdio-' in conf.MCP_DEPLOY_SCENARIO %}
33       tags:
34         aarch64_hugepages_1g:
35           comment: 'Enable 1G pagesizes on aarch64'
36           definition: '//capability[@id="asimd"]'
37           kernel_opts: 'default_hugepagesz=1G hugepagesz=1G'
38 {%- endif %}
39       boot_sources_delete_all_others: true
40       boot_sources:
41         resources_mirror:
42           url: http://images.maas.io/ephemeral-v3/daily
43           keyring_file: /usr/share/keyrings/ubuntu-cloudimage-keyring.gpg
44       boot_sources_selections:
45         xenial:
46           url: "http://images.maas.io/ephemeral-v3/daily"
47           os: "ubuntu"
48           release: "${_param:linux_system_codename}"
49           arches:
50 {%- for arch in nm.cluster.arch %}
51             - "{{ arch | dpkg_arch }}"
52 {%- endfor %}
53           subarches:
54             - "generic"
55             - "ga-16.04"
56             - "hwe-16.04"
57           labels: '"*"'
58       fabrics:
59         pxe_admin:
60           name: 'pxe_admin'
61           description: Fabric for PXE/admin
62           vlans:
63             0:
64               name: 'vlan 0'
65               description: PXE/admin VLAN
66               dhcp: true
67               primary_rack: "${linux:network:hostname}"
68       subnets:
69         {{ nm.net_admin }}:
70           name: {{ nm.net_admin }}
71           cidr: {{ nm.net_admin }}
72           gateway_ip: ${_param:single_address}
73           fabric: ${maas:region:fabrics:pxe_admin:name}
74           vlan: 0
75           ipranges:
76             1:
77               start: {{ nm.net_admin_pool_start }}
78               end: {{ nm.net_admin_pool_end }}
79               type: dynamic
80       sshprefs:
81         - '{{ conf.MAAS_SSH_KEY }}'
82 {%- if 'aarch64' in nm.cluster.arch %}
83       package_repositories:
84         armband:
85           name: armband
86           enabled: '1'
87           url: 'http://linux.enea.com/mcp-repos/${_param:openstack_version}/${_param:linux_system_codename}'
88           distributions: '${_param:openstack_version}-armband'
89           components: 'main'
90           arches: 'arm64'
91           key: ${_param:armband_key}
92 {%- endif %}
93       salt_master_ip: ${_param:reclass_config_master}
94       domain: ${_param:cluster_domain}
95       ~maas_config:
96         maas_name: mas01
97         active_discovery_interval: 600
98         ntp_external_only: true
99         upstream_dns: ${_param:dns_server01}
100         commissioning_distro_series: 'xenial'
101         default_distro_series: 'xenial'
102         default_osystem: 'ubuntu'
103         default_storage_layout: 'lvm'
104         enable_http_proxy: true
105         disk_erase_with_secure_erase: false
106         dnssec_validation: 'no'
107         enable_third_party_drivers: true
108         network_discovery: 'enabled'
109         default_min_hwe_kernel: ${_param:hwe_kernel}
110     cluster:
111       saltstack_repo_xenial: "deb [arch=amd64] http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2017.7/ xenial main"
112   linux:
113     network:
114       interface:
115         mcpcontrol_interface:
116           enabled: true
117           name: ${_param:mcpcontrol_interface}
118           type: eth
119           proto: dhcp
120           mtu: ${_param:interface_mtu}
121         primary_interface:
122           enabled: true
123           name: ${_param:primary_interface}
124           type: eth
125 {%- if conf.idf.fuel.jumphost.get('trunks', {}).get('mgmt', False) and (nm.vlan_mgmt | int > 0) %}
126           proto: manual
127           mtu: ${_param:interface_mtu}
128         primary_interface_vlan:
129           enabled: true
130           type: vlan
131           name: ${_param:primary_interface}.{{ nm.vlan_mgmt }}
132           use_interfaces:
133             - ${_param:primary_interface}
134 {%- endif %}
135           proto: static
136           mtu: ${_param:interface_mtu}
137           address: ${_param:infra_maas_node01_address}
138           netmask: ${_param:opnfv_net_mgmt_mask}
139         pxe_admin_interface:
140           enabled: true
141           name: ${_param:pxe_admin_interface}
142           # MaaS has issues using MTU > 1500 for PXE interface
143           mtu: 1500
144           proto: static
145           address: ${_param:single_address}
146           netmask: ${_param:opnfv_net_admin_mask}
147           type: eth