[minion] Set tcp_keepalive for flaky networks
[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 * Preinstall `salt_minion_dependency_packages` and
20   `salt_minion_reclass_dependencies`;
21
22 Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
23 ---
24  DockerMake.yml | 36 +++++++++++++++++++++++++++++++++++-
25  1 file changed, 35 insertions(+), 1 deletion(-)
26
27 diff --git a/DockerMake.yml b/DockerMake.yml
28 index 2c75586..d7d4c49 100644
29 --- a/DockerMake.yml
30 +++ b/DockerMake.yml
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 (25 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}
41
42 +opnfv:
43 +  build: |
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} \
60 +           gawk \
61 +           inetutils-ping \
62 +           kmod \
63 +           net-tools \
64 +           openssh-server \
65 +           python-m2crypto \
66 +           python-msgpack \
67 +           python-netaddr \
68 +           python-oauth \
69 +           python-psutil \
70 +           python-yaml \
71 +      && useradd -m ubuntu \
72 +      && echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' > /etc/sudoers.d/ubuntu \
73 +      && eval ${LAYER_CLEANUP}
74 +
75 +
76  wheel:
77    requires:
78      - base