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 | 38 ++++++++++++++++++++++++++++++++++++--
25 1 file changed, 36 insertions(+), 2 deletions(-)
27 diff --git a/DockerMake.yml b/DockerMake.yml
28 index 2c75586..13813a2 100644
31 @@ -94,7 +94,7 @@ salt-formulas:
33 ARG SALT_FORMULA_VERSION="master"
34 ENV SALT_FORMULA_VERSION $SALT_FORMULA_VERSION
35 - ARG SALT_FORMULA_SOURCES="https://github.com/salt-formulas https://github.com/saltstack-formulas"
36 + ARG SALT_FORMULA_SOURCES="https://github.com/salt-formulas"
37 ENV SALT_FORMULA_SOURCES $SALT_FORMULA_SOURCES
38 ARG SALT_FORMULAS_BASE="/srv/salt/formula"
39 ENV SALT_FORMULAS_BASE $SALT_FORMULAS_BASE
40 @@ -102,12 +102,46 @@ salt-formulas:
41 ENV SALT_ENV_PATH_ $SALT_ENV_PATH_
42 ARG RECLASS_BASE="/srv/salt/reclass"
43 ENV RECLASS_BASE $RECLASS_BASE
44 - RUN echo "Layer python/salt module prerequisites, formulas" \
45 + RUN echo "Layer python/salt module prerequisites, formulas (09 Nov 2018)" \
46 && mkdir -p /srv/salt \
47 && curl -sSqL https://raw.githubusercontent.com/salt-formulas/salt-formulas-scripts/master/formula-fetch.sh -o /srv/salt/formula-fetch.sh \
48 && bash -c 'source /srv/salt/formula-fetch.sh && setupPyEnv && fetchAll' \
49 && eval ${LAYER_CLEANUP}
53 + # Some formulas have empty git repos, use the package version
54 + ARG SALT_FORMULA_VERSION="nightly"
55 + ENV SALT_FORMULA_VERSION $SALT_FORMULA_VERSION
56 + ARG SALT_FORMULA_LIST="salt-formula-gnocchi"
57 + ENV SALT_FORMULA_LIST $SALT_FORMULA_LIST
58 + ENV APT_REPOSITORY "deb [arch=amd64] http://apt.mirantis.com/xenial ${SALT_FORMULA_VERSION} salt"
59 + ENV APT_REPOSITORY_GPG "http://apt.mirantis.com/public.gpg"
60 + RUN echo "Layer extra salt-formulas packages" \
61 + && echo "$APT_REPOSITORY" | tee /etc/apt/sources.list.d/salt-formulas.list >/dev/null \
62 + && curl -sL $APT_REPOSITORY_GPG | $SUDO apt-key add - \
63 + && eval ${LAYER_PKGUPDT} \
64 + && ${LAYER_INSTALL} ${SALT_FORMULA_LIST} -y --fix-missing -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
65 + && eval ${LAYER_CLEANUP}
66 + RUN echo "Layer with OPNFV packages" \
67 + && eval ${LAYER_PKGUPDT} \
68 + && ${LAYER_INSTALL} \
80 + && useradd -m ubuntu \
81 + && echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/ubuntu \
82 + && eval ${LAYER_CLEANUP}