546e4e9e292a9157211ba58a90d519a02847107c
[fuel.git] / mcp / patches / docker / 0002-OPNFV-package-installation-Ubuntu-user.patch
1 ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
2 : Copyright (c) 2018 Mirantis Inc., Enea AB and others.
3 :
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
12
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
16   workaround);
17 * While at it, create 'ubuntu' user so other OPNFV projects don't
18   have to switch to 'root' login;
19
20 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
21 ---
22  DockerMake.yml | 28 ++++++++++++++++++++++++++++
23  1 file changed, 28 insertions(+)
24
25 diff --git a/DockerMake.yml b/DockerMake.yml
26 index 2c75586..9b044a3 100644
27 --- a/DockerMake.yml
28 +++ b/DockerMake.yml
29 @@ -108,6 +108,34 @@ salt-formulas:
30        && bash -c 'source /srv/salt/formula-fetch.sh && setupPyEnv && fetchAll' \
31        && eval ${LAYER_CLEANUP}
32
33 +opnfv:
34 +  build: |
35 +    # Some formulas have empty git repos, use the package version
36 +    ARG SALT_FORMULA_VERSION="nightly"
37 +    ENV SALT_FORMULA_VERSION $SALT_FORMULA_VERSION
38 +    ARG SALT_FORMULA_LIST="salt-formula-gnocchi"
39 +    ENV SALT_FORMULA_LIST $SALT_FORMULA_LIST
40 +    ENV APT_REPOSITORY "deb http://apt.mirantis.com/xenial ${SALT_FORMULA_VERSION} salt"
41 +    ENV APT_REPOSITORY_GPG "http://apt.mirantis.com/public.gpg"
42 +    RUN echo "Layer extra salt-formulas packages" \
43 +      && echo "$APT_REPOSITORY" | tee /etc/apt/sources.list.d/salt-formulas.list >/dev/null \
44 +      && curl -sL $APT_REPOSITORY_GPG | $SUDO apt-key add - \
45 +      && eval ${LAYER_PKGUPDT} \
46 +      && ${LAYER_INSTALL} ${SALT_FORMULA_LIST} -y --fix-missing -o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
47 +      && eval ${LAYER_CLEANUP}
48 +    RUN echo "Layer with OPNFV packages" \
49 +      && eval ${LAYER_PKGUPDT} \
50 +      && ${LAYER_INSTALL} \
51 +           gawk \
52 +           inetutils-ping \
53 +           kmod \
54 +           net-tools \
55 +           openssh-server \
56 +      && useradd -m ubuntu \
57 +      && echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/ubuntu \
58 +      && eval ${LAYER_CLEANUP}
59 +
60 +
61  wheel:
62    requires:
63      - base