summaryrefslogtreecommitdiffstats
path: root/patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-12-28 18:41:09 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-12-30 16:54:11 +0100
commit648ec98613d31e3d9701b9ac1d87aed640b245f3 (patch)
treed77112075d757dd70f55d47a7113a79ef4c1c12d /patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch
parent99c10303e7f2c02010677f97512f161cd3a8abf7 (diff)
MaaS: preseed Armband repo via curtin
Instead of installing upstream vanilla kernel from Ubuntu just to upgrade to the one from Armband repo later, preseed Armband repo config via curtin. This allows us to drop a kernel update cycle, thus saving a few minutes at each deploy. While at it, switch salt repo addition to use the maas region reclass section instead of adding a dedicated mechanism for it in the curtin template (only for arm64). JIRA: ARMBAND-280 Change-Id: Iad5953a7de80d728f11a4ce3113bd7725100c31c Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch')
-rw-r--r--patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch98
1 files changed, 51 insertions, 47 deletions
diff --git a/patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch b/patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch
index 6431c942..6d331966 100644
--- a/patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch
+++ b/patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch
@@ -11,14 +11,16 @@ Date: Mon, 7 Aug 2017 19:45:01 +0200
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(+)
+ .../baremetal-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
@@ -73,48 +75,58 @@ index cd32378..fc2ddea 100644
/usr/share/salt-formulas/env: 0012-linux.storage.lvm-Disable-filter.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 6332776..7292ebb 100644
+index 6332776..d263b19 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
-@@ -108,6 +108,32 @@ parameters:
- architecture: ${_param:opnfv_maas_node05_architecture}
- distro_series: xenial
- hwe_kernel: ${_param:hwe_kernel}
-+ cluster:
-+ enabled: true
-+ region:
-+ port: 80
-+ host: localhost
-+ saltstack_repo_key_arm64: |
-+ -----BEGIN PGP PUBLIC KEY BLOCK-----
-+ Version: GnuPG v1
+@@ -38,6 +38,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 v1
+
-+ 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
++ 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_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 0000000..15d10a4
--- /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
@@ -134,14 +146,6 @@ index 0000000..96fd76f
+{{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}}"]