1 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2 : Copyright (c) 2018 Mirantis Inc., Enea AB and others.
4 : All rights reserved. This program and the accompanying materials
5 : are made available under the terms of the Apache License, Version 2.0
6 : which accompanies this distribution, and is available at
7 : http://www.apache.org/licenses/LICENSE-2.0
8 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
9 From: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
10 Date: Wed, 22 Aug 2018 01:35:06 +0200
11 Subject: [PATCH] OPNFV package installation, Ubuntu user
13 * Install OpenSSH server (and client), so other OPNFV projects can
14 easily connect to the Salt master node;
15 * Install 'salt-formula-gnocchi' distro package (empty git formula
17 * While at it, create 'ubuntu' user so other OPNFV projects don't
18 have to switch to 'root' login;
19 * Preinstall `salt_minion_dependency_packages` and
20 `salt_minion_reclass_dependencies`;
22 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
24 DockerMake.yml | 36 +++++++++++++++++++++++++++++++++++-
25 1 file changed, 35 insertions(+), 1 deletion(-)
27 diff --git a/DockerMake.yml b/DockerMake.yml
28 index 2c75586..d7d4c49 100644
31 @@ -102,12 +102,46 @@ salt-formulas:
32 ENV SALT_ENV_PATH_ $SALT_ENV_PATH_
33 ARG RECLASS_BASE="/srv/salt/reclass"
34 ENV RECLASS_BASE $RECLASS_BASE
35 - RUN echo "Layer python/salt module prerequisites, formulas" \
36 + RUN echo "Layer python/salt module prerequisites, formulas (27 Sep 2018)" \
37 && mkdir -p /srv/salt \
38 && curl -sSqL https://raw.githubusercontent.com/salt-formulas/salt-formulas-scripts/master/formula-fetch.sh -o /srv/salt/formula-fetch.sh \
39 && bash -c 'source /srv/salt/formula-fetch.sh && setupPyEnv && fetchAll' \
40 && eval ${LAYER_CLEANUP}
44 + # Some formulas have empty git repos, use the package version
45 + ARG SALT_FORMULA_VERSION="nightly"
46 + ENV SALT_FORMULA_VERSION $SALT_FORMULA_VERSION
47 + ARG SALT_FORMULA_LIST="salt-formula-gnocchi"
48 + ENV SALT_FORMULA_LIST $SALT_FORMULA_LIST
49 + ENV APT_REPOSITORY "deb [arch=amd64] http://apt.mirantis.com/xenial ${SALT_FORMULA_VERSION} salt"
50 + ENV APT_REPOSITORY_GPG "http://apt.mirantis.com/public.gpg"
51 + RUN echo "Layer extra salt-formulas packages" \
52 + && echo "$APT_REPOSITORY" | tee /etc/apt/sources.list.d/salt-formulas.list >/dev/null \
53 + && curl -sL $APT_REPOSITORY_GPG | $SUDO apt-key add - \
54 + && eval ${LAYER_PKGUPDT} \
55 + && ${LAYER_INSTALL} ${SALT_FORMULA_LIST} -y --fix-missing -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
56 + && eval ${LAYER_CLEANUP}
57 + RUN echo "Layer with OPNFV packages" \
58 + && eval ${LAYER_PKGUPDT} \
59 + && ${LAYER_INSTALL} \
71 + && useradd -m ubuntu \
72 + && echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/ubuntu \
73 + && eval ${LAYER_CLEANUP}