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, 30 Jan 2019 17:21:03 +0100
11 Subject: [PATCH] Add saltminion-maas build target
14 DockerMake.yml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++
16 2 files changed, 69 insertions(+)
18 diff --git a/DockerMake.yml b/DockerMake.yml
19 index f30024c..a23541c 100644
22 @@ -50,6 +50,70 @@ common:
23 && eval ${LAYER_CLEANUP}
30 + ENV container docker
31 + ARG SALT_VERSION="stable"
32 + ENV SALT_VERSION $SALT_VERSION
33 + ARG SALT_BOOTSTRAP_OPTS="-PdX ${SALT_VERSION}"
34 + ENV SALT_BOOTSTRAP_OPTS $SALT_BOOTSTRAP_OPTS
35 + RUN echo "Layer with MaaS, salt-minion packages" \
36 + && eval ${LAYER_PKGUPDT} \
37 + && apt-get upgrade -qy \
38 + && ${LAYER_INSTALL} maas-common systemd \
39 + && find /etc/systemd/system \
40 + /lib/systemd/system \
42 + -not -name '*journald*' \
43 + -not -name '*systemd-tmpfiles*' \
44 + -not -name '*systemd-user-sessions*' \
46 + && systemctl set-default multi-user.target \
47 + && ${LAYER_INSTALL} \
53 + iptables-persistent \
59 + maas-rack-controller \
73 + && apt-get download maas-region-controller \
74 + && dpkg-deb --extract maas-region-controller*.deb maas-region-controller \
75 + && dpkg-deb --control maas-region-controller*.deb maas-region-controller/DEBIAN \
76 + && mkdir -p /var/lib/opnfv/etc \
77 + && mv maas-region-controller/DEBIAN/postinst /var/lib/opnfv/maas-region-controller.postinst \
78 + && dpkg-deb --build maas-region-controller \
79 + && dpkg -i maas-region-controller.deb \
81 + && mv /var/lib/maas /var/lib/postgresql /var/lib/opnfv/ \
82 + && mv /etc/maas /etc/ssh /var/lib/opnfv/etc/ \
83 + && mv /var/lib/opnfv/maas-region-controller.postinst /var/lib/dpkg/info/ \
84 + && python -m pip install -U jinja2==2.11.0 \
85 + && curl -qL https://raw.githubusercontent.com/saltstack/salt-bootstrap/stable/bootstrap-salt.sh | $SUDO sh -s -- -A cfg01 ${SALT_BOOTSTRAP_OPTS} \
86 + && eval ${LAYER_CLEANUP}
87 + ENTRYPOINT ["/bin/bash", "-c", "/entrypoint.sh && exec /lib/systemd/systemd"]
93 diff --git a/invoke.yml b/invoke.yml
94 index 291f4c7..a2f4614 100644
97 @@ -62,6 +62,11 @@ target:
108 destination: 'images'