summaryrefslogtreecommitdiffstats
path: root/patches/opnfv-fuel/0013-Add-opnfv-user-to-the-deployment.patch
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-11-01 12:15:57 +0100
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-11-01 12:16:51 +0100
commit9848bc05e89f2399f1958624055173142b6107d4 (patch)
tree484fa420f504b7979eb030e2b848ae1af5d2e30e /patches/opnfv-fuel/0013-Add-opnfv-user-to-the-deployment.patch
parent3d92843941184335c2f1b3e8a074c6e9f2e49571 (diff)
u/fuel: Bump & rebase for galera formula pinning
JIRA: ARMBAND-328 Change-Id: I5f284be5e75dc5ea740e632efc6f6c2e46de3973 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'patches/opnfv-fuel/0013-Add-opnfv-user-to-the-deployment.patch')
-rw-r--r--patches/opnfv-fuel/0013-Add-opnfv-user-to-the-deployment.patch67
1 files changed, 67 insertions, 0 deletions
diff --git a/patches/opnfv-fuel/0013-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0013-Add-opnfv-user-to-the-deployment.patch
new file mode 100644
index 00000000..75e239a0
--- /dev/null
+++ b/patches/opnfv-fuel/0013-Add-opnfv-user-to-the-deployment.patch
@@ -0,0 +1,67 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: 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: 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/virtual_control_plane | 2 ++
+ mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml | 4 ++++
+ mcp/salt-formulas/opnfv/adduser.sls | 7 +++++++
+ 3 files changed, 13 insertions(+)
+ create mode 100644 mcp/salt-formulas/opnfv/adduser.sls
+
+diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane
+index a5fc061..b2d005b 100755
+--- a/mcp/config/states/virtual_control_plane
++++ b/mcp/config/states/virtual_control_plane
+@@ -14,6 +14,7 @@ source "$(dirname "${BASH_SOURCE[0]}")/../../scripts/lib.sh"
+
+ # KVM, compute node prereqs (libvirt first), VCP deployment
+ salt -C 'kvm*' pkg.install bridge-utils
++salt -C '*' state.apply opnfv.adduser
+ salt -C 'kvm*' state.apply linux.network
+ salt -C 'cmp*' state.apply linux.system
+ salt -C 'cmp*' state.apply linux.network || true
+@@ -44,6 +45,7 @@ while [ $rc -ne 0 ] && [ ${attempt} -lt ${total_attempts} ]; do
+ rc=0
+ for node in $vcp_nodes; do
+ salt "$node" test.ping 2>/dev/null || { rc=$?; break; };
++ salt -C "$node" state.apply opnfv.adduser
+ done
+ sleep 5
+ ((attempt+=1))
+diff --git a/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml b/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml
+index aa780e6..e4069c0 100644
+--- a/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml
++++ b/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml
+@@ -9,3 +9,7 @@
+ classes:
+ - cluster.all-mcp-ocata-common.opnfv.runtime
+ - cluster.all-mcp-ocata-common.opnfv.pod_config
++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 0000000..78ef993
+--- /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