1 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2 : Copyright (c) 2019 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`;
21 * Pin dockermake to v0.8 to allow using python3.5 for virtualenv,
22 since python 3.6 is not easily available for Ubuntu Xenial
25 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
27 DockerMake.yml | 38 +++++++++++++++++++++++++++++++++++++-
29 2 files changed, 39 insertions(+), 3 deletions(-)
31 diff --git a/DockerMake.yml b/DockerMake.yml
32 index 2c75586..9ab7195 100644
35 @@ -29,6 +29,7 @@ common-cleanup:
39 + ARG CACHE_INVALIDATE="0"
40 RUN echo "Layer with common packages" \
41 && eval ${LAYER_PKGUPDT} \
42 && apt-get upgrade -qy \
43 @@ -94,7 +95,7 @@ salt-formulas:
45 ARG SALT_FORMULA_VERSION="master"
46 ENV SALT_FORMULA_VERSION $SALT_FORMULA_VERSION
47 - ARG SALT_FORMULA_SOURCES="https://github.com/salt-formulas https://github.com/saltstack-formulas"
48 + ARG SALT_FORMULA_SOURCES="https://github.com/salt-formulas"
49 ENV SALT_FORMULA_SOURCES $SALT_FORMULA_SOURCES
50 ARG SALT_FORMULAS_BASE="/srv/salt/formula"
51 ENV SALT_FORMULAS_BASE $SALT_FORMULAS_BASE
52 @@ -108,6 +109,41 @@ salt-formulas:
53 && bash -c 'source /srv/salt/formula-fetch.sh && setupPyEnv && fetchAll' \
54 && eval ${LAYER_CLEANUP}
58 + # Some formulas have empty git repos, use the package version
59 + ARG SALT_FORMULA_VERSION="nightly"
60 + ENV SALT_FORMULA_VERSION $SALT_FORMULA_VERSION
61 + ARG SALT_FORMULA_LIST="salt-formula-gnocchi"
62 + ENV SALT_FORMULA_LIST $SALT_FORMULA_LIST
63 + ENV APT_REPOSITORY "deb [arch=amd64] http://apt.mirantis.com/xenial ${SALT_FORMULA_VERSION} salt"
64 + ENV APT_REPOSITORY_GPG "http://apt.mirantis.com/public.gpg"
65 + RUN echo "Layer extra salt-formulas packages" \
66 + && echo "$APT_REPOSITORY" | tee /etc/apt/sources.list.d/salt-formulas.list >/dev/null \
67 + && curl -sL $APT_REPOSITORY_GPG | $SUDO apt-key add - \
68 + && eval ${LAYER_PKGUPDT} \
69 + && ${LAYER_INSTALL} ${SALT_FORMULA_LIST} -y --fix-missing -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
70 + && eval ${LAYER_CLEANUP}
71 + RUN echo "Layer with OPNFV packages" \
72 + && eval ${LAYER_PKGUPDT} \
73 + && ${LAYER_INSTALL} \
86 + && useradd -m ubuntu \
87 + && echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/ubuntu \
88 + && eval ${LAYER_CLEANUP}
94 diff --git a/Pipfile b/Pipfile
95 index d3e8d66..340e125 100644
98 @@ -7,8 +7,8 @@ name = "pypi"
102 -docker-make = {git = "https://github.com/avirshup/DockerMake"}
103 -dockermake = {git = "https://github.com/avirshup/DockerMake"}
104 +docker-make = {git = "https://github.com/avirshup/DockerMake", ref = "aeac230fd5ab468d806bf42b120aa97f91eb40a2"}
105 +dockermake = {git = "https://github.com/avirshup/DockerMake", ref = "aeac230fd5ab468d806bf42b120aa97f91eb40a2"}
108 python_version = "3.6"