From 3b19e08d3e10519efee7f3c9d40a740318f762dc Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Tue, 26 Sep 2017 18:22:06 +0200 Subject: u/fuel: Bump & rebase for full PDF support Change-Id: I7ae833b429c018345d0ab061877d27e3183b3dc7 Signed-off-by: Alexandru Avadanii (cherry picked from commit 62d2ed716e79f9ee75d63543249bb21b9115b032) --- .../0015-Add-opnfv-user-to-the-deployment.patch | 67 ++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 patches/opnfv-fuel/0015-Add-opnfv-user-to-the-deployment.patch (limited to 'patches/opnfv-fuel/0015-Add-opnfv-user-to-the-deployment.patch') diff --git a/patches/opnfv-fuel/0015-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0015-Add-opnfv-user-to-the-deployment.patch new file mode 100644 index 00000000..1f937ca0 --- /dev/null +++ b/patches/opnfv-fuel/0015-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 +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/maas | 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/maas b/mcp/config/states/maas +index 1adccbf..85d1a9e 100755 +--- a/mcp/config/states/maas ++++ b/mcp/config/states/maas +@@ -84,6 +84,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 +@@ -108,6 +109,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/all-mcp-ocata-common/opnfv/init.yml b/mcp/reclass/classes/cluster/all-mcp-ocata-common/opnfv/init.yml +index c9be2c2..5c84ec6 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 +@@ -2,3 +2,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 -- cgit 1.2.3-korg