aboutsummaryrefslogtreecommitdiffstats
path: root/mcp
diff options
context:
space:
mode:
Diffstat (limited to 'mcp')
-rw-r--r--mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml57
-rw-r--r--mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas_pdf.yml.j230
2 files changed, 31 insertions, 56 deletions
diff --git a/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml
index 1fd5987b8..5d6012488 100644
--- a/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml
+++ b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas.yml
@@ -10,6 +10,7 @@ classes:
- system.maas.region.single
- service.maas.cluster.single
- cluster.mcp-pike-common-ha.infra.lab_proxy_pdf
+ - cluster.mcp-pike-common-ha.infra.maas_pdf
parameters:
_param:
dhcp_interface: ${_param:opnfv_fn_vm_primary_interface}
@@ -54,62 +55,6 @@ parameters:
vid: 0
dhcp_on: true
primary_rack: ${_param:infra_maas_node01_hostname}
- machines:
- kvm01:
- interface:
- mac: ${_param:opnfv_maas_node01_interface_mac}
- power_parameters:
- power_address: ${_param:opnfv_maas_node01_power_address}
- power_password: ${_param:opnfv_maas_node01_power_password}
- power_type: ${_param:opnfv_maas_node01_power_type}
- power_user: ${_param:opnfv_maas_node01_power_user}
- architecture: ${_param:opnfv_maas_node01_architecture}
- distro_series: xenial
- hwe_kernel: ${_param:hwe_kernel}
- kvm02:
- interface:
- mac: ${_param:opnfv_maas_node02_interface_mac}
- power_parameters:
- power_address: ${_param:opnfv_maas_node02_power_address}
- power_password: ${_param:opnfv_maas_node02_power_password}
- power_type: ${_param:opnfv_maas_node02_power_type}
- power_user: ${_param:opnfv_maas_node02_power_user}
- architecture: ${_param:opnfv_maas_node02_architecture}
- distro_series: xenial
- hwe_kernel: ${_param:hwe_kernel}
- kvm03:
- interface:
- mac: ${_param:opnfv_maas_node03_interface_mac}
- power_parameters:
- power_address: ${_param:opnfv_maas_node03_power_address}
- power_password: ${_param:opnfv_maas_node03_power_password}
- power_type: ${_param:opnfv_maas_node03_power_type}
- power_user: ${_param:opnfv_maas_node03_power_user}
- architecture: ${_param:opnfv_maas_node03_architecture}
- distro_series: xenial
- hwe_kernel: ${_param:hwe_kernel}
- cmp001:
- interface:
- mac: ${_param:opnfv_maas_node04_interface_mac}
- power_parameters:
- power_address: ${_param:opnfv_maas_node04_power_address}
- power_password: ${_param:opnfv_maas_node04_power_password}
- power_type: ${_param:opnfv_maas_node04_power_type}
- power_user: ${_param:opnfv_maas_node04_power_user}
- architecture: ${_param:opnfv_maas_node04_architecture}
- distro_series: xenial
- hwe_kernel: ${_param:hwe_kernel}
- cmp002:
- interface:
- mac: ${_param:opnfv_maas_node05_interface_mac}
- power_parameters:
- power_address: ${_param:opnfv_maas_node05_power_address}
- power_password: ${_param:opnfv_maas_node05_power_password}
- power_type: ${_param:opnfv_maas_node05_power_type}
- power_user: ${_param:opnfv_maas_node05_power_user}
- architecture: ${_param:opnfv_maas_node05_architecture}
- distro_series: xenial
- hwe_kernel: ${_param:hwe_kernel}
cluster:
saltstack_repo_xenial: "http://repo.saltstack.com/apt/ubuntu/16.04/amd64/2016.11/ xenial main"
linux:
diff --git a/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas_pdf.yml.j2 b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas_pdf.yml.j2
new file mode 100644
index 000000000..a875993e3
--- /dev/null
+++ b/mcp/reclass/classes/cluster/mcp-pike-common-ha/infra/maas_pdf.yml.j2
@@ -0,0 +1,30 @@
+##############################################################################
+# 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
+##############################################################################
+---
+parameters:
+ maas:
+ region:
+ 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}
+ {%- endif %}
+ {%- endfor %}