summaryrefslogtreecommitdiffstats
path: root/patches/opnfv-fuel/0017-Add-opnfv-user-to-the-deployment.patch
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-09-11 20:17:20 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-09-11 21:43:00 +0200
commit9519a11e1fe0eb26cf5b776d8479065f2f710737 (patch)
tree984abae9d48cbc1a53612921d344949bfd40b877 /patches/opnfv-fuel/0017-Add-opnfv-user-to-the-deployment.patch
parent6ea6921ad4ad2bea138151da0fea02b30d0c839a (diff)
u/fuel: Bump & rebase for multiarch reclass
Change-Id: I3de41645b7424195b9c8d5884a7c9de1fabf68cb Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'patches/opnfv-fuel/0017-Add-opnfv-user-to-the-deployment.patch')
-rw-r--r--patches/opnfv-fuel/0017-Add-opnfv-user-to-the-deployment.patch88
1 files changed, 88 insertions, 0 deletions
diff --git a/patches/opnfv-fuel/0017-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0017-Add-opnfv-user-to-the-deployment.patch
new file mode 100644
index 00000000..b2862992
--- /dev/null
+++ b/patches/opnfv-fuel/0017-Add-opnfv-user-to-the-deployment.patch
@@ -0,0 +1,88 @@
+::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
+: 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/maas | 2 ++
+ mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml | 4 ++++
+ .../classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml | 1 +
+ .../classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml | 1 +
+ mcp/salt-formulas/opnfv/adduser.sls | 7 +++++++
+ 5 files changed, 15 insertions(+)
+ create mode 100644 mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml
+ create mode 100644 mcp/salt-formulas/opnfv/adduser.sls
+
+diff --git a/mcp/config/states/maas b/mcp/config/states/maas
+index 22d83be..03d336b 100755
+--- a/mcp/config/states/maas
++++ b/mcp/config/states/maas
+@@ -80,6 +80,7 @@ salt -C 'mas01*' pillar.item\
+ salt -C '* and not cfg01* and not mas01*' saltutil.sync_all
+
+ salt -C 'kvm*' pkg.install bridge-utils
++salt -C '*' state.apply opnfv.adduser
+ salt -C 'kvm*' state.apply linux.network
+ salt -C 'kvm*' state.apply armband.bootstrap_script_arm64
+ salt -C 'kvm*' system.reboot
+@@ -103,6 +104,7 @@ while [ $rc -ne 0 ]; 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
+ done
+diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml
+new file mode 100644
+index 0000000..4cea805
+--- /dev/null
++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-common/opnfv.yml
+@@ -0,0 +1,4 @@
++parameters:
++ _param:
++ opnfv_user_username: opnfv
++ opnfv_user_password: $1$5/pIEHT1$XFBhNWW4Q8gYd19hczgPF1
+diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml
+index 393cbb3..eb0a8bc 100644
+--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml
++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-odl-ha/infra/init.yml
+@@ -1,4 +1,5 @@
+ classes:
++- cluster.baremetal-mcp-ocata-common.opnfv
+ - system.linux.system.single
+ - cluster.baremetal-mcp-ocata-odl-ha.openstack
+ # - cluster.baremetal-mcp-ocata-odl-ha.stacklight
+diff --git a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml
+index 0b8bf2f..fb2acda 100644
+--- a/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml
++++ b/mcp/reclass/classes/cluster/baremetal-mcp-ocata-ovs-ha/infra/init.yml
+@@ -1,4 +1,5 @@
+ classes:
++- cluster.baremetal-mcp-ocata-common.opnfv
+ - system.linux.system.single
+ - cluster.baremetal-mcp-ocata-ovs-ha.openstack
+ # - cluster.baremetal-mcp-ocata-ovs-ha.stacklight
+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