::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
-: Copyright (c) 2017 Enea AB and others.
+: Copyright (c) 2018 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
Subject: [PATCH] maas: Add curtin_userdata_arm64_generic_xenial
Add AArch64 specific configuration.
+While at it, preseed Armband common repo-comp for Pike, so we get
+the updated kernel & other packages from the start.
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
---
- ...-Add-curtin_userdata_arm64_generic_xenial.patch | 35 ++++++++++++++++++
+ ...-Add-curtin_userdata_arm64_generic_xenial.patch | 35 +++++++++++++++++++++
mcp/patches/patches.list | 1 +
- .../baremetal-mcp-pike-common-ha/infra/maas.yml | 26 +++++++++++++
- .../files/curtin_userdata_arm64_generic_xenial | 43 ++++++++++++++++++++++
- 4 files changed, 105 insertions(+)
+ .../cluster/mcp-pike-common-ha/infra/maas.yml | 36 ++++++++++++++++++++++
+ .../files/curtin_userdata_arm64_generic_xenial | 35 +++++++++++++++++++++
+ 4 files changed, 107 insertions(+)
create mode 100644 mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch
create mode 100644 mcp/salt-formulas/maas/files/curtin_userdata_arm64_generic_xenial
diff --git a/mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch b/mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch
new file mode 100644
-index 0000000..0368937
+index 00000000..0368937d
--- /dev/null
+++ b/mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch
@@ -0,0 +1,35 @@
+ file.managed:
+ - source: salt://maas/files/pgpass
diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list
-index a87a935..fe3ff14 100644
+index e0ad1f70..59b617dd 100644
--- a/mcp/patches/patches.list
+++ b/mcp/patches/patches.list
-@@ -15,3 +15,4 @@
- /usr/share/salt-formulas/env: 0010-maas-region-allow-timeout-override.patch
- /usr/share/salt-formulas/env: 0012-linux.storage.lvm-Disable-filter.patch
- /usr/share/salt-formulas/env: 0013-libvirt-unix_sock_group-s-libvirtd-libvirt.patch
+@@ -16,3 +16,4 @@
+ /usr/share/salt-formulas/env: 0011-system.repo-Debian-Add-keyserver-proxy-support.patch
+ /usr/share/salt-formulas/env: 0012-routes-Skip-network-restart-on-noifupdown.patch
+ /usr/share/salt-formulas/env: 0015-Set-ovs-bridges-as-L3-interfaces.patch
+/usr/share/salt-formulas/env: 0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch
-diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/maas.yml b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/maas.yml
-index 56cd96b..141f363 100644
---- a/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/maas.yml
-+++ b/mcp/reclass/classes/cluster/baremetal-mcp-pike-common-ha/infra/maas.yml
-@@ -107,6 +107,32 @@ parameters:
- architecture: ${_param:opnfv_maas_node05_architecture}
- distro_series: xenial
- hwe_kernel: hwe-16.04
-+ cluster:
-+ enabled: true
-+ region:
-+ port: 80
-+ host: localhost
-+ saltstack_repo_key_arm64: |
-+ -----BEGIN PGP PUBLIC KEY BLOCK-----
-+ Version: GnuPG v1
+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 e83de35c..226a4f66 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
+@@ -41,6 +41,42 @@ parameters:
+ enable_third_party_drivers: true
+ network_discovery: 'enabled'
+ default_min_hwe_kernel: ${_param:hwe_kernel}
++ 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
-+ ZXZvcHMgVGVhbSA8YXJtYmFuZEBlbmVhLmNvbT6JAT4EEwECACgFAlagAroCGwMF
-+ CQPCZwAGCwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAAAoJEN6rkLp5irHRsG8H/2P2
-+ hO6jFHPRD1u8j9ufO9AxoInaEG9GeRjuvMc1tCUzovXvTs106TZ0as6MbAJ1S6u5
-+ E8UyQ1+VGepvdIJPXx3PCxLmUt6WIqmdOdqFrxIclohig/kardi3NfX1MBvlEV/c
-+ 7Q51H43hrlMqMpqgY1Bm+53PLC4ujjlDJBtJOEU9dki319bUmng+gO9BAljDJFXv
-+ JqY6+P/er7IgCbRXUXYfyJzgjx9JwlKbmdQ8QnCrZjF/VHIW40/mu5IIJuFvuCti
-+ tcog+SNSlDmCOS+wE8CCojeuJqupIOcz9zypVGzeus/N5Q5EEFe7GYWYS/5NKUkE
-+ 1TuuFeZKu5NJC5rkwIU=
-+ =7p60
-+ -----END PGP PUBLIC KEY BLOCK-----
-+ saltstack_repo_xenial_arm64: "http://linux.enea.com/saltstack/apt/ubuntu/16.04/arm64/2016.11 xenial main"
- linux:
- network:
- interface:
++ 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-----
++ saltstack_armband:
++ name: saltstack_armband
++ enabled: '1'
++ url: 'http://linux.enea.com/saltstack/apt/ubuntu/16.04/arm64/2016.11'
++ distributions: '${_param:linux_system_codename}'
++ components: 'main'
++ arches: 'arm64'
++ key: *armband_key
+ subnets:
+ opnfv_maas_pxe:
+ name: ${_param:opnfv_infra_maas_pxe_network_address}/24
diff --git a/mcp/salt-formulas/maas/files/curtin_userdata_arm64_generic_xenial b/mcp/salt-formulas/maas/files/curtin_userdata_arm64_generic_xenial
new file mode 100644
-index 0000000..96fd76f
+index 00000000..15d10a48
--- /dev/null
+++ b/mcp/salt-formulas/maas/files/curtin_userdata_arm64_generic_xenial
-@@ -0,0 +1,43 @@
+@@ -0,0 +1,35 @@
+{%- from "maas/map.jinja" import cluster with context %}
+{% raw %}
+#cloud-config
+{{endif}}
+late_commands:
+ maas: [wget, '--no-proxy', {{node_disable_pxe_url|escape.json}}, '--post-data', {{node_disable_pxe_data|escape.json}}, '-O', '/dev/null']
-+{% endraw %}
-+{%- if not cluster.saltstack_repo_key_arm64 == 'none' %}
-+{% set salt_repo_key = salt['hashutil.base64_b64encode'](cluster.saltstack_repo_key_arm64) %}
-+ apt_00_set_gpg: ["curtin", "in-target", "--", "sh", "-c", "echo '{{salt_repo_key}}' | base64 -d | apt-key add -"]
-+{%- endif %}
-+ apt_01_set_repo: ["curtin", "in-target", "--", "sh", "-c", "echo 'deb [arch=arm64] {{ cluster.saltstack_repo_xenial_arm64 }}' >> /etc/apt/sources.list"]
-+{% raw %}
-+ apt_03_update: ["curtin", "in-target", "--", "apt-get", "update"]
+ salt_01_install: ["curtin", "in-target", "--", "apt-get", "-y", "install", "salt-minion"]
+{% endraw %}
+ salt_02_hostname_set: ["curtin", "in-target", "--", "echo", "{% raw %}{{node.hostname}}{% endraw %}.{{pillar.linux.system.domain}}"]