From 466a4c3252e17370ed4d9d7c854738b26dbf1df1 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Thu, 7 Dec 2017 18:03:26 +0100 Subject: u/fuel: Bump & rebase for Pike upgrade - virtual deploys will use only UCA repos, without Armband/MCP; - base image pre-build is now upstream, drop our patches; - drop p/fuel libvirtd group workaround, now upstream in Fuel@OPNFV; - drop p/reclass glusterfs PPA arch extension, obsolete; - refactor armband repos in system.repo.mcp into: * armband (new, contains kernel, libvirt etc.); * armband_openstack (move into system.repo.mcp.openstack); * armband_mk_openstack (move intro system.repo.mcp.openstack); * armband_mcp_extra (move into system.repo.mcp.extra); - drop 'nova: Update console defaults for armv7, aarch64'; - minor rebase of nova libvirt driver patches in our roll-up; JIRA: ARMBAND-335 Change-Id: Ic5b7736cdd1d1ad5ff25728925198e8ea3e6b5b1 Signed-off-by: Alexandru Avadanii --- .../0012-Add-opnfv-user-to-the-deployment.patch | 72 ++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 patches/opnfv-fuel/0012-Add-opnfv-user-to-the-deployment.patch (limited to 'patches/opnfv-fuel/0012-Add-opnfv-user-to-the-deployment.patch') diff --git a/patches/opnfv-fuel/0012-Add-opnfv-user-to-the-deployment.patch b/patches/opnfv-fuel/0012-Add-opnfv-user-to-the-deployment.patch new file mode 100644 index 00000000..000c32c7 --- /dev/null +++ b/patches/opnfv-fuel/0012-Add-opnfv-user-to-the-deployment.patch @@ -0,0 +1,72 @@ +:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: +: 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/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 67022b0..5943e03 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 + salt -C 'cmp*' state.apply linux.system + salt -C 'cmp*' state.apply linux.network || true +diff --git a/mcp/config/states/virtual_control_plane b/mcp/config/states/virtual_control_plane +index 1cfcacd..58a1843 100755 +--- a/mcp/config/states/virtual_control_plane ++++ b/mcp/config/states/virtual_control_plane +@@ -47,6 +47,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-arch-common/init.yml b/mcp/reclass/classes/cluster/all-mcp-arch-common/init.yml +index f09ee5d..39d550a 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 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