-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'uyuni-project:master' into ci_add_scc_mirror
- Loading branch information
Showing
94 changed files
with
833 additions
and
1,471 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ainers/server-image/server-image.changes.vzhestkov.add-saline-formula-to-server-container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Add saline-formula to the server container image |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# SPDX-License-Identifier: MIT | ||
#!BuildTag: uyuni/server-saline:latest | ||
|
||
ARG BASE=registry.suse.com/bci/bci-base:15.6 | ||
FROM $BASE | ||
|
||
ARG PRODUCT=Uyuni | ||
ARG VENDOR="Uyuni project" | ||
ARG URL="https://www.uyuni-project.org/" | ||
ARG REFERENCE_PREFIX="registry.opensuse.org/uyuni" | ||
|
||
RUN groupadd -r --gid 10554 salt && \ | ||
useradd -r -s /usr/sbin/nologin -g salt -d /var/lib/salt --uid 10554 salt | ||
|
||
# Main packages | ||
RUN zypper ref -f && zypper --non-interactive up | ||
RUN zypper --gpg-auto-import-keys --non-interactive install --auto-agree-with-licenses --force-resolution --download-only saline python3-saline | ||
RUN find /var/cache/zypp/packages/ -type f -name '*.rpm' | ||
RUN rpm -ivh --nodeps $(find /var/cache/zypp/packages/ -type f \ | ||
-name update-alternatives.rpm -o \ | ||
-name python3-base.rpm -o -name 'libpython3*.rpm' -o -name 'libopenssl1*.rpm' -o -name libexpat1.rpm -o \ | ||
-name python3-CherryPy.rpm -o -name python3-zc.lockfile.rpm -o -name python3-cheroot.rpm -o -name python3-six.rpm -o \ | ||
-name python3-portend.rpm -o -name python3-tempora.rpm -o \ | ||
-name salt.rpm -o -name python3-salt.rpm -o \ | ||
-name python3-contextvars.rpm -o -name python3-immutables.rpm -o -name python3-looseversion.rpm -o \ | ||
-name python3-packaging.rpm -o -name python3-distro.rpm -o \ | ||
-name python3-PyYAML.rpm -o -name 'libyaml*.rpm' -o -name python3-Jinja2.rpm -o -name python3-MarkupSafe.rpm -o \ | ||
-name python3-msgpack.rpm -o -name python3-more-itertools.rpm -o \ | ||
-name saline.rpm -o -name python3-saline.rpm -o -name python3-python-dateutil.rpm) | ||
RUN zypper clean --all | ||
|
||
RUN mkdir /etc/saline.defaults && cp -r /etc/salt/saline* /etc/saline.defaults/ | ||
RUN chown -R salt:salt /etc/saline.defaults | ||
|
||
# Build Service required labels | ||
# labelprefix=org.opensuse.uyuni.server-saline | ||
LABEL org.opencontainers.image.title="${PRODUCT} server saline container" | ||
LABEL org.opencontainers.image.description="Image contains the ${PRODUCT} server component to extend Salt capabilities" | ||
LABEL org.opencontainers.image.created="%BUILDTIME%" | ||
LABEL org.opencontainers.image.vendor="${VENDOR}" | ||
LABEL org.opencontainers.image.url="${URL}" | ||
LABEL org.opencontainers.image.name=server-saline-image | ||
LABEL org.opencontainers.image.version=5.1.0 | ||
LABEL org.openbuildservice.disturl="%DISTURL%" | ||
LABEL org.opensuse.reference="${REFERENCE_PREFIX}/salt-saline:${PRODUCT_VERSION}.%RELEASE%" | ||
# endlabelprefix | ||
|
||
COPY cleanup.sh /cleanup.sh | ||
RUN /bin/bash /cleanup.sh ; rm /cleanup.sh | ||
|
||
COPY run_saline.sh /run_saline.sh | ||
CMD ["/bin/bash", "/run_saline.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<services> | ||
<service mode="buildtime" name="kiwi_metainfo_helper"/> | ||
<service mode="buildtime" name="docker_label_helper"/> | ||
</services> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
find /etc -maxdepth 1 -type f -name '*-' -delete | ||
rm -rf /etc/salt /run/zypp.pid /srv/spm /usr/lib/rpm/macros.d/macros.python3 /usr/lib/sysimage/rpm/* \ | ||
/usr/share/doc /usr/share/licenses /usr/share/man | ||
find /var/log -maxdepth 1 -type f -name '*.log' | xargs -I /bin/bash -c "echo '' > {}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/bin/bash | ||
|
||
if test -n "$TZ" -a -f "/usr/share/zoneinfo/$TZ"; then | ||
ln -sf "/usr/share/zoneinfo/$TZ" /etc/localtime | ||
fi | ||
|
||
cp -r /etc/saline.defaults/saline* /etc/salt/ | ||
|
||
mkdir --parents /run/saline/pki | ||
chown --recursive salt:salt /run/saline | ||
chmod 0750 /run/saline/pki | ||
|
||
if [[ "$NOSSL" == "YES" ]]; then | ||
cat > /etc/salt/saline.d/restapi.conf <<EOL | ||
restapi: | ||
host: 0.0.0.0 | ||
disable_ssl: true | ||
EOL | ||
else | ||
cp /etc/pki/tls/certs/spacewalk.crt /run/saline/pki/saline.crt | ||
cp /etc/pki/tls/private/spacewalk.key /run/saline/pki/saline.key | ||
chown --recursive salt:salt /run/saline/pki | ||
cat > /etc/salt/saline.d/restapi.conf <<EOL | ||
restapi: | ||
host: 0.0.0.0 | ||
ssl_crt: /run/saline/pki/saline.crt | ||
ssl_key: /run/saline/pki/saline.key | ||
EOL | ||
fi | ||
|
||
chown --recursive salt:salt /etc/salt/saline* | ||
|
||
exec /usr/bin/salined -l info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Initial version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[buildconfig] | ||
tagger = tito.tagger.SUSEContainerTagger | ||
builder = custom.ContainerBuilder |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.