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-11-26 05:43:39 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-11-26 23:56:20 +0000
commitb49021e1227573fbde13c82f432635ef187b1e83 (patch)
treea0ef84e1ab70b5f1aca9254c3664847c056ab474 /patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch
parent3293d28284b3d2d140f3b82452cfb6b16a7f2f2a (diff)
u/fuel: Bump & rebase for image pre-install
1. Bump to latest Fuel@OPNFV to include: - Bring in newer glusterfs for mtime unsplit brain * Requires adding arch "arm64" to PPA definition in reclass: - (reclass-system) linux.system.repo.glusterfs: Add arm64 arch - Switch nofeature-ha compute nodes to UCA repo * Requires an alternative way of adding linux.enea.com repos; * linux.enea.com repos will now be pre-install into VM images; * Requires refresh on repo arch list handled by Armband patch: - (fuel) baremetal, virtual: Extend arch list for UCA repo 2. Staging proposed patches from upstream Fuel@OPNFV: - Add pre-{install,purge} support for base image * Reference implementation adds pre-installed Armband specifics: - Enea public GPG to APT keys (for below repos); - repos (linux.enea.com/{apt-mk,mcp-repos}/*); - linux-{image,headers}-generic-hwe-16.04-edge; - cloud-init: datasource from NoCloud only; * Allows us to drop kernel installation from state files, installing the kernel only once during image prep, instead of two stages of parallel installs (5 baremetal, 14 VCP); * Ensures Armband repos are pre-configured for infrastructure VMs, allowing us to drop more reclass repo definitions; * Rework armband patch to install kernel only on kvm, cmp: - (fuel) baremetal: linux-image-generic-hwe-16.04-edge 3. Sync reclass repo definitions with upstream change, drop duplicates - [linux][repos] Remove unused repositories [1] * Upstream dropped all "ocata-{security,hotfix,...} repo comps, which are also empty for Armband, so drop them too; * Rework following armband patches: - (reclass-system) linux/system/repo/mcp: Add Armband repos * Move Armband repos to new dedicated reclass classes: - linux.system.repo.mcp.armband.extra (currently empty); - linux.system.repo.mcp.armband.openstack; * Use HTTPS for fetching Enea Armband GPG key; - (fuel) baremetal: Add Armband Openstack repos to kvm, cmp * Consume defs introduced above only on baremetal nodes; 4. Sync documentation with Fuel@OPNFV (cp) 5. Add vim swap files to .gitignore [1] https://github.com/Mirantis/reclass-system-salt-model/commit/1dd1b31 Change-Id: Ibab56279de86f08ad7cd9bc6761f4c525532f811 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit 37083673d6cdddbb9b710f4dd5efe832753e5856)
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.patch160
1 files changed, 160 insertions, 0 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
new file mode 100644
index 00000000..3e17f899
--- /dev/null
+++ b/patches/opnfv-fuel/0005-maas-Add-curtin_userdata_arm64_generic_xenial.patch
@@ -0,0 +1,160 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: Copyright (c) 2017 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
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Date: Mon, 7 Aug 2017 19:45:01 +0200
+Subject: [PATCH] maas: Add curtin_userdata_arm64_generic_xenial
+
+Add AArch64 specific configuration.
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+---
+ ...-Add-curtin_userdata_arm64_generic_xenial.patch | 35 ++++++++++++++++++
+ mcp/patches/patches.list | 1 +
+ .../baremetal-mcp-ocata-common/infra/maas.yml | 26 +++++++++++++
+ .../files/curtin_userdata_arm64_generic_xenial | 43 ++++++++++++++++++++++
+ 4 files changed, 105 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
+--- /dev/null
++++ b/mcp/patches/0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch
+@@ -0,0 +1,35 @@
++From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
++Date: Sat, 5 Aug 2017 02:03:01 +0200
++Subject: [PATCH] maas: Add curtin_userdata_arm64_generic_xenial
++
++Based on curtin_userdata_amd64_generic_xenial, add new arm64
++specific configuration file:
++- curtin_userdata_arm64_generic_xenial
++
++Requires Salt repo key and repo URL to be defined via reclass.
++
++Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
++---
++
++diff --git a/maas/region.sls b/maas/region.sls
++--- a/maas/region.sls
+++++ b/maas/region.sls
++@@ -70,6 +70,18 @@
++ - require:
++ - pkg: maas_region_packages
++
+++/etc/maas/preseeds/curtin_userdata_arm64_generic_xenial:
+++ file.managed:
+++ - source: salt://maas/files/curtin_userdata_arm64_generic_xenial
+++ - template: jinja
+++ - user: root
+++ - group: root
+++ - mode: 644
+++ - context:
+++ salt_master_ip: {{ region.salt_master_ip }}
+++ - require:
+++ - pkg: maas_region_packages
+++
++ /root/.pgpass:
++ file.managed:
++ - source: salt://maas/files/pgpass
+diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list
+index 6358109..4f6cc56 100644
+--- a/mcp/patches/patches.list
++++ b/mcp/patches/patches.list
+@@ -18,3 +18,4 @@
+ /usr/share/salt-formulas/reclass: 0011-service.horizon.server.cluster-Default-to-v2-API.patch
+ /usr/share/salt-formulas/env: 0012-linux.storage.lvm-Disable-filter.patch
+ /usr/share/salt-formulas/env: 0013-maas-region-Allow-subnets-without-fabrics.patch
++/usr/share/salt-formulas/env: 0101-maas-Add-curtin_userdata_arm64_generic_xenial.patch
+diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/maas.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/maas.yml
+index e8c2965..b15f9cb 100644
+--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/maas.yml
++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/infra/maas.yml
+@@ -110,6 +110,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
++
++ 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:
+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
+--- /dev/null
++++ b/mcp/salt-formulas/maas/files/curtin_userdata_arm64_generic_xenial
+@@ -0,0 +1,43 @@
++{%- from "maas/map.jinja" import cluster with context %}
++{% raw %}
++#cloud-config
++debconf_selections:
++ maas: |
++ {{for line in str(curtin_preseed).splitlines()}}
++ {{line}}
++ {{endfor}}
++{{if third_party_drivers and driver}}
++early_commands:
++ {{py: key_string = ''.join(['\\x%x' % x for x in map(ord, driver['key_binary'])])}}
++ driver_00_get_key: /bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg
++ driver_01_add_key: ["apt-key", "add", "/tmp/maas-{{driver['package']}}.gpg"]
++ driver_02_add: ["add-apt-repository", "-y", "deb {{driver['repository']}} {{node.get_distro_series()}} main"]
++ driver_03_update_install: ["sh", "-c", "apt-get update --quiet && apt-get --assume-yes install {{driver['package']}}"]
++ driver_04_load: ["sh", "-c", "depmod && modprobe {{driver['module']}}"]
++{{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}}"]
++ salt_03_hostname_get: ["curtin", "in-target", "--", "sh", "-c", "echo 'id: {% raw %}{{node.hostname}}{% endraw %}.{{pillar.linux.system.domain}}' >> /etc/salt/minion"]
++ salt_04_master: ["curtin", "in-target", "--", "sh", "-c", "echo 'master: {{ salt_master_ip }}' >> /etc/salt/minion"]
++{% raw %}
++{{if third_party_drivers and driver}}
++ driver_00_key_get: curtin in-target -- sh -c "/bin/echo -en '{{key_string}}' > /tmp/maas-{{driver['package']}}.gpg"
++ driver_02_key_add: ["curtin", "in-target", "--", "apt-key", "add", "/tmp/maas-{{driver['package']}}.gpg"]
++ driver_03_add: ["curtin", "in-target", "--", "add-apt-repository", "-y", "deb {{driver['repository']}} {{node.get_distro_series()}} main"]
++ driver_04_update_install: ["curtin", "in-target", "--", "apt-get", "update", "--quiet"]
++ driver_05_install: ["curtin", "in-target", "--", "apt-get", "-y", "install", "{{driver['package']}}"]
++ driver_06_depmod: ["curtin", "in-target", "--", "depmod"]
++ driver_07_update_initramfs: ["curtin", "in-target", "--", "update-initramfs", "-u"]
++{{endif}}
++{% endraw %}