summaryrefslogtreecommitdiffstats
path: root/mcp/reclass/classes/cluster/mcp-common-ha/infra
diff options
context:
space:
mode:
authorMichael Polenchuk <mpolenchuk@mirantis.com>2018-06-07 17:19:27 +0400
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-06-07 20:52:23 +0200
commitbf341b7e0d7e423044827f379e4b180e9dc897a1 (patch)
tree948e8fc07d7dedfca428e8264196ec0f3b0c4641 /mcp/reclass/classes/cluster/mcp-common-ha/infra
parentafae8d4d99d962448eb62cdd306f7a3dcda83744 (diff)
[ha] Update OpenStack version to Queens
* make cluster names version-agnostic * switch to mirror.mirantis.com * system reclass update Change-Id: I96394b3c9d8d38321289af8e3a4e8bbc5dd7a408 Signed-off-by: Michael Polenchuk <mpolenchuk@mirantis.com>
Diffstat (limited to 'mcp/reclass/classes/cluster/mcp-common-ha/infra')
-rw-r--r--mcp/reclass/classes/cluster/mcp-common-ha/infra/config.yml173
-rw-r--r--mcp/reclass/classes/cluster/mcp-common-ha/infra/init.yml.j2112
-rw-r--r--mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml160
-rw-r--r--mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm_pdf.yml.j266
-rw-r--r--mcp/reclass/classes/cluster/mcp-common-ha/infra/maas.yml69
-rw-r--r--mcp/reclass/classes/cluster/mcp-common-ha/infra/maas_pdf.yml.j294
6 files changed, 674 insertions, 0 deletions
diff --git a/mcp/reclass/classes/cluster/mcp-common-ha/infra/config.yml b/mcp/reclass/classes/cluster/mcp-common-ha/infra/config.yml
new file mode 100644
index 000000000..f626ecea4
--- /dev/null
+++ b/mcp/reclass/classes/cluster/mcp-common-ha/infra/config.yml
@@ -0,0 +1,173 @@
+##############################################################################
+# Copyright (c) 2018 Mirantis Inc., Enea AB and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+classes:
+ - service.git.client
+ - system.linux.system.single
+ - system.linux.system.repo.mcp.salt
+ - system.linux.system.repo.saltstack.xenial
+ - system.salt.master.api
+ - system.salt.master.pkg
+ - system.salt.minion.ca.salt_master
+ - system.reclass.storage.salt
+ - system.reclass.storage.system.physical_control_cluster
+ - system.reclass.storage.system.openstack_control_cluster
+ - system.reclass.storage.system.openstack_proxy_cluster
+ - system.reclass.storage.system.openstack_database_cluster
+ - system.reclass.storage.system.openstack_message_queue_cluster
+ - system.reclass.storage.system.openstack_telemetry_cluster
+ # - system.reclass.storage.system.stacklight_log_cluster
+ # - system.reclass.storage.system.stacklight_monitor_cluster
+ # - system.reclass.storage.system.stacklight_telemetry_cluster
+ - system.reclass.storage.system.infra_maas_single
+ - cluster.mcp-common-ha.include.lab_proxy_pdf
+parameters:
+ _param:
+ salt_master_base_environment: prd
+ reclass_data_repository: local
+ salt_master_environment_repository: "https://github.com/tcpcloud"
+ salt_master_environment_revision: master
+ single_address: ${_param:infra_config_address}
+ deploy_address: ${_param:infra_config_deploy_address}
+ pxe_address: ${_param:opnfv_infra_config_pxe_address}
+ salt_master_host: ${_param:infra_config_deploy_address}
+ # yamllint disable rule:line-length
+ salt_api_password_hash: "$6$sGnRlxGf$al5jMCetLP.vfI/fTl3Z0N7Za1aeiexL487jAtyRABVfT3NlwZxQGVhO7S1N8OwS/34VHYwZQA8lkXwKMN/GS1"
+ dhcp_nic: ${_param:opnfv_fn_vm_primary_interface}
+ single_nic: ${_param:opnfv_fn_vm_secondary_interface}
+ pxe_nic: ${_param:opnfv_fn_vm_tertiary_interface}
+ linux:
+ network:
+ interface:
+ dhcp:
+ enabled: true
+ type: eth
+ proto: dhcp
+ name: ${_param:dhcp_nic}
+ single:
+ enabled: true
+ type: eth
+ proto: static
+ name: ${_param:single_nic}
+ address: ${_param:single_address}
+ netmask: 255.255.255.0
+ pxe:
+ enabled: true
+ type: eth
+ proto: static
+ name: ${_param:pxe_nic}
+ address: ${_param:pxe_address}
+ netmask: 255.255.255.0
+ salt:
+ master:
+ accept_policy: open_mode
+ file_recv: true
+ reclass:
+ storage:
+ data_source:
+ engine: local
+ node:
+ infra_kvm_node01:
+ params:
+ keepalived_vip_priority: 100
+ linux_system_codename: xenial
+ infra_kvm_node02:
+ params:
+ keepalived_vip_priority: 101
+ linux_system_codename: xenial
+ infra_kvm_node03:
+ params:
+ keepalived_vip_priority: 102
+ linux_system_codename: xenial
+ openstack_telemetry_node01:
+ params:
+ linux_system_codename: xenial
+ # create resources only from 1 controller
+ # to prevent race conditions
+ ceilometer_create_gnocchi_resources: true
+ redis_cluster_role: 'master'
+ openstack_telemetry_node02:
+ params:
+ linux_system_codename: xenial
+ redis_cluster_role: 'slave'
+ openstack_telemetry_node03:
+ params:
+ linux_system_codename: xenial
+ redis_cluster_role: 'slave'
+ openstack_message_queue_node01:
+ params:
+ linux_system_codename: xenial
+ openstack_message_queue_node02:
+ params:
+ linux_system_codename: xenial
+ openstack_message_queue_node03:
+ params:
+ linux_system_codename: xenial
+ openstack_proxy_node01:
+ params:
+ linux_system_codename: xenial
+ openstack_proxy_node02:
+ params:
+ linux_system_codename: xenial
+ # stacklight_log_node01:
+ # classes:
+ # - system.elasticsearch.client.single
+ # stacklight_monitor_node01:
+ # classes:
+ # - system.grafana.client.single
+ # - system.kibana.client.single
+ openstack_control_node01:
+ classes:
+ - cluster.mcp-common-ha.openstack_control_init
+ params:
+ linux_system_codename: xenial
+ # NOTE: When VCP is present, external_address is not used
+ external_address: ${_param:openstack_proxy_node01_address}
+ openstack_control_node02:
+ params:
+ linux_system_codename: xenial
+ external_address: 0.0.0.0
+ openstack_control_node03:
+ params:
+ linux_system_codename: xenial
+ external_address: ${_param:openstack_proxy_node02_address}
+ openstack_database_node01:
+ classes:
+ - cluster.mcp-common-ha.openstack_database_init
+ params:
+ linux_system_codename: xenial
+ openstack_database_node02:
+ params:
+ linux_system_codename: xenial
+ openstack_database_node03:
+ params:
+ linux_system_codename: xenial
+ openstack_compute_node01:
+ name: ${_param:openstack_compute_node01_hostname}
+ domain: ${_param:cluster_domain}
+ classes:
+ - cluster.${_param:cluster_name}.openstack.compute
+ params:
+ salt_master_host: ${_param:reclass_config_master}
+ linux_system_codename: xenial
+ control_address: ${_param:openstack_compute_node01_control_address}
+ single_address: ${_param:openstack_compute_node01_single_address}
+ tenant_address: ${_param:openstack_compute_node01_tenant_address}
+ external_address: ${_param:openstack_compute_node01_external_address}
+ openstack_compute_node02:
+ name: ${_param:openstack_compute_node02_hostname}
+ domain: ${_param:cluster_domain}
+ classes:
+ - cluster.${_param:cluster_name}.openstack.compute
+ params:
+ salt_master_host: ${_param:reclass_config_master}
+ linux_system_codename: xenial
+ control_address: ${_param:openstack_compute_node02_control_address}
+ single_address: ${_param:openstack_compute_node02_single_address}
+ tenant_address: ${_param:openstack_compute_node02_tenant_address}
+ external_address: ${_param:openstack_compute_node02_external_address}
diff --git a/mcp/reclass/classes/cluster/mcp-common-ha/infra/init.yml.j2 b/mcp/reclass/classes/cluster/mcp-common-ha/infra/init.yml.j2
new file mode 100644
index 000000000..d4927428f
--- /dev/null
+++ b/mcp/reclass/classes/cluster/mcp-common-ha/infra/init.yml.j2
@@ -0,0 +1,112 @@
+##############################################################################
+# Copyright (c) 2018 Mirantis Inc., Enea AB and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+classes:
+ - system.linux.system.single
+ - cluster.all-mcp-arch-common
+ # - cluster.mcp-common-ha.stacklight
+ # - cluster.mcp-common-ha.stacklight.client
+parameters:
+ _param:
+ apt_mk_version: nightly
+ mcp_repo_version: 1.1
+ salt_version: 2017.7
+ cluster_domain: ${_param:cluster_name}.local
+ # stacklight_environment: ${_param:cluster_domain}
+ reclass_data_revision: master
+ reclass_config_master: ${_param:opnfv_infra_config_pxe_address}
+ cluster_public_host: ${_param:openstack_proxy_address}
+ infra_config_hostname: cfg01
+ infra_maas_database_password: opnfv_secret
+
+ # infra service addresses
+ infra_config_address: ${_param:opnfv_infra_config_address}
+ infra_config_deploy_address: ${_param:opnfv_salt_master_ip}
+ infra_maas_node01_address: ${_param:opnfv_infra_maas_node01_address}
+ infra_maas_node01_deploy_address: ${_param:opnfv_infra_maas_node01_deploy_address}
+
+ infra_kvm_address: ${_param:opnfv_infra_kvm_address}
+{%- if conf.MCP_VCP %}
+ infra_kvm_node01_address: ${_param:opnfv_infra_kvm_node01_address}
+ infra_kvm_node02_address: ${_param:opnfv_infra_kvm_node02_address}
+ infra_kvm_node03_address: ${_param:opnfv_infra_kvm_node03_address}
+{%- else %}
+ # For NOVCP, we override kvm addresses to overlap with ctl
+ infra_kvm_node01_address: ${_param:openstack_control_node01_address}
+ infra_kvm_node02_address: ${_param:openstack_control_node02_address}
+ infra_kvm_node03_address: ${_param:openstack_control_node03_address}
+{%- endif %}
+
+ infra_maas_node01_hostname: mas01
+ infra_kvm_node01_hostname: kvm01
+ infra_kvm_node02_hostname: kvm02
+ infra_kvm_node03_hostname: kvm03
+
+ ntp_strata_host1: 1.pool.ntp.org
+ ntp_strata_host2: 0.pool.ntp.org
+
+ # Interface definitions
+ reclass:
+ storage:
+ node:
+ name: default
+
+ # yamllint disable-line rule:line-length
+ salt_api_password_hash: "$6$WV0P1shnoDh2gI/Z$22/Bcd7ffMv0jDlFpT63cAU4PiXHz9pjXwngToKwqAsgoeK4HNR3PiKaushjxp3JsQ8hNoJmAC6TxzVqfV8WH/"
+ reclass:
+ storage:
+ node:
+ openstack_proxy_node01:
+ params:
+ control_address: ${_param:openstack_proxy_node01_control_address}
+ openstack_proxy_node02:
+ params:
+ control_address: ${_param:openstack_proxy_node02_control_address}
+ linux:
+ system:
+ apt:
+ config:
+ prefer_ipv4:
+ Acquire::ForceIPv4: true
+ user:
+ ubuntu:
+ enabled: true
+ sudo: true
+ home: /home/ubuntu
+ network:
+ host:
+ cfg01:
+ address: ${_param:infra_config_address}
+ names:
+ - cfg01
+ - cfg01.${_param:cluster_domain}
+ cfg:
+ address: ${_param:infra_config_address}
+ names:
+ - ${_param:infra_config_hostname}
+ - ${_param:infra_config_hostname}.${_param:cluster_domain}
+ mas01:
+ address: ${_param:infra_maas_node01_address}
+ names:
+ - ${_param:infra_maas_node01_hostname}
+ - ${_param:infra_maas_node01_hostname}.${_param:cluster_domain}
+ kvm01:
+ address: ${_param:infra_kvm_node01_address}
+ names:
+ - ${_param:infra_kvm_node01_hostname}
+ - ${_param:infra_kvm_node01_hostname}.${_param:cluster_domain}
+ kvm02:
+ address: ${_param:infra_kvm_node02_address}
+ names:
+ - ${_param:infra_kvm_node02_hostname}
+ - ${_param:infra_kvm_node02_hostname}.${_param:cluster_domain}
+ kvm03:
+ address: ${_param:infra_kvm_node03_address}
+ names:
+ - ${_param:infra_kvm_node03_hostname}
+ - ${_param:infra_kvm_node03_hostname}.${_param:cluster_domain}
diff --git a/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml
new file mode 100644
index 000000000..868f324f6
--- /dev/null
+++ b/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml
@@ -0,0 +1,160 @@
+##############################################################################
+# Copyright (c) 2018 Mirantis Inc., Enea AB and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+classes:
+ - system.linux.system.repo.glusterfs
+ - service.keepalived.cluster.single
+ - system.glusterfs.server.volume.glance
+ - system.glusterfs.server.volume.keystone
+ - system.glusterfs.server.cluster
+ - system.salt.control.virt
+ - system.salt.control.cluster.openstack_control_cluster
+ - system.salt.control.cluster.openstack_proxy_cluster
+ - system.salt.control.cluster.openstack_database_cluster
+ - system.salt.control.cluster.openstack_message_queue_cluster
+ - system.salt.control.cluster.openstack_telemetry_cluster
+ # - system.salt.control.cluster.stacklight_server_cluster
+ # - system.salt.control.cluster.stacklight_log_cluster
+ # - system.salt.control.cluster.stacklight_telemetry_cluster
+ - cluster.mcp-common-ha.infra.kvm_pdf
+ - cluster.mcp-common-ha.include.maas_proxy
+ - cluster.mcp-common-ha.include.lab_proxy_pdf
+parameters:
+ _param:
+ linux_system_codename: xenial
+ glusterfs_version: '3.13'
+ cluster_vip_address: ${_param:infra_kvm_address}
+ cluster_node01_address: ${_param:infra_kvm_node01_address}
+ cluster_node02_address: ${_param:infra_kvm_node02_address}
+ cluster_node03_address: ${_param:infra_kvm_node03_address}
+ keepalived_vip_interface: br-ctl
+ keepalived_vip_virtual_router_id: 69
+ linux:
+ system:
+ kernel:
+ boot_options:
+ - spectre_v2=off
+ - nopti
+ libvirt:
+ server:
+ service: libvirtd
+ config_sys: /etc/default/libvirtd
+ unix_sock_group: libvirt
+ salt:
+ control:
+ size: # RAM 4096,8192,16384,32768,65536
+ # Default production sizing
+ openstack.control:
+ cpu: 4
+ ram: 12288
+ disk_profile: small
+ net_profile: default
+ openstack.database:
+ cpu: 4
+ ram: 6144
+ disk_profile: large
+ net_profile: default
+ openstack.message_queue:
+ cpu: 4
+ ram: 2048
+ disk_profile: small
+ net_profile: default
+ openstack.telemetry:
+ cpu: 2
+ ram: 3072
+ disk_profile: xxlarge
+ net_profile: default
+ # stacklight.log:
+ # cpu: 2
+ # ram: 4096
+ # disk_profile: xxlarge
+ # net_profile: default
+ # stacklight.server:
+ # cpu: 2
+ # ram: 4096
+ # disk_profile: small
+ # net_profile: default
+ # stacklight.telemetry:
+ # cpu: 2
+ # ram: 4096
+ # disk_profile: xxlarge
+ # net_profile: default
+ openstack.proxy:
+ cpu: 2
+ ram: 2048
+ disk_profile: small
+ net_profile: default_ext
+ cluster:
+ internal:
+ node:
+ mdb01:
+ image: ${_param:salt_control_xenial_image}
+ mdb02:
+ image: ${_param:salt_control_xenial_image}
+ mdb03:
+ image: ${_param:salt_control_xenial_image}
+ ctl01:
+ image: ${_param:salt_control_xenial_image}
+ ctl02:
+ image: ${_param:salt_control_xenial_image}
+ ctl03:
+ image: ${_param:salt_control_xenial_image}
+ dbs01:
+ image: ${_param:salt_control_xenial_image}
+ dbs02:
+ image: ${_param:salt_control_xenial_image}
+ dbs03:
+ image: ${_param:salt_control_xenial_image}
+ msg01:
+ image: ${_param:salt_control_xenial_image}
+ msg02:
+ image: ${_param:salt_control_xenial_image}
+ msg03:
+ image: ${_param:salt_control_xenial_image}
+ prx01:
+ image: ${_param:salt_control_xenial_image}
+ prx02:
+ image: ${_param:salt_control_xenial_image}
+ provider: kvm03.${_param:cluster_domain}
+ virt:
+ nic:
+ default:
+ eth1:
+ bridge: br-mgmt
+ model: virtio
+ eth0:
+ bridge: br-ctl
+ model: virtio
+ default_ext:
+ eth2:
+ bridge: br-mgmt
+ model: virtio
+ eth1:
+ bridge: br-ex
+ model: virtio
+ eth0:
+ bridge: br-ctl
+ model: virtio
+ glusterfs:
+ server:
+ service: glusterd
+ volumes:
+ nova_instances:
+ storage: /srv/glusterfs/nova_instances
+ replica: 3
+ bricks:
+ - ${_param:cluster_node01_address}:/srv/glusterfs/nova_instances
+ - ${_param:cluster_node02_address}:/srv/glusterfs/nova_instances
+ - ${_param:cluster_node03_address}:/srv/glusterfs/nova_instances
+ options:
+ cluster.readdir-optimize: 'True'
+ nfs.disable: 'True'
+ network.remote-dio: 'True'
+ cluster.favorite-child-policy: mtime
+ diagnostics.client-log-level: WARNING
+ diagnostics.brick-log-level: WARNING
diff --git a/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm_pdf.yml.j2 b/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm_pdf.yml.j2
new file mode 100644
index 000000000..97166c62c
--- /dev/null
+++ b/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm_pdf.yml.j2
@@ -0,0 +1,66 @@
+##############################################################################
+# Copyright (c) 2018 Mirantis Inc., Enea AB and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+{#- NOTE: br-{mgmt,ctl} are cross-referenced, careful when changing names #}
+{%- import 'net_map.j2' as nm with context %}
+{#- Filter-out NIC duplicates by constructing a dict (used NICs only) #}
+{%- set nics = { nm.ctl01.nic_admin: True, nm.ctl01.nic_mgmt: True, nm.ctl01.nic_public: True } %}
+{%- set vlans = { nm.vlan_admin: nm.ctl01.nic_admin, nm.vlan_mgmt: nm.ctl01.nic_mgmt, nm.vlan_public: nm.ctl01.nic_public } %}
+---
+parameters:
+ linux:
+ network:
+ interface:
+{%- for nic in nics %}
+ {{ nic }}:
+ enabled: true
+ type: eth
+ proto: manual
+ address: 0.0.0.0
+ netmask: 255.255.255.0
+ name: {{ nic }}
+ noifupdown: true
+{%- endfor %}
+
+{%- for vlan in vlans %}
+ {%- if vlan | int > 0 %}
+ {{ vlans[vlan] }}.{{ vlan }}:
+ enabled: true
+ proto: manual
+ type: vlan
+ name: {{ vlans[vlan] }}.{{ vlan }}
+ use_interfaces:
+ - {{ vlans[vlan] }}
+ noifupdown: true
+ {%- endif %}
+{%- endfor %}
+
+ br-mgmt:
+ enabled: true
+ proto: dhcp
+ type: bridge
+ use_interfaces:
+ - {{ nm.ctl01.nic_admin }}{% if nm.vlan_admin | int > 0 %}.{{ nm.vlan_admin }}{% endif %}
+ noifupdown: true
+ br-ctl:
+ enabled: true
+ type: bridge
+ proto: static
+ address: ${_param:single_address}
+ netmask: 255.255.255.0
+ use_interfaces:
+ - {{ nm.ctl01.nic_mgmt }}{% if nm.vlan_mgmt | int > 0 %}.{{ nm.vlan_mgmt }}{% endif %}
+ noifupdown: true
+ br-ex:
+ enabled: true
+ proto: manual
+ address: 0.0.0.0
+ netmask: ${_param:opnfv_net_public_mask}
+ type: bridge
+ use_interfaces:
+ - {{ nm.ctl01.nic_public }}{% if nm.vlan_public | int > 0 %}.{{ nm.vlan_public }}{% endif %}
+ noifupdown: true
diff --git a/mcp/reclass/classes/cluster/mcp-common-ha/infra/maas.yml b/mcp/reclass/classes/cluster/mcp-common-ha/infra/maas.yml
new file mode 100644
index 000000000..8c8f4f659
--- /dev/null
+++ b/mcp/reclass/classes/cluster/mcp-common-ha/infra/maas.yml
@@ -0,0 +1,69 @@
+##############################################################################
+# Copyright (c) 2018 Mirantis Inc., Enea AB and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+---
+classes:
+ - system.maas.region.single
+ - service.maas.cluster.single
+ - cluster.mcp-common-ha.include.lab_proxy_pdf
+ - cluster.mcp-common-ha.infra.maas_pdf
+parameters:
+ _param:
+ dhcp_interface: ${_param:opnfv_fn_vm_primary_interface}
+ primary_interface: ${_param:opnfv_fn_vm_secondary_interface}
+ pxe_interface: ${_param:opnfv_fn_vm_tertiary_interface}
+ interface_mtu: 1500
+ # MaaS has issues using MTU > 1500 for PXE interface
+ pxe_interface_mtu: 1500
+ linux_system_codename: xenial
+ maas_admin_username: opnfv
+ maas_admin_password: opnfv_secret
+ maas_db_password: opnfv_secret
+ dns_server01: ${_param:opnfv_dns_server01}
+ single_address: ${_param:infra_maas_node01_deploy_address}
+ hwe_kernel: 'hwe-16.04'
+ maas:
+ region:
+ salt_master_ip: ${_param:reclass_config_master}
+ domain: ${_param:cluster_domain}
+ maas_config:
+ commissioning_distro_series: 'xenial'
+ default_distro_series: 'xenial'
+ default_osystem: 'ubuntu'
+ default_storage_layout: 'lvm'
+ enable_http_proxy: true
+ disk_erase_with_secure_erase: false
+ dnssec_validation: 'no'
+ enable_third_party_drivers: true
+ network_discovery: 'enabled'
+ default_min_hwe_kernel: ${_param:hwe_kernel}
+ cluster:
+ saltstack_repo_xenial: "http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2017.7/ xenial main"
+ linux:
+ network:
+ interface:
+ dhcp_interface:
+ enabled: true
+ name: ${_param:dhcp_interface}
+ type: eth
+ proto: dhcp
+ primary_interface:
+ enabled: true
+ name: ${_param:primary_interface}
+ mtu: ${_param:interface_mtu}
+ proto: static
+ address: ${_param:infra_maas_node01_address}
+ netmask: 255.255.255.0
+ type: eth
+ pxe_interface:
+ enabled: true
+ name: ${_param:pxe_interface}
+ mtu: ${_param:pxe_interface_mtu}
+ proto: static
+ address: ${_param:single_address}
+ netmask: 255.255.255.0
+ type: eth
diff --git a/mcp/reclass/classes/cluster/mcp-common-ha/infra/maas_pdf.yml.j2 b/mcp/reclass/classes/cluster/mcp-common-ha/infra/maas_pdf.yml.j2
new file mode 100644
index 000000000..1838590e9
--- /dev/null
+++ b/mcp/reclass/classes/cluster/mcp-common-ha/infra/maas_pdf.yml.j2
@@ -0,0 +1,94 @@
+##############################################################################
+# Copyright (c) 2018 Mirantis Inc., Enea AB and others.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+{%- set cluster_arch = [] %}
+{%- for node in conf.nodes %}
+ {%- if node.node.arch not in cluster_arch %}
+ {%- do cluster_arch.append(node.node.arch) %}
+ {%- endif %}
+{%- endfor %}
+{%- set net_admin = [conf.idf.net_config.admin.network,
+ conf.idf.net_config.admin.mask] | join("/") %}
+---
+parameters:
+ maas:
+ region:
+ subnets:
+ {{ net_admin }}:
+ name: {{ net_admin }}
+ cidr: {{ net_admin }}
+ gateway_ip: ${_param:single_address}
+ iprange:
+ start: ${_param:opnfv_infra_maas_pxe_start_address}
+ end: ${_param:opnfv_infra_maas_pxe_end_address}
+ type: dynamic
+ vlans:
+ untagged:
+ vid: 0
+ dhcp_on: true
+ primary_rack: ${_param:infra_maas_node01_hostname}
+ # Space-separated list of dpkg architectures to be supported by MaaS
+ opnfv_arches:{%- for arch in cluster_arch %} {{ arch | dpkg_arch }}{%- endfor %}
+ sshprefs:
+ - '{{ conf.MAAS_SSH_KEY }}'
+{%- if 'aarch64' in cluster_arch %}
+ package_repositories:
+ armband:
+ name: armband
+ enabled: '1'
+ url: 'http://linux.enea.com/mcp-repos/${_param:openstack_version}/${_param:linux_system_codename}'
+ distributions: '${_param:openstack_version}-armband'
+ components: 'main'
+ arches: 'arm64'
+ key: &armband_key |
+ -----BEGIN PGP PUBLIC KEY BLOCK-----
+ Version: GnuPG v2.0.14 (GNU/Linux)
+
+ mQENBFagAroBCADWboNIjuF6lB1mWv2+EbvqY3lKl5mLKhr2DnSUkKeHUPBv8gNM
+ qK8Q00AMIyPiyEhgjA+dWizZ+5aBgxoiY7oMeLJ2Xym36U/8SYq2BWd3SGCbMNoz
+ SJDxDUSM/HFVs6atF1M3DY9oN65hSVnu4uy5Tu6asf6k4rhAyk0z4+pRcPBCu2vq
+ mnGi3COM/+9PShrEKeVOx5W2vRJywUFuq8EDvQnRoJ0GvM28JiJIanw17YwIPxhg
+ BKZVpZjan5X+ihVMXwA2h/G/FS5Omhd50RqV6LWSYs94VJJgYqHx8UMm7izcxI+P
+ ct3IcbD195bPbJ+SbuiFe45ZLsdY1MyGiU2BABEBAAG0K0VuZWEgQXJtYmFuZCBE
+ ZXZvcHMgVGVhbSA8YXJtYmFuZEBlbmVhLmNvbT6JATgEEwECACICGwMGCwkIBwMC
+ BhUIAgkKCwQWAgMBAh4BAheABQJaY3bYAAoJEN6rkLp5irHRoQMH/0PYl0A/6eWw
+ nQ/szhEFrr76Ln6wA4vEO+PiuWj9kTkZM2NaCnkisrIuHSPIVvOLfFmztbE6sKGe
+ t+a2b7Jqw48DZ/gq508aZE4Q307ookxdCOrzIu/796hFO34yXg3sqZoJh3VmKIjY
+ 4DL8yG1iAiQ5vOw3IFWQnATwIZUgaCcjmE7HGap+9ePuJfFuQ8mIG5cy28t8qocx
+ AB/B2tucfBMwomYxKqgbLI5AG7iSt58ajvrrNa9f8IX7Ihj/jiuXhUwX+geEp98K
+ IWVI1ftEthZvfBpZW4BS98J4z//dEPi31L4jb9RQXq3afF2RpXchDeUN85bW45nu
+ W/9PMAlgE/U=
+ =m+zE
+ -----END PGP PUBLIC KEY BLOCK-----
+{%- endif %}
+ machines:
+ {%- set pxe_interface = conf.idf.net_config.admin.interface %}
+ {#- We only support exactly 5 nodes for now, hardcoded order #}
+ {%- set node_roles = ['kvm01', 'kvm02', 'kvm03', 'cmp001', 'cmp002'] %}
+ {%- for node in conf.nodes %}
+ {%- if node.node.type == 'baremetal' %}
+ {{ node_roles[loop.index0] }}:
+ interface:
+ mac: {{ node.interfaces[pxe_interface].mac_address }}
+ power_parameters:
+ power_address: {{ node.remote_management.address.rsplit('/')[0] }}
+ power_password: {{ node.remote_management.pass }}
+ power_type: {{ node.remote_management.type }}
+ power_user: {{ node.remote_management.user }}
+ architecture: {{ node.node.arch | dpkg_arch }}/generic
+ distro_series: xenial
+ hwe_kernel: ${_param:hwe_kernel}
+ {%- if loop.index0 >= node_roles.index('cmp001') %}
+ disk_layout:
+ type: lvm
+ root_device: sda
+ volume_group: vgroot
+ volume_name: lvroot
+ volume_size: 100
+ {%- endif %}
+ {%- endif %}
+ {%- endfor %}