summaryrefslogtreecommitdiffstats
path: root/patches/opnfv-fuel/0007-Add-opnfv-user-to-the-deployment.patch
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-05-10 18:09:26 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-05-22 16:46:28 +0000
commitcf421ba6f593ad1d7c926db618657f8bf66d01a7 (patch)
tree301d7de4e5caec317f7fc2257defd45fda6f848d /patches/opnfv-fuel/0007-Add-opnfv-user-to-the-deployment.patch
parentc70aa3538ef9b1da9b360ae3ba7112d8289ab876 (diff)
[salt] Retire Armband Saltstack repos
Provided we take care of the minor consequences of relying strictly on upstream Saltstack amd64 repos on arm64 (since we don't use RAET, this means merely installing `python-futures` as a dependency of `python-tornado` on all minions), we can finally drop our Salstack arm64 repository. This implies installing python-futures on: - FN and VCP VMs (handled via lib.sh pre-patching); - baremetal nodes (handled via MaaS Curtin template for arm64 now); While at it, also handle other minor patch cleanup operations: * drop `system.linux.system.repo.mcp.armband`, already covered by: - lib.sh pre-patching for FN and VCP VM images; - maas.region.repositories for baremetal nodes; * switch glusterfs PPA repo arch from 'amd64,arm64' to None; * drop obsolete patch handling `mcelog` on AArch64; [1] https://github.com/salt-formulas/salt-formula-maas/pull/26 JIRA: ARMBAND-382 Change-Id: I34f3bd70ebf10395e8d4e70498ff3a144b4d9c3b Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> (cherry picked from commit d680c5fb86c3fd4b25e7b7f766064a6ef4bf9a3b)
Diffstat (limited to 'patches/opnfv-fuel/0007-Add-opnfv-user-to-the-deployment.patch')
-rw-r--r--patches/opnfv-fuel/0007-Add-opnfv-user-to-the-deployment.patch72
1 files changed, 72 insertions, 0 deletions
diff --git a/patches/opnfv-fuel/0007-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0007-Add-opnfv-user-to-the-deployment.patch
new file mode 100644
index 00000000..a5196f38
--- /dev/null
+++ b/patches/opnfv-fuel/0007-Add-opnfv-user-to-the-deployment.patch
@@ -0,0 +1,72 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: 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 <Charalampos.Kominos@enea.com>
+Date: Fri, 1 Sep 2017 12:24:35 +0200
+Subject: [PATCH] Add opnfv user to the deployment
+
+Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
+Signed-off-by: Charalampos Kominos <Charalampos.Kominos@enea.com>
+Signed-off-by: Guillermo Herrero <Guillermo.Herrero@enea.com>
+---
+ mcp/config/states/baremetal_init | 1 +
+ mcp/config/states/virtual_control_plane | 1 +
+ mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml | 4 ++++
+ mcp/salt-formulas/opnfv/adduser.sls | 7 +++++++
+ 4 files changed, 13 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 54ffb873..07dcef27 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*' pkg.install bridge-utils
++salt -C 'kvm* or cmp*' state.apply opnfv.adduser
+ salt -C 'kvm*' state.apply linux.network,linux.system.kernel
+ 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 02a813c9..a179b22c 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 b/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml
+index f9aeb71a..21a5de4e 100644
+--- a/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml
++++ b/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml
+@@ -9,3 +9,7 @@
+ classes:
+ - cluster.all-mcp-arch-common.arch
+ - cluster.all-mcp-arch-common.opnfv
++parameters:
++ _param:
++ opnfv_user_username: opnfv
++ opnfv_user_password: $1$5/pIEHT1$XFBhNWW4Q8gYd19hczgPF1
+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