From 816306a7f3b51206de23a343b49fc2adea13a3e8 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Tue, 26 Jun 2018 13:29:31 +0200 Subject: u/fuel: Bump & rebase for vPDF support Change-Id: Ie0705b598d6fcd37071c05afb90cb2948a88a1f5 Signed-off-by: Alexandru Avadanii --- ...lt-formulas-armband-Extend-libvirt_domain.patch | 174 ++++++++++++++++ ...PDF-Use-arm-virtual2-POD-config-in-sample.patch | 67 ------- ...lt-formulas-armband-Extend-libvirt_domain.patch | 174 ---------------- ...-virtng.py-virt.sls-Extend-libvirt_domain.patch | 223 +++++++++++++++++++++ .../0004-Add-opnfv-user-to-the-deployment.patch | 74 +++++++ ...-virtng.py-virt.sls-Extend-libvirt_domain.patch | 223 --------------------- .../0005-Add-opnfv-user-to-the-deployment.patch | 74 ------- ...005-Set-volume-name-in-source-file-to-sdX.patch | 44 ++++ ...006-Set-volume-name-in-source-file-to-sdX.patch | 44 ---- 9 files changed, 515 insertions(+), 582 deletions(-) create mode 100644 patches/opnfv-fuel/0002-mcp-salt-formulas-armband-Extend-libvirt_domain.patch delete mode 100644 patches/opnfv-fuel/0002-vPDF-Use-arm-virtual2-POD-config-in-sample.patch delete mode 100644 patches/opnfv-fuel/0003-mcp-salt-formulas-armband-Extend-libvirt_domain.patch create mode 100644 patches/opnfv-fuel/0003-virtng.py-virt.sls-Extend-libvirt_domain.patch create mode 100644 patches/opnfv-fuel/0004-Add-opnfv-user-to-the-deployment.patch delete mode 100644 patches/opnfv-fuel/0004-virtng.py-virt.sls-Extend-libvirt_domain.patch delete mode 100644 patches/opnfv-fuel/0005-Add-opnfv-user-to-the-deployment.patch create mode 100644 patches/opnfv-fuel/0005-Set-volume-name-in-source-file-to-sdX.patch delete mode 100644 patches/opnfv-fuel/0006-Set-volume-name-in-source-file-to-sdX.patch (limited to 'patches/opnfv-fuel') diff --git a/patches/opnfv-fuel/0002-mcp-salt-formulas-armband-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0002-mcp-salt-formulas-armband-Extend-libvirt_domain.patch new file mode 100644 index 00000000..086cfcab --- /dev/null +++ b/patches/opnfv-fuel/0002-mcp-salt-formulas-armband-Extend-libvirt_domain.patch @@ -0,0 +1,174 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Sun, 20 Aug 2017 22:41:26 +0200 +Subject: [PATCH] mcp: salt-formulas: armband: Extend libvirt_domain + +Add new state in armband salt formula that: +* extends salt's virt libvirt_domain.jinja template with support for: + - hw_firmware_type; + - virt_machine_model; + - cpu_model; + These will later be leveraged via salt virt formula with AArch64 + specific values. +* to ensure compatibilty of `virt.purge` with NVRAM-enabled domains + at undefine time, pass down the proper flag to libvirt from virt.py. +* re-enable AArch64 bootstrap + Recent changes in salt bootstrap script from [1] whitelist a + fixed pool of known architectures. Add "arm64" to that list on the + fly, as part of `config.gather_bootstrap_script`. + NOTE: This change will be leveraged by passing a custom DEB repo to + the bootstrap script with `-R linux.enea.com/saltstack`. + +NOTE: After running this new state, salt-minion should be restarted +to pick up the changes, so we'll run it before rebooting kvm nodes. + +[1] http://bootstrap.saltstack.com + +Signed-off-by: Alexandru Avadanii +--- + mcp/config/states/baremetal_init | 1 + + .../files/salt-minion-aarch64-rollup.diff | 101 ++++++++++++++++++ + mcp/salt-formulas/armband/salt_minion.sls | 7 ++ + 3 files changed, 109 insertions(+) + create mode 100644 mcp/salt-formulas/armband/files/salt-minion-aarch64-rollup.diff + create mode 100644 mcp/salt-formulas/armband/salt_minion.sls + +diff --git a/mcp/config/states/baremetal_init b/mcp/config/states/baremetal_init +index 6a44b788..6f935445 100755 +--- a/mcp/config/states/baremetal_init ++++ b/mcp/config/states/baremetal_init +@@ -31,6 +31,7 @@ wait_for 5.0 "salt -C 'kvm* or cmp*' state.apply opnfv.route_wrapper" + wait_for 5.0 "salt -C 'cmp*' state.apply linux.network" + wait_for 30.0 "salt -C 'kvm* or cmp*' test.ping" + ++salt -C 'kvm*' state.apply armband.salt_minion + salt -C 'kvm* or cmp*' system.reboot + wait_for 90.0 "salt -C 'kvm* or cmp*' test.ping" + +diff --git a/mcp/salt-formulas/armband/files/salt-minion-aarch64-rollup.diff b/mcp/salt-formulas/armband/files/salt-minion-aarch64-rollup.diff +new file mode 100644 +index 00000000..9e74c240 +--- /dev/null ++++ b/mcp/salt-formulas/armband/files/salt-minion-aarch64-rollup.diff +@@ -0,0 +1,101 @@ ++From: Alexandru Avadanii ++Date: Sun Aug 20 18:18:53 2017 +0200 ++Subject: [PATCH] cloud.py: Allow AArch64 arch in salt bootstrap ++ ++Recent changes in salt bootstrap script from [1] whitelist a ++fixed pool of known architectures. Add "arm64" to that list on the ++fly, as part of `config.gather_bootstrap_script`. ++ ++NOTE: This change will be leveraged by passing a custom DEB repo to ++the bootstrap script with `-R linux.enea.com/saltstack`. ++ ++[1] http://bootstrap.saltstack.com ++ ++Signed-off-by: Alexandru Avadanii ++--- ++ ++diff --git a/salt/utils/cloud.py b/salt/utils/cloud.py ++--- a/salt/utils/cloud.py +++++ b/salt/utils/cloud.py ++@@ -2772,6 +2772,9 @@ ++ if not script_content: ++ raise ValueError('No content in bootstrap script !') ++ +++ # NOTE(armband): edit bootstrap script on the fly to allow AArch64 +++ script_content = script_content.replace('"amd64")', '"amd64"|"arm64")') +++ ++ # Get the path to the built-in deploy scripts directory ++ builtin_deploy_dir = os.path.join( ++ os.path.dirname(__file__), ++-- ++ ++From: Alexandru Avadanii ++Date: Sun Aug 20 18:18:53 2017 +0200 ++Subject: [PATCH] libvirt_domain.jinja: Add AArch64 support ++ ++Salt virt state relies on a Jinja template to create a libvirt ++XML definition for each new VM. ++This template needs to be extended with a few specific options ++for AArch64: ++- UEFI loader support (pflash); ++- custom machine model (e.g. 'virt-2.9'), since AArch64 defaults to ++ 'integratorcp'; ++- custom cpu model; ++ ++Allow all these to be parametrized from the salt virt formula, ++which we will also adapt to allow the params to be passed via our ++reclass model. ++ ++Signed-off-by: Alexandru Avadanii ++--- ++ ++diff --git a/salt/templates/virt/libvirt_domain.jinja b/salt/templates/virt/libvirt_domain.jinja ++--- a/salt/templates/virt/libvirt_domain.jinja +++++ b/salt/templates/virt/libvirt_domain.jinja ++@@ -3,11 +3,22 @@ ++ {{ cpu }} ++ {{ mem }} ++ +++ {% if custom_virt_machine %} +++ hvm +++ {% else %} ++ hvm +++ {% endif %} +++ {% if os_loader_type == 'pflash' %} +++ {{ os_loader }} +++ {{ os_loader_nvram }} +++ {% endif %} ++ {% for dev in boot_dev %} ++ ++ {% endfor %} ++ +++ {% if cpu_mode == 'custom' %} +++ +++ {% endif %} ++ ++ {% for diskname, disk in disks.items() %} ++ ++-- ++ ++From: Alexandru Avadanii ++Date: Sun Nov 19 02:18:53 2017 +0200 ++Subject: [PATCH] virt.py: undefine: NVRAM flag support ++ ++Signed-off-by: Alexandru Avadanii ++--- ++ ++diff --git a/salt/modules/virt.py b/salt/modules/virt.py ++--- a/salt/modules/virt.py +++++ b/salt/modules/virt.py ++@@ -1523,7 +1523,10 @@ ++ salt '*' virt.undefine ++ ''' ++ dom = _get_domain(vm_) ++- return dom.undefine() == 0 +++ try: +++ return dom.undefineFlags(libvirt.VIR_DOMAIN_UNDEFINE_NVRAM) == 0 +++ except libvirt.libvirtError: +++ return dom.undefine() == 0 ++ ++ ++ def purge(vm_, dirs=False): +diff --git a/mcp/salt-formulas/armband/salt_minion.sls b/mcp/salt-formulas/armband/salt_minion.sls +new file mode 100644 +index 00000000..cc5c9242 +--- /dev/null ++++ b/mcp/salt-formulas/armband/salt_minion.sls +@@ -0,0 +1,7 @@ ++salt-minion-aarch64-rollup: ++ file.patch: ++ - name: /usr/lib/python2.7/dist-packages ++ - source: salt://armband/files/salt-minion-aarch64-rollup.diff ++ - hash: False ++ - options: '-p1' ++ - unless: 'test -f /var/cache/salt/minion/files/base/armband/files/salt-minion-aarch64-rollup.diff && cd /usr/lib/python2.7/dist-packages && patch -p1 -R --dry-run -r - < /var/cache/salt/minion/files/base/armband/files/salt-minion-aarch64-rollup.diff' diff --git a/patches/opnfv-fuel/0002-vPDF-Use-arm-virtual2-POD-config-in-sample.patch b/patches/opnfv-fuel/0002-vPDF-Use-arm-virtual2-POD-config-in-sample.patch deleted file mode 100644 index f26994f2..00000000 --- a/patches/opnfv-fuel/0002-vPDF-Use-arm-virtual2-POD-config-in-sample.patch +++ /dev/null @@ -1,67 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: 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 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Tue, 18 Jul 2017 19:17:24 +0200 -Subject: [PATCH] vPDF: Use arm-virtual2 POD config in sample - -NOTE: This will be obsoleted when arm-virtual2 vPDF+IDF lands upstream -in Pharos git repo. - -Until then, just align the public network configuration used by the -virtual POD with the Enea lab configuration specific to arm-virtual2 -(i.e. public network on 10.0.9.0/24). - -Signed-off-by: Alexandru Avadanii ---- - mcp/config/labs/local/idf-virtual1.yaml | 22 +++++++++++----------- - 1 file changed, 11 insertions(+), 11 deletions(-) - -diff --git a/mcp/config/labs/local/idf-virtual1.yaml b/mcp/config/labs/local/idf-virtual1.yaml -index 402af985..2d449c8e 100644 ---- a/mcp/config/labs/local/idf-virtual1.yaml -+++ b/mcp/config/labs/local/idf-virtual1.yaml -@@ -42,10 +42,10 @@ idf: - public: - interface: 3 # when used, will be fourth vnet interface, untagged - vlan: native -- network: 10.16.0.0 -- ip-range: 10.16.0.100-10.16.0.254 # Some IPs are in use by lab infra -+ network: 10.0.9.0 -+ ip-range: 10.0.9.100-10.0.9.253 # Some IPs are in use by lab infra - mask: 24 -- gateway: 10.16.0.1 -+ gateway: 10.0.9.254 - dns: - - 8.8.8.8 - - 8.8.4.4 -@@ -63,16 +63,16 @@ idf: - # Ordered-list, index should be in sync with node index in PDF - - interfaces: &interfaces - # Ordered-list, index should be in sync with interface index in PDF -- - 'ens3' -- - 'ens4' -- - 'ens5' -- - 'ens6' -+ - 'enp1s0' -+ - 'enp2s0' -+ - 'enp3s0' -+ - 'enp4s0' - busaddr: &busaddr - # Bus-info reported by `ethtool -i ethX` -- - '0000:00:03.0' -- - '0000:00:04.0' -- - '0000:00:05.0' -- - '0000:00:06.0' -+ - '0000:01:00.0' -+ - '0000:02:00.0' -+ - '0000:03:00.0' -+ - '0000:04:00.0' - - interfaces: *interfaces - busaddr: *busaddr - - interfaces: *interfaces diff --git a/patches/opnfv-fuel/0003-mcp-salt-formulas-armband-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0003-mcp-salt-formulas-armband-Extend-libvirt_domain.patch deleted file mode 100644 index 086cfcab..00000000 --- a/patches/opnfv-fuel/0003-mcp-salt-formulas-armband-Extend-libvirt_domain.patch +++ /dev/null @@ -1,174 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: 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 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Sun, 20 Aug 2017 22:41:26 +0200 -Subject: [PATCH] mcp: salt-formulas: armband: Extend libvirt_domain - -Add new state in armband salt formula that: -* extends salt's virt libvirt_domain.jinja template with support for: - - hw_firmware_type; - - virt_machine_model; - - cpu_model; - These will later be leveraged via salt virt formula with AArch64 - specific values. -* to ensure compatibilty of `virt.purge` with NVRAM-enabled domains - at undefine time, pass down the proper flag to libvirt from virt.py. -* re-enable AArch64 bootstrap - Recent changes in salt bootstrap script from [1] whitelist a - fixed pool of known architectures. Add "arm64" to that list on the - fly, as part of `config.gather_bootstrap_script`. - NOTE: This change will be leveraged by passing a custom DEB repo to - the bootstrap script with `-R linux.enea.com/saltstack`. - -NOTE: After running this new state, salt-minion should be restarted -to pick up the changes, so we'll run it before rebooting kvm nodes. - -[1] http://bootstrap.saltstack.com - -Signed-off-by: Alexandru Avadanii ---- - mcp/config/states/baremetal_init | 1 + - .../files/salt-minion-aarch64-rollup.diff | 101 ++++++++++++++++++ - mcp/salt-formulas/armband/salt_minion.sls | 7 ++ - 3 files changed, 109 insertions(+) - create mode 100644 mcp/salt-formulas/armband/files/salt-minion-aarch64-rollup.diff - create mode 100644 mcp/salt-formulas/armband/salt_minion.sls - -diff --git a/mcp/config/states/baremetal_init b/mcp/config/states/baremetal_init -index 6a44b788..6f935445 100755 ---- a/mcp/config/states/baremetal_init -+++ b/mcp/config/states/baremetal_init -@@ -31,6 +31,7 @@ wait_for 5.0 "salt -C 'kvm* or cmp*' state.apply opnfv.route_wrapper" - wait_for 5.0 "salt -C 'cmp*' state.apply linux.network" - wait_for 30.0 "salt -C 'kvm* or cmp*' test.ping" - -+salt -C 'kvm*' state.apply armband.salt_minion - salt -C 'kvm* or cmp*' system.reboot - wait_for 90.0 "salt -C 'kvm* or cmp*' test.ping" - -diff --git a/mcp/salt-formulas/armband/files/salt-minion-aarch64-rollup.diff b/mcp/salt-formulas/armband/files/salt-minion-aarch64-rollup.diff -new file mode 100644 -index 00000000..9e74c240 ---- /dev/null -+++ b/mcp/salt-formulas/armband/files/salt-minion-aarch64-rollup.diff -@@ -0,0 +1,101 @@ -+From: Alexandru Avadanii -+Date: Sun Aug 20 18:18:53 2017 +0200 -+Subject: [PATCH] cloud.py: Allow AArch64 arch in salt bootstrap -+ -+Recent changes in salt bootstrap script from [1] whitelist a -+fixed pool of known architectures. Add "arm64" to that list on the -+fly, as part of `config.gather_bootstrap_script`. -+ -+NOTE: This change will be leveraged by passing a custom DEB repo to -+the bootstrap script with `-R linux.enea.com/saltstack`. -+ -+[1] http://bootstrap.saltstack.com -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a/salt/utils/cloud.py b/salt/utils/cloud.py -+--- a/salt/utils/cloud.py -++++ b/salt/utils/cloud.py -+@@ -2772,6 +2772,9 @@ -+ if not script_content: -+ raise ValueError('No content in bootstrap script !') -+ -++ # NOTE(armband): edit bootstrap script on the fly to allow AArch64 -++ script_content = script_content.replace('"amd64")', '"amd64"|"arm64")') -++ -+ # Get the path to the built-in deploy scripts directory -+ builtin_deploy_dir = os.path.join( -+ os.path.dirname(__file__), -+-- -+ -+From: Alexandru Avadanii -+Date: Sun Aug 20 18:18:53 2017 +0200 -+Subject: [PATCH] libvirt_domain.jinja: Add AArch64 support -+ -+Salt virt state relies on a Jinja template to create a libvirt -+XML definition for each new VM. -+This template needs to be extended with a few specific options -+for AArch64: -+- UEFI loader support (pflash); -+- custom machine model (e.g. 'virt-2.9'), since AArch64 defaults to -+ 'integratorcp'; -+- custom cpu model; -+ -+Allow all these to be parametrized from the salt virt formula, -+which we will also adapt to allow the params to be passed via our -+reclass model. -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a/salt/templates/virt/libvirt_domain.jinja b/salt/templates/virt/libvirt_domain.jinja -+--- a/salt/templates/virt/libvirt_domain.jinja -++++ b/salt/templates/virt/libvirt_domain.jinja -+@@ -3,11 +3,22 @@ -+ {{ cpu }} -+ {{ mem }} -+ -++ {% if custom_virt_machine %} -++ hvm -++ {% else %} -+ hvm -++ {% endif %} -++ {% if os_loader_type == 'pflash' %} -++ {{ os_loader }} -++ {{ os_loader_nvram }} -++ {% endif %} -+ {% for dev in boot_dev %} -+ -+ {% endfor %} -+ -++ {% if cpu_mode == 'custom' %} -++ -++ {% endif %} -+ -+ {% for diskname, disk in disks.items() %} -+ -+-- -+ -+From: Alexandru Avadanii -+Date: Sun Nov 19 02:18:53 2017 +0200 -+Subject: [PATCH] virt.py: undefine: NVRAM flag support -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a/salt/modules/virt.py b/salt/modules/virt.py -+--- a/salt/modules/virt.py -++++ b/salt/modules/virt.py -+@@ -1523,7 +1523,10 @@ -+ salt '*' virt.undefine -+ ''' -+ dom = _get_domain(vm_) -+- return dom.undefine() == 0 -++ try: -++ return dom.undefineFlags(libvirt.VIR_DOMAIN_UNDEFINE_NVRAM) == 0 -++ except libvirt.libvirtError: -++ return dom.undefine() == 0 -+ -+ -+ def purge(vm_, dirs=False): -diff --git a/mcp/salt-formulas/armband/salt_minion.sls b/mcp/salt-formulas/armband/salt_minion.sls -new file mode 100644 -index 00000000..cc5c9242 ---- /dev/null -+++ b/mcp/salt-formulas/armband/salt_minion.sls -@@ -0,0 +1,7 @@ -+salt-minion-aarch64-rollup: -+ file.patch: -+ - name: /usr/lib/python2.7/dist-packages -+ - source: salt://armband/files/salt-minion-aarch64-rollup.diff -+ - hash: False -+ - options: '-p1' -+ - unless: 'test -f /var/cache/salt/minion/files/base/armband/files/salt-minion-aarch64-rollup.diff && cd /usr/lib/python2.7/dist-packages && patch -p1 -R --dry-run -r - < /var/cache/salt/minion/files/base/armband/files/salt-minion-aarch64-rollup.diff' diff --git a/patches/opnfv-fuel/0003-virtng.py-virt.sls-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0003-virtng.py-virt.sls-Extend-libvirt_domain.patch new file mode 100644 index 00000000..11abe1dd --- /dev/null +++ b/patches/opnfv-fuel/0003-virtng.py-virt.sls-Extend-libvirt_domain.patch @@ -0,0 +1,223 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Alexandru Avadanii +Date: Mon, 21 Aug 2017 01:10:16 +0200 +Subject: [PATCH] virtng.py, virt.sls: Extend libvirt_domain + +Extend _modules/virtng.py, salt/control/virt.sls with support for: +- hw_firmware_type; +- virt_machine_model; +- cpu_model; + +This functionality relies on the corresponding changes to be +implemented in libvirt_domain.jinja template. + +These will later be leveraged via our reclass model with AArch64 +specific values. + +Signed-off-by: Alexandru Avadanii +--- + ...-virtng-module-Extend-libvirt_domain.patch | 54 +++++++++++++++++++ + ...t-control-virt-Extend-libvirt_domain.patch | 51 ++++++++++++++++++ + mcp/patches/patches.list | 2 + + .../cluster/mcp-common-ha/infra/kvm.yml | 15 ++++++ + .../cluster/mcp-odl-ha/infra/kvm.yml.j2 | 3 ++ + 5 files changed, 125 insertions(+) + create mode 100644 mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch + create mode 100644 mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch + +diff --git a/mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch b/mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch +new file mode 100644 +index 00000000..706b67da +--- /dev/null ++++ b/mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch +@@ -0,0 +1,54 @@ ++From: Alexandru Avadanii ++Date: Mon, 21 Aug 2017 02:03:01 +0200 ++Subject: [PATCH] virtng: module: Extend libvirt_domain ++ ++Extend virtng.py with support for passing down new params: ++- hw_firmware_type; ++- virt_machine_model; ++- cpu_model; ++ ++This functionality relies on the corresponding changes to be ++implemented in libvirt_domain.jinja template. ++ ++These will later be leveraged via salt virt formula with AArch64 ++specific values. ++ ++Signed-off-by: Alexandru Avadanii ++--- ++ ++diff --git a/_modules/virtng.py b/_modules/virtng.py ++--- a/_modules/virtng.py +++++ b/_modules/virtng.py ++@@ -56,6 +56,10 @@ ++ ++ VIRT_DEFAULT_HYPER = 'kvm' ++ +++DEFAULT_UEFI_LOADER_PATH = { +++ "x86_64": "/usr/share/OVMF/OVMF_CODE.fd", +++ "aarch64": "/usr/share/AAVMF/AAVMF_CODE.fd" +++} ++ ++ def __virtual__(): ++ if not HAS_ALL_IMPORTS: ++@@ -227,6 +231,21 @@ ++ # TODO: make bus and model parameterized, this works for 64-bit Linux ++ context['controller_model'] = 'lsilogic' ++ +++ # TODO: limit cpu_model, hw_firmware_type, virt_machine_type to qemu/kvm +++ # FIXME: parametrize hardcoded path for NVRAM storage +++ if 'hw_firmware_type' in kwargs and kwargs['hw_firmware_type'] == 'uefi': +++ context['os_loader_type'] = 'pflash' +++ context['os_loader'] = DEFAULT_UEFI_LOADER_PATH[os.uname()[-1]] +++ context['os_loader_nvram'] = '/var/lib/libvirt/qemu/nvram/{0}_VARS.fd'.format(name) +++ +++ if 'virt_machine_model' in kwargs: +++ context['custom_virt_machine'] = True +++ context['virt_machine_model'] = kwargs['virt_machine_model'] +++ +++ if 'cpu_model' in kwargs: +++ context['cpu_mode'] = 'custom' +++ context['cpu_model'] = kwargs['cpu_model'] +++ ++ if 'boot_dev' in kwargs: ++ context['boot_dev'] = [] ++ for dev in kwargs['boot_dev'].split(): +diff --git a/mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch b/mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch +new file mode 100644 +index 00000000..78eb0bff +--- /dev/null ++++ b/mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch +@@ -0,0 +1,51 @@ ++From: Alexandru Avadanii ++Date: Mon, 21 Aug 2017 02:03:01 +0200 ++Subject: [PATCH] salt: control: virt: Extend libvirt_domain ++ ++Extend salt/control/virt.sls with support for new params: ++- hw_firmware_type; ++- virt_machine_model; ++- cpu_model; ++ ++This functionality relies on the corresponding changes to be ++implemented in libvirt_domain.jinja template, as well as in ++salt custom py module virtng.py. ++ ++These will later be leveraged via reclass model with AArch64 ++specific values. ++ ++FIXME: Move all new params to different section, as "size" is ++definitely not the best choice. ++ ++Example reclass model usage: ++salt: ++ control: ++ size: ++ openstack.example_vm_type: ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough ++ ++Signed-off-by: Alexandru Avadanii ++--- ++ ++diff --git a/salt/control/virt.sls b/salt/control/virt.sls ++--- a/salt/control/virt.sls +++++ b/salt/control/virt.sls ++@@ -44,6 +44,16 @@ ++ {%- if node.img_dest is defined %} ++ img_dest: {{ node.img_dest }} ++ {%- endif %} +++ # FIXME(armband): Move these 3 params to different section +++ {%- if size.hw_firmware_type is defined %} +++ hw_firmware_type: {{ size.hw_firmware_type }} +++ {%- endif %} +++ {%- if size.virt_machine_model is defined %} +++ virt_machine_model: {{ size.virt_machine_model }} +++ {%- endif %} +++ {%- if size.cpu_model is defined %} +++ cpu_model: {{ size.cpu_model }} +++ {%- endif %} ++ - unless: virsh list --all --name| grep -E "^{{ node_name }}.{{ cluster.domain }}$" ++ ++ #salt_control_seed_{{ cluster_name }}_{{ node_name }}: +diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list +index a17fd694..6dd688ee 100644 +--- a/mcp/patches/patches.list ++++ b/mcp/patches/patches.list +@@ -11,3 +11,5 @@ + /usr/share/salt-formulas/env: 0010-maas-region-allow-timeout-override.patch + /usr/share/salt-formulas/env: 0011-system.repo-Debian-Add-keyserver-proxy-support.patch + /usr/share/salt-formulas/env: 0015-Set-ovs-bridges-as-L3-interfaces.patch ++/usr/share/salt-formulas/env: 0103-virtng-module-Extend-libvirt_domain.patch ++/usr/share/salt-formulas/env: 0104-salt-control-virt-Extend-libvirt_domain.patch +diff --git a/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml +index 868f324f..73875b87 100644 +--- a/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml ++++ b/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml +@@ -52,21 +52,33 @@ parameters: + openstack.control: + cpu: 4 + ram: 12288 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: small + net_profile: default + openstack.database: + cpu: 4 + ram: 6144 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: large + net_profile: default + openstack.message_queue: + cpu: 4 + ram: 2048 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: small + net_profile: default + openstack.telemetry: + cpu: 2 + ram: 3072 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: xxlarge + net_profile: default + # stacklight.log: +@@ -87,6 +99,9 @@ parameters: + openstack.proxy: + cpu: 2 + ram: 2048 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: small + net_profile: default_ext + cluster: +diff --git a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2 b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2 +index ab0da39b..f64ed46a 100644 +--- a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2 ++++ b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2 +@@ -19,6 +19,9 @@ parameters: + opendaylight.server: + cpu: 4 + ram: 8192 ++ hw_firmware_type: uefi ++ virt_machine_model: virt ++ cpu_model: host-passthrough + disk_profile: small + net_profile: default + cluster: diff --git a/patches/opnfv-fuel/0004-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0004-Add-opnfv-user-to-the-deployment.patch new file mode 100644 index 00000000..f158ed40 --- /dev/null +++ b/patches/opnfv-fuel/0004-Add-opnfv-user-to-the-deployment.patch @@ -0,0 +1,74 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Charalampos Kominos +Date: Fri, 1 Sep 2017 12:24:35 +0200 +Subject: [PATCH] Add opnfv user to the deployment + +Signed-off-by: Alexandru Avadanii +Signed-off-by: Charalampos Kominos +Signed-off-by: Guillermo Herrero +--- + mcp/config/states/baremetal_init | 1 + + mcp/config/states/virtual_control_plane | 1 + + .../classes/cluster/all-mcp-arch-common/init.yml.j2 | 3 +++ + mcp/salt-formulas/opnfv/adduser.sls | 7 +++++++ + 4 files changed, 12 insertions(+) + create mode 100644 mcp/salt-formulas/opnfv/adduser.sls + +diff --git a/mcp/config/states/baremetal_init b/mcp/config/states/baremetal_init +index 6f935445..f685ab87 100755 +--- a/mcp/config/states/baremetal_init ++++ b/mcp/config/states/baremetal_init +@@ -23,6 +23,7 @@ salt -C 'kvm* or cmp*' file.replace $debian_ip_source \ + repl="\n if not __salt__['pkg.version']('vlan'):\n __salt__['pkg.install']('vlan')" + + salt -C 'kvm* or cmp*' pkg.install bridge-utils ++salt -C 'kvm* or cmp*' state.apply opnfv.adduser + salt -C 'kvm*' state.apply linux.network,linux.system.kernel + wait_for 5.0 "salt -C 'kvm* or cmp*' state.apply salt.minion" + wait_for 5.0 "salt -C 'cmp*' state.apply linux.system" +diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane +index 64d73953..d8c4e776 100755 +--- a/mcp/config/states/virtual_control_plane ++++ b/mcp/config/states/virtual_control_plane +@@ -39,6 +39,7 @@ vcp_nodes=$(salt --out yaml 'kvm01*' pillar.get salt:control:cluster:internal:no + # Check all vcp nodes are available + wait_for 25.0 "(for n in ${vcp_nodes}; do salt \${n} test.ping 2>/dev/null || exit; done)" + ++wait_for 5.0 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply opnfv.adduser" + wait_for 10.0 "salt -C '* and not cfg01* and not mas01*' saltutil.sync_all" + + # Propagate APT proxy config created by curtin on baremetal nodes to VCP VMs +diff --git a/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml.j2 b/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml.j2 +index 19475c71..1a3c84fc 100644 +--- a/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml.j2 ++++ b/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml.j2 +@@ -10,6 +10,9 @@ classes: + - cluster.all-mcp-arch-common.opnfv + parameters: + _param: ++ opnfv_user_username: opnfv ++ opnfv_user_password: $1$5/pIEHT1$XFBhNWW4Q8gYd19hczgPF1 ++ + salt_control_trusty_image: '' # Dummy value, to keep reclass 1.5.2 happy + salt_control_xenial_image: salt://salt/files/control/images/base_image_opnfv_fuel_vcp.img + +diff --git a/mcp/salt-formulas/opnfv/adduser.sls b/mcp/salt-formulas/opnfv/adduser.sls +new file mode 100644 +index 00000000..78ef993d +--- /dev/null ++++ b/mcp/salt-formulas/opnfv/adduser.sls +@@ -0,0 +1,7 @@ ++add_opnfv_user: ++ user.present: ++ - name: {{ salt['pillar.get']('_param:opnfv_user_username') }} ++ - password: {{ salt['pillar.get']('_param:opnfv_user_password') }} ++ - createhome: True ++ - groups: ++ - sudo diff --git a/patches/opnfv-fuel/0004-virtng.py-virt.sls-Extend-libvirt_domain.patch b/patches/opnfv-fuel/0004-virtng.py-virt.sls-Extend-libvirt_domain.patch deleted file mode 100644 index 0753ad05..00000000 --- a/patches/opnfv-fuel/0004-virtng.py-virt.sls-Extend-libvirt_domain.patch +++ /dev/null @@ -1,223 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: 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 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Alexandru Avadanii -Date: Mon, 21 Aug 2017 01:10:16 +0200 -Subject: [PATCH] virtng.py, virt.sls: Extend libvirt_domain - -Extend _modules/virtng.py, salt/control/virt.sls with support for: -- hw_firmware_type; -- virt_machine_model; -- cpu_model; - -This functionality relies on the corresponding changes to be -implemented in libvirt_domain.jinja template. - -These will later be leveraged via our reclass model with AArch64 -specific values. - -Signed-off-by: Alexandru Avadanii ---- - ...-virtng-module-Extend-libvirt_domain.patch | 54 +++++++++++++++++++ - ...t-control-virt-Extend-libvirt_domain.patch | 51 ++++++++++++++++++ - mcp/patches/patches.list | 2 + - .../cluster/mcp-common-ha/infra/kvm.yml | 15 ++++++ - .../cluster/mcp-odl-ha/infra/kvm.yml.j2 | 3 ++ - 5 files changed, 125 insertions(+) - create mode 100644 mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch - create mode 100644 mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch - -diff --git a/mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch b/mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch -new file mode 100644 -index 00000000..706b67da ---- /dev/null -+++ b/mcp/patches/0103-virtng-module-Extend-libvirt_domain.patch -@@ -0,0 +1,54 @@ -+From: Alexandru Avadanii -+Date: Mon, 21 Aug 2017 02:03:01 +0200 -+Subject: [PATCH] virtng: module: Extend libvirt_domain -+ -+Extend virtng.py with support for passing down new params: -+- hw_firmware_type; -+- virt_machine_model; -+- cpu_model; -+ -+This functionality relies on the corresponding changes to be -+implemented in libvirt_domain.jinja template. -+ -+These will later be leveraged via salt virt formula with AArch64 -+specific values. -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a/_modules/virtng.py b/_modules/virtng.py -+--- a/_modules/virtng.py -++++ b/_modules/virtng.py -+@@ -56,6 +56,10 @@ -+ -+ VIRT_DEFAULT_HYPER = 'kvm' -+ -++DEFAULT_UEFI_LOADER_PATH = { -++ "x86_64": "/usr/share/OVMF/OVMF_CODE.fd", -++ "aarch64": "/usr/share/AAVMF/AAVMF_CODE.fd" -++} -+ -+ def __virtual__(): -+ if not HAS_ALL_IMPORTS: -+@@ -227,6 +231,21 @@ -+ # TODO: make bus and model parameterized, this works for 64-bit Linux -+ context['controller_model'] = 'lsilogic' -+ -++ # TODO: limit cpu_model, hw_firmware_type, virt_machine_type to qemu/kvm -++ # FIXME: parametrize hardcoded path for NVRAM storage -++ if 'hw_firmware_type' in kwargs and kwargs['hw_firmware_type'] == 'uefi': -++ context['os_loader_type'] = 'pflash' -++ context['os_loader'] = DEFAULT_UEFI_LOADER_PATH[os.uname()[-1]] -++ context['os_loader_nvram'] = '/var/lib/libvirt/qemu/nvram/{0}_VARS.fd'.format(name) -++ -++ if 'virt_machine_model' in kwargs: -++ context['custom_virt_machine'] = True -++ context['virt_machine_model'] = kwargs['virt_machine_model'] -++ -++ if 'cpu_model' in kwargs: -++ context['cpu_mode'] = 'custom' -++ context['cpu_model'] = kwargs['cpu_model'] -++ -+ if 'boot_dev' in kwargs: -+ context['boot_dev'] = [] -+ for dev in kwargs['boot_dev'].split(): -diff --git a/mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch b/mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch -new file mode 100644 -index 00000000..78eb0bff ---- /dev/null -+++ b/mcp/patches/0104-salt-control-virt-Extend-libvirt_domain.patch -@@ -0,0 +1,51 @@ -+From: Alexandru Avadanii -+Date: Mon, 21 Aug 2017 02:03:01 +0200 -+Subject: [PATCH] salt: control: virt: Extend libvirt_domain -+ -+Extend salt/control/virt.sls with support for new params: -+- hw_firmware_type; -+- virt_machine_model; -+- cpu_model; -+ -+This functionality relies on the corresponding changes to be -+implemented in libvirt_domain.jinja template, as well as in -+salt custom py module virtng.py. -+ -+These will later be leveraged via reclass model with AArch64 -+specific values. -+ -+FIXME: Move all new params to different section, as "size" is -+definitely not the best choice. -+ -+Example reclass model usage: -+salt: -+ control: -+ size: -+ openstack.example_vm_type: -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough -+ -+Signed-off-by: Alexandru Avadanii -+--- -+ -+diff --git a/salt/control/virt.sls b/salt/control/virt.sls -+--- a/salt/control/virt.sls -++++ b/salt/control/virt.sls -+@@ -44,6 +44,16 @@ -+ {%- if node.img_dest is defined %} -+ img_dest: {{ node.img_dest }} -+ {%- endif %} -++ # FIXME(armband): Move these 3 params to different section -++ {%- if size.hw_firmware_type is defined %} -++ hw_firmware_type: {{ size.hw_firmware_type }} -++ {%- endif %} -++ {%- if size.virt_machine_model is defined %} -++ virt_machine_model: {{ size.virt_machine_model }} -++ {%- endif %} -++ {%- if size.cpu_model is defined %} -++ cpu_model: {{ size.cpu_model }} -++ {%- endif %} -+ - unless: virsh list --all --name| grep -E "^{{ node_name }}.{{ cluster.domain }}$" -+ -+ #salt_control_seed_{{ cluster_name }}_{{ node_name }}: -diff --git a/mcp/patches/patches.list b/mcp/patches/patches.list -index 4d22c617..e6827aa2 100644 ---- a/mcp/patches/patches.list -+++ b/mcp/patches/patches.list -@@ -12,3 +12,5 @@ - /usr/share/salt-formulas/env: 0010-maas-region-allow-timeout-override.patch - /usr/share/salt-formulas/env: 0011-system.repo-Debian-Add-keyserver-proxy-support.patch - /usr/share/salt-formulas/env: 0015-Set-ovs-bridges-as-L3-interfaces.patch -+/usr/share/salt-formulas/env: 0103-virtng-module-Extend-libvirt_domain.patch -+/usr/share/salt-formulas/env: 0104-salt-control-virt-Extend-libvirt_domain.patch -diff --git a/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml b/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml -index 868f324f..73875b87 100644 ---- a/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml -+++ b/mcp/reclass/classes/cluster/mcp-common-ha/infra/kvm.yml -@@ -52,21 +52,33 @@ parameters: - openstack.control: - cpu: 4 - ram: 12288 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: small - net_profile: default - openstack.database: - cpu: 4 - ram: 6144 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: large - net_profile: default - openstack.message_queue: - cpu: 4 - ram: 2048 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: small - net_profile: default - openstack.telemetry: - cpu: 2 - ram: 3072 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: xxlarge - net_profile: default - # stacklight.log: -@@ -87,6 +99,9 @@ parameters: - openstack.proxy: - cpu: 2 - ram: 2048 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: small - net_profile: default_ext - cluster: -diff --git a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2 b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2 -index ab0da39b..f64ed46a 100644 ---- a/mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2 -+++ b/mcp/reclass/classes/cluster/mcp-odl-ha/infra/kvm.yml.j2 -@@ -19,6 +19,9 @@ parameters: - opendaylight.server: - cpu: 4 - ram: 8192 -+ hw_firmware_type: uefi -+ virt_machine_model: virt -+ cpu_model: host-passthrough - disk_profile: small - net_profile: default - cluster: diff --git a/patches/opnfv-fuel/0005-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0005-Add-opnfv-user-to-the-deployment.patch deleted file mode 100644 index f158ed40..00000000 --- a/patches/opnfv-fuel/0005-Add-opnfv-user-to-the-deployment.patch +++ /dev/null @@ -1,74 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: 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 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Charalampos Kominos -Date: Fri, 1 Sep 2017 12:24:35 +0200 -Subject: [PATCH] Add opnfv user to the deployment - -Signed-off-by: Alexandru Avadanii -Signed-off-by: Charalampos Kominos -Signed-off-by: Guillermo Herrero ---- - mcp/config/states/baremetal_init | 1 + - mcp/config/states/virtual_control_plane | 1 + - .../classes/cluster/all-mcp-arch-common/init.yml.j2 | 3 +++ - mcp/salt-formulas/opnfv/adduser.sls | 7 +++++++ - 4 files changed, 12 insertions(+) - create mode 100644 mcp/salt-formulas/opnfv/adduser.sls - -diff --git a/mcp/config/states/baremetal_init b/mcp/config/states/baremetal_init -index 6f935445..f685ab87 100755 ---- a/mcp/config/states/baremetal_init -+++ b/mcp/config/states/baremetal_init -@@ -23,6 +23,7 @@ salt -C 'kvm* or cmp*' file.replace $debian_ip_source \ - repl="\n if not __salt__['pkg.version']('vlan'):\n __salt__['pkg.install']('vlan')" - - salt -C 'kvm* or cmp*' pkg.install bridge-utils -+salt -C 'kvm* or cmp*' state.apply opnfv.adduser - salt -C 'kvm*' state.apply linux.network,linux.system.kernel - wait_for 5.0 "salt -C 'kvm* or cmp*' state.apply salt.minion" - wait_for 5.0 "salt -C 'cmp*' state.apply linux.system" -diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane -index 64d73953..d8c4e776 100755 ---- a/mcp/config/states/virtual_control_plane -+++ b/mcp/config/states/virtual_control_plane -@@ -39,6 +39,7 @@ vcp_nodes=$(salt --out yaml 'kvm01*' pillar.get salt:control:cluster:internal:no - # Check all vcp nodes are available - wait_for 25.0 "(for n in ${vcp_nodes}; do salt \${n} test.ping 2>/dev/null || exit; done)" - -+wait_for 5.0 "salt -C 'E@^(?!cfg01|mas01|kvm|cmp00).*' state.apply opnfv.adduser" - wait_for 10.0 "salt -C '* and not cfg01* and not mas01*' saltutil.sync_all" - - # Propagate APT proxy config created by curtin on baremetal nodes to VCP VMs -diff --git a/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml.j2 b/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml.j2 -index 19475c71..1a3c84fc 100644 ---- a/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml.j2 -+++ b/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml.j2 -@@ -10,6 +10,9 @@ classes: - - cluster.all-mcp-arch-common.opnfv - parameters: - _param: -+ opnfv_user_username: opnfv -+ opnfv_user_password: $1$5/pIEHT1$XFBhNWW4Q8gYd19hczgPF1 -+ - salt_control_trusty_image: '' # Dummy value, to keep reclass 1.5.2 happy - salt_control_xenial_image: salt://salt/files/control/images/base_image_opnfv_fuel_vcp.img - -diff --git a/mcp/salt-formulas/opnfv/adduser.sls b/mcp/salt-formulas/opnfv/adduser.sls -new file mode 100644 -index 00000000..78ef993d ---- /dev/null -+++ b/mcp/salt-formulas/opnfv/adduser.sls -@@ -0,0 +1,7 @@ -+add_opnfv_user: -+ user.present: -+ - name: {{ salt['pillar.get']('_param:opnfv_user_username') }} -+ - password: {{ salt['pillar.get']('_param:opnfv_user_password') }} -+ - createhome: True -+ - groups: -+ - sudo diff --git a/patches/opnfv-fuel/0005-Set-volume-name-in-source-file-to-sdX.patch b/patches/opnfv-fuel/0005-Set-volume-name-in-source-file-to-sdX.patch new file mode 100644 index 00000000..0cfae945 --- /dev/null +++ b/patches/opnfv-fuel/0005-Set-volume-name-in-source-file-to-sdX.patch @@ -0,0 +1,44 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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 +: which accompanies this distribution, and is available at +: http://www.apache.org/licenses/LICENSE-2.0 +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +From: Charalampos Kominos +Date: Fri, 27 Apr 2018 14:54:22 +0200 +Subject: [PATCH] Set volume name in source file to sdX + +Signed-off-by: Charalampos Kominos +--- + .../classes/cluster/mcp-common-ha/openstack_control.yml.j2 | 2 +- + .../classes/cluster/mcp-common-noha/openstack_control.yml | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/mcp/reclass/classes/cluster/mcp-common-ha/openstack_control.yml.j2 b/mcp/reclass/classes/cluster/mcp-common-ha/openstack_control.yml.j2 +index 0189e038..ea758c4b 100644 +--- a/mcp/reclass/classes/cluster/mcp-common-ha/openstack_control.yml.j2 ++++ b/mcp/reclass/classes/cluster/mcp-common-ha/openstack_control.yml.j2 +@@ -84,7 +84,7 @@ parameters: + <<: *db_conn_recycle_time + cacert: /etc/ssl/certs/mcp_os_cacert + openrc_extra: +- volume_device_name: vdc ++ volume_device_name: sdc + glance: + server: + <<: *db_conn_recycle_time +diff --git a/mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml b/mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml +index f458281c..e17a5f16 100644 +--- a/mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml ++++ b/mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml +@@ -72,7 +72,7 @@ parameters: + server: + admin_email: ${_param:admin_email} + openrc_extra: +- volume_device_name: vdc ++ volume_device_name: sdc + pkgs: + - keystone + - python-psycopg2 diff --git a/patches/opnfv-fuel/0006-Set-volume-name-in-source-file-to-sdX.patch b/patches/opnfv-fuel/0006-Set-volume-name-in-source-file-to-sdX.patch deleted file mode 100644 index 1fd80d29..00000000 --- a/patches/opnfv-fuel/0006-Set-volume-name-in-source-file-to-sdX.patch +++ /dev/null @@ -1,44 +0,0 @@ -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -: 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 -: which accompanies this distribution, and is available at -: http://www.apache.org/licenses/LICENSE-2.0 -:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -From: Charalampos Kominos -Date: Fri, 27 Apr 2018 14:54:22 +0200 -Subject: [PATCH] Set volume name in source file to sdX - -Signed-off-by: Charalampos Kominos ---- - .../classes/cluster/mcp-common-ha/openstack_control.yml.j2 | 2 +- - .../classes/cluster/mcp-common-noha/openstack_control.yml | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/mcp/reclass/classes/cluster/mcp-common-ha/openstack_control.yml.j2 b/mcp/reclass/classes/cluster/mcp-common-ha/openstack_control.yml.j2 -index 38fe06a8..71bd80de 100644 ---- a/mcp/reclass/classes/cluster/mcp-common-ha/openstack_control.yml.j2 -+++ b/mcp/reclass/classes/cluster/mcp-common-ha/openstack_control.yml.j2 -@@ -84,7 +84,7 @@ parameters: - <<: *db_conn_recycle_time - cacert: /etc/ssl/certs/mcp_os_cacert - openrc_extra: -- volume_device_name: vdc -+ volume_device_name: sdc - glance: - server: - <<: *db_conn_recycle_time -diff --git a/mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml b/mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml -index f458281c..e17a5f16 100644 ---- a/mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml -+++ b/mcp/reclass/classes/cluster/mcp-common-noha/openstack_control.yml -@@ -72,7 +72,7 @@ parameters: - server: - admin_email: ${_param:admin_email} - openrc_extra: -- volume_device_name: vdc -+ volume_device_name: sdc - pkgs: - - keystone - - python-psycopg2 -- cgit 1.2.3-korg