Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-15-SP1:Update
uyuni-proxy-systemd-services.33434
uyuni-proxy-systemd-services-git-0.7708b66.obscpio
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File uyuni-proxy-systemd-services-git-0.7708b66.obscpio of Package uyuni-proxy-systemd-services.33434
07070100000000000041FD0000000000000000000000026619489300000000000000000000000000000000000000000000001D00000000uyuni-proxy-systemd-services07070100000001000081B4000000000000000000000001661948930000050A000000000000000000000000000000000000002700000000uyuni-proxy-systemd-services/README.md# General usage In order to run the containers, generate a configuration using one of: * `spacecmd proxy_container_config` command, * `spacecmd proxy_container_config_generate_cert` command * or the web UI Unpack the configuration file in `/etc/uyuni/proxy` and start the services by running `systemctl start pod-proxy-pod.service`. Edit the `/etc/sysconfig/uyuni-proxy-systemd-services` file if you need to add more options to the `podman` pod running command. # Advanced options In order to change the default images registry, namespace and tag, edit the `NAMESPACE` and `TAG` variables in `/etc/sysconfig/uyuni-proxy-systemd-services` file. Restart the `uyuni-proxy-pod` service is required to apply the change. # Required volumes In order to persist the caches and tftp boot files, the pod uses volumes. Those are automatically created when the containers are started, but you can create and populate them in advance. The volume names are: * uyuni-proxy-squid-cache * uyuni-proxy-rhn-cache * uyuni-proxy-tftpboot See the `podman-volume-create` and `podman-volume-import` man pages for more information on how to create custom volumes. # Getting logs You can get logs from the `uyuni-proxy-*` services using `journalctl`. You can also use `podman logs` using the same names. 07070100000002000081B400000000000000000000000166194893000004CD000000000000000000000000000000000000003700000000uyuni-proxy-systemd-services/uyuni-proxy-httpd.service# uyuni-proxy-httpd.service # autogenerated by Podman 2.1.1 # Tue Mar 1 09:09:51 CET 2022 [Unit] Description=Uyuni proxy httpd container service Wants=network.target After=network-online.target BindsTo=uyuni-proxy-pod.service After=uyuni-proxy-pod.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n EnvironmentFile=/etc/sysconfig/uyuni-proxy-systemd-services EnvironmentFile=/etc/sysconfig/proxy EnvironmentFile=-/etc/sysconfig/uyuni-proxy-httpd-service Restart=on-failure ExecStartPre=/bin/rm -f %t/uyuni-proxy-httpd.pid %t/uyuni-proxy-httpd.ctr-id ExecStart=/usr/bin/podman run \ --conmon-pidfile %t/uyuni-proxy-httpd.pid \ --cidfile %t/uyuni-proxy-httpd.ctr-id \ --cgroups=no-conmon \ --pod-id-file %t/uyuni-proxy-pod.pod-id -d \ --replace -dt -v /etc/uyuni/proxy:/etc/uyuni:ro -v uyuni-proxy-rhn-cache:/var/cache/rhn -v uyuni-proxy-tftpboot:/srv/tftpboot \ --name uyuni-proxy-httpd ${NAMESPACE}/proxy-httpd:${TAG} ExecStop=/usr/bin/podman stop --ignore --cidfile %t/uyuni-proxy-httpd.ctr-id -t 10 ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/uyuni-proxy-httpd.ctr-id PIDFile=%t/uyuni-proxy-httpd.pid TimeoutStopSec=60 Type=forking [Install] WantedBy=multi-user.target default.target 07070100000003000081B40000000000000000000000016619489300000561000000000000000000000000000000000000003500000000uyuni-proxy-systemd-services/uyuni-proxy-pod.service# uyuni-proxy-pod.service # autogenerated by Podman 2.1.1 # Tue Mar 1 09:09:51 CET 2022 [Unit] Description=Podman uyuni-proxy-pod.service Wants=network.target After=network-online.target Requires=uyuni-proxy-httpd.service uyuni-proxy-salt-broker.service uyuni-proxy-squid.service uyuni-proxy-ssh.service uyuni-proxy-tftpd.service Before=uyuni-proxy-httpd.service uyuni-proxy-salt-broker.service uyuni-proxy-squid.service uyuni-proxy-ssh.service uyuni-proxy-tftpd.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n EnvironmentFile=/etc/sysconfig/uyuni-proxy-systemd-services EnvironmentFile=/etc/sysconfig/proxy Restart=on-failure ExecStartPre=/bin/rm -f %t/uyuni-proxy-pod.pid %t/uyuni-proxy-pod.pod-id ExecStartPre=/usr/bin/podman pod create --infra-conmon-pidfile %t/uyuni-proxy-pod.pid --pod-id-file %t/uyuni-proxy-pod.pod-id --name proxy-pod --publish 8022:22 --publish 69:69/udp --publish 8080:8080 --publish 443:443 --publish 80:80 --publish 4505:4505 --publish 4506:4506 --replace $EXTRA_POD_ARGS ExecStart=/usr/bin/podman pod start --pod-id-file %t/uyuni-proxy-pod.pod-id ExecStop=/usr/bin/podman pod stop --ignore --pod-id-file %t/uyuni-proxy-pod.pod-id -t 10 ExecStopPost=/usr/bin/podman pod rm --ignore -f --pod-id-file %t/uyuni-proxy-pod.pod-id PIDFile=%t/uyuni-proxy-pod.pid TimeoutStopSec=60 Type=forking [Install] WantedBy=multi-user.target default.target 07070100000004000081B400000000000000000000000166194893000004C7000000000000000000000000000000000000003D00000000uyuni-proxy-systemd-services/uyuni-proxy-salt-broker.service# uyuni-proxy-salt-broker.service # autogenerated by Podman 2.1.1 # Tue Mar 1 09:09:51 CET 2022 [Unit] Description=Uyuni proxy salt broker container service Wants=network.target After=network-online.target BindsTo=uyuni-proxy-pod.service After=uyuni-proxy-pod.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n EnvironmentFile=/etc/sysconfig/uyuni-proxy-systemd-services EnvironmentFile=/etc/sysconfig/proxy EnvironmentFile=-/etc/sysconfig/uyuni-proxy-salt-broker-service Restart=on-failure ExecStartPre=/bin/rm -f %t/uyuni-proxy-salt-broker.pid %t/uyuni-proxy-salt-broker.ctr-id ExecStart=/usr/bin/podman run \ --conmon-pidfile %t/uyuni-proxy-salt-broker.pid \ --cidfile %t/uyuni-proxy-salt-broker.ctr-id \ --cgroups=no-conmon \ --pod-id-file %t/uyuni-proxy-pod.pod-id -d \ --replace -dt -v /etc/uyuni/proxy:/etc/uyuni:ro \ --name uyuni-proxy-salt-broker ${NAMESPACE}/proxy-salt-broker:${TAG} ExecStop=/usr/bin/podman stop --ignore --cidfile %t/uyuni-proxy-salt-broker.ctr-id -t 10 ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/uyuni-proxy-salt-broker.ctr-id PIDFile=%t/uyuni-proxy-salt-broker.pid TimeoutStopSec=60 Type=forking [Install] WantedBy=multi-user.target default.target 07070100000005000081B40000000000000000000000016619489300000291000000000000000000000000000000000000003900000000uyuni-proxy-systemd-services/uyuni-proxy-services.config# This file is expected to be found in `/etc/sysconfig/container-proxy-services.config`, # the EnvironmentFile services property is pointing there # Where to get the images from if not defined otherwise in a service-specific configuration # It should contain the registry FQDN and path to the proxy-* images without trailing slash NAMESPACE=registry.opensuse.org/uyuni # Tag of the images to pull if not defined otherwise in a service-specific configuration TAG=latest # Pass additional parameters to the pod start command. # # Example: # ADD_HOSTS='--add-host=server.tf.local:192.168.122.254 --add-host=client.tf.local:192.168.122.89' EXTRA_POD_ARGS='' 07070100000006000081B400000000000000000000000166194893000004A7000000000000000000000000000000000000003700000000uyuni-proxy-systemd-services/uyuni-proxy-squid.service# uyuni-proxy-squid.service # autogenerated by Podman 2.1.1 # Tue Mar 1 09:09:51 CET 2022 [Unit] Description=Uyuni proxy squid container service Wants=network.target After=network-online.target BindsTo=uyuni-proxy-pod.service After=uyuni-proxy-pod.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n EnvironmentFile=/etc/sysconfig/uyuni-proxy-systemd-services EnvironmentFile=/etc/sysconfig/proxy EnvironmentFile=-/etc/sysconfig/uyuni-proxy-squid-service Restart=on-failure ExecStartPre=/bin/rm -f %t/uyuni-proxy-squid.pid %t/uyuni-proxy-squid.ctr-id ExecStart=/usr/bin/podman run \ --conmon-pidfile %t/uyuni-proxy-squid.pid \ --cidfile %t/uyuni-proxy-squid.ctr-id \ --cgroups=no-conmon \ --pod-id-file %t/uyuni-proxy-pod.pod-id \ --replace -d -v /etc/uyuni/proxy:/etc/uyuni:ro -v uyuni-proxy-squid-cache:/var/cache/squid \ --name uyuni-proxy-squid ${NAMESPACE}/proxy-squid:${TAG} ExecStop=/usr/bin/podman stop --ignore --cidfile %t/uyuni-proxy-squid.ctr-id -t 10 ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/uyuni-proxy-squid.ctr-id PIDFile=%t/uyuni-proxy-squid.pid TimeoutStopSec=60 Type=forking [Install] WantedBy=multi-user.target default.target 07070100000007000081B40000000000000000000000016619489300000467000000000000000000000000000000000000003500000000uyuni-proxy-systemd-services/uyuni-proxy-ssh.service# uyuni-proxy-ssh.service # autogenerated by Podman 2.1.1 # Tue Mar 1 09:09:51 CET 2022 [Unit] Description=Uyuni proxy SSH container service Wants=network.target After=network-online.target BindsTo=uyuni-proxy-pod.service After=uyuni-proxy-pod.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n EnvironmentFile=/etc/sysconfig/uyuni-proxy-systemd-services EnvironmentFile=/etc/sysconfig/proxy EnvironmentFile=-/etc/sysconfig/uyuni-proxy-ssh-service Restart=on-failure ExecStartPre=/bin/rm -f %t/uyuni-proxy-ssh.pid %t/uyuni-proxy-ssh.ctr-id ExecStart=/usr/bin/podman run \ --conmon-pidfile %t/uyuni-proxy-ssh.pid \ --cidfile %t/uyuni-proxy-ssh.ctr-id \ --cgroups=no-conmon \ --pod-id-file %t/uyuni-proxy-pod.pod-id -d \ --replace -dt -v /etc/uyuni/proxy:/etc/uyuni:ro \ --name uyuni-proxy-ssh ${NAMESPACE}/proxy-ssh:${TAG} ExecStop=/usr/bin/podman stop --ignore --cidfile %t/uyuni-proxy-ssh.ctr-id -t 10 ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/uyuni-proxy-ssh.ctr-id PIDFile=%t/uyuni-proxy-ssh.pid TimeoutStopSec=60 Type=forking [Install] WantedBy=multi-user.target default.target 07070100000008000081B4000000000000000000000001661948930000002F000000000000000000000000000000000000004400000000uyuni-proxy-systemd-services/uyuni-proxy-systemd-services-rpmlintrcaddFilter('systemd-service-without-service_*') 07070100000009000081B400000000000000000000000166194893000009DF000000000000000000000000000000000000004200000000uyuni-proxy-systemd-services/uyuni-proxy-systemd-services.changes------------------------------------------------------------------- Fri Apr 12 16:39:18 CEST 2024 - rosuna@suse.com - version 4.3.12-0 * Update to SUSE Manager 4.3.12 ------------------------------------------------------------------- Tue Jan 23 14:26:13 CET 2024 - rosuna@suse.com - version 4.3.11-1 * Update the image version ------------------------------------------------------------------- Tue Aug 29 17:34:00 CEST 2023 - marina.latini@suse.com - version 4.3.10-1 * Update the image version ------------------------------------------------------------------- Tue Jun 27 23:06:32 CEST 2023 - marina.latini@suse.com - version 4.3.9-1 * Integrate the containerized proxy into the usual rel-eng workflow ------------------------------------------------------------------- Wed Feb 22 14:45:35 CET 2023 - jgonzalez@suse.com - version 4.3.8-1 * Allow using container images from different registry paths ------------------------------------------------------------------- Tue Nov 15 16:56:46 UTC 2022 - marina.latini@suse.com - version 4.3.7-1 * Expose /etc/sysconfig/proxy variables to container services (bsc#1202945) ------------------------------------------------------------------- Wed Jul 27 14:13:35 CEST 2022 - jgonzalez@suse.com - version 4.3.6-1 * Expose port 80 (bsc#1200142) * Use volumes rather than bind mounts * TFTPD to listen on udp port (bsc#1200968) * Add TAG variable in configuration ------------------------------------------------------------------- Tue May 10 10:02:30 CEST 2022 - jgonzalez@suse.com - version 4.3.5-1 * Fix containers namespaces in configuration ------------------------------------------------------------------- Tue May 10 10:00:13 CEST 2022 - jgonzalez@suse.com - version 4.3.4-1 * Rename container_images_path specfile macro to less generic one ------------------------------------------------------------------- Wed May 04 15:26:57 CEST 2022 - jgonzalez@suse.com - version 4.3.3-1 * Default to SUSE Manager images only when installed from SUSE Manager ------------------------------------------------------------------- Fri Apr 08 13:39:38 CEST 2022 - jgonzalez@suse.com - version 4.3.2-1 * Harmonize systemd services names and container names * Adapted to work on Enterprise Linux. * Add package to SLE and Client tools (jsc#SLE-24145) ------------------------------------------------------------------- Fri Mar 11 16:50:18 CET 2022 - jgonzalez@suse.com - version 4.3.1-1 * Initial systemd services for proxy containers 0707010000000A000081B40000000000000000000000016619489300000DD1000000000000000000000000000000000000003F00000000uyuni-proxy-systemd-services/uyuni-proxy-systemd-services.spec# # spec file for package uyuni-proxy-systemd-services # # Copyright (c) 2022 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define SERVICES uyuni-proxy-httpd uyuni-proxy-salt-broker uyuni-proxy-squid uyuni-proxy-ssh uyuni-proxy-tftpd uyuni-proxy-pod Name: uyuni-proxy-systemd-services Summary: Uyuni proxy server systemd services containers License: GPL-2.0-only Group: Applications/Internet Version: 4.3.12 Release: 0 URL: https://github.com/uyuni-project/uyuni Source0: %{name}-%{version}-0.tar.gz Source1: https://raw.githubusercontent.com/uyuni-project/uyuni/%{name}-%{version}-0/containers/proxy-systemd-services/%{name}-rpmlintrc BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildArch: noarch Requires: podman %if 0%{?suse_version} Requires(post): %fillup_prereq %endif BuildRequires: systemd-rpm-macros %description This package contains systemd services to run the Uyuni proxy containers using podman. %prep %setup -q %build %install install -d -m 755 %{buildroot}/%{_sysconfdir}/uyuni/proxy install -d -m 755 %{buildroot}/%{_localstatedir}/lib/uyuni/proxy-squid-cache install -d -m 755 %{buildroot}/%{_localstatedir}/lib/uyuni/proxy-rhn-cache install -d -m 755 %{buildroot}/%{_localstatedir}/lib/uyuni/proxy-tftpboot install -d -m 755 %{buildroot}%{_sbindir} %if "%{?susemanager_container_images_path}" != "" sed 's|^NAMESPACE=.*$|NAMESPACE=%{susemanager_container_images_path}|' -i uyuni-proxy-services.config %endif %if !0%{?is_opensuse} PRODUCT_VERSION=$(echo %{version} | sed 's/^\([0-9]\+\.[0-9]\+\).*$/\1/') %endif %if 0%{?rhel} install -D -m 644 uyuni-proxy-services.config %{buildroot}%{_sysconfdir}/sysconfig/uyuni-proxy-systemd-services.config %else install -D -m 644 uyuni-proxy-services.config %{buildroot}%{_fillupdir}/sysconfig.%{name} %endif for service in %{SERVICES}; do install -D -m 644 ${service}.service %{buildroot}%{_unitdir}/${service}.service ln -s /usr/sbin/service %{buildroot}%{_sbindir}/rc${service} done install -m 755 uyuni-proxy.sh %{buildroot}%{_sbindir}/uyuni-proxy.sh %check %pre %if !0%{?rhel} %service_add_pre %{SERVICES} %endif %post %if 0%{?suse_version} %fillup_only %endif %if 0%{?rhel} for service in %{SERVICES}; do %systemd_post ${service}.service done %else %service_add_post %{SERVICES} %endif %preun %if 0%{?rhel} for service in %{SERVICES}; do %systemd_preun ${service}.service done %else %service_del_preun %{SERVICES} %endif %postun %if 0%{?rhel} for service in %{SERVICES}; do %systemd_postun ${service}.service done %else %service_del_postun %{SERVICES} %endif %files %defattr(-,root,root) %doc README.md %{_unitdir}/*.service %{_sbindir}/rcuyuni-* %if 0%{?rhel} %{_sysconfdir}/sysconfig/uyuni-proxy-systemd-services.config %else %{_fillupdir}/sysconfig.%{name} %endif %{_sysconfdir}/uyuni %{_localstatedir}/lib/uyuni %{_sbindir}/uyuni-proxy.sh %changelog 0707010000000B000081B400000000000000000000000166194893000004AD000000000000000000000000000000000000003700000000uyuni-proxy-systemd-services/uyuni-proxy-tftpd.service# uyuni-proxy-tftpd.service # autogenerated by Podman 2.1.1 # Tue Mar 1 09:09:51 CET 2022 [Unit] Description=Uyuni proxy TFTP uyuni-container service Wants=network.target After=network-online.target BindsTo=uyuni-proxy-pod.service After=uyuni-proxy-pod.service [Service] Environment=PODMAN_SYSTEMD_UNIT=%n EnvironmentFile=/etc/sysconfig/uyuni-proxy-systemd-services EnvironmentFile=/etc/sysconfig/proxy EnvironmentFile=-/etc/sysconfig/uyuni-proxy-tftpd-service Restart=on-failure ExecStartPre=/bin/rm -f %t/uyuni-proxy-tftpd.pid %t/uyuni-proxy-tftpd.ctr-id ExecStart=/usr/bin/podman run \ --conmon-pidfile %t/uyuni-proxy-tftpd.pid \ --cidfile %t/uyuni-proxy-tftpd.ctr-id \ --cgroups=no-conmon \ --pod-id-file %t/uyuni-proxy-pod.pod-id -d \ --replace -dt -v /etc/uyuni/proxy:/etc/uyuni:ro -v uyuni-proxy-tftpboot:/srv/tftpboot:ro \ --name uyuni-proxy-tftpd ${NAMESPACE}/proxy-tftpd:${TAG} ExecStop=/usr/bin/podman stop --ignore --cidfile %t/uyuni-proxy-tftpd.ctr-id -t 10 ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/uyuni-proxy-tftpd.ctr-id PIDFile=%t/uyuni-proxy-tftpd.pid TimeoutStopSec=60 Type=forking [Install] WantedBy=multi-user.target default.target 0707010000000C000081FD0000000000000000000000016619489300000E40000000000000000000000000000000000000002C00000000uyuni-proxy-systemd-services/uyuni-proxy.sh#!/usr/bin/env bash ############################# SETUP ############################# set -Eeuo pipefail trap cleanup SIGINT SIGTERM ERR EXIT script_dir=$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd -P) cleanup() { trap - SIGINT SIGTERM ERR EXIT } msg() { echo >&2 -e "${1-}" } die() { local msg=$1 local code=${2-1} msg "$msg" exit "$code" } ############################# ROOT ############################# usage_root() { cat <<EOF Usage: proxy cli [-h] [-v] command [param...] A CLI tool to control the containerized proxy in the systemd-service mode. Available options: -h, --help Print this help and exit -v, --verbose Print script debug info update Updates a service with the new parameters reset Resets a service to the new parameters EOF exit } parse_root_params() { while :; do case "${1-}" in -h | --help) usage_root ;; -v | --verbose) ;; update) shift update "$@" ;; reset) shift reset "$@" ;; ?*) die "Unknown option: $1" ;; *) usage_root ;; esac shift done return 0 } ############################# UPDATE branch ############################# usage_update() { cat <<EOF Usage: proxy update command [param...] Updates a service with the new parameters. Available options: image Updates the configuration of a service -s name of the service -t image tag -r registry to pull from EOF exit } update() { args=("$@") if [ ${#args[@]} -eq 0 ]; then die "Missing script argument for update"; fi while :; do case "${1-}" in -h | --help) usage_update ;; image) shift update_image "$@" ;; *) die "Unknown option for update" ;; esac done exit 0 } update_image() { SERVICE='' REGISTRY='' TAG='' while getopts "s:t:r:" opt; do case $opt in s) case $OPTARG in "httpd" | "ssh" | "squid" | "salt-broker" | "tftpd") SERVICE=$OPTARG ;; ?*) die "Unknown service name" ;; esac ;; t) TAG=$OPTARG ;; r) REGISTRY=$OPTARG ;; \?) usage_update die "Invalid option: ${OPTARG}" ;; esac done if [ -z "${REGISTRY}" ]; then die "Missing registry -r"; fi if [ -z "${TAG}" ]; then die "Missing tag -t"; fi echo "updating the service ${SERVICE} with the new registry/tag ${REGISTRY}/${TAG}" mkdir -p /etc/sysconfig || die "Cannot update" cat >/etc/sysconfig/uyuni-proxy-"${SERVICE}"-service.config <<EOF NAMESPACE=$REGISTRY TAG=$TAG EOF systemctl daemon-reload || die "Cannot reload daemon" systemctl restart uyuni-proxy-"${SERVICE}"-service || die "Cannot restart restart uyuni-proxy-${SERVICE}-service" exit 0 } ############################# RESET branch ############################# reset() { SERVICE='' while getopts "s:" opt; do case $opt in s) case $OPTARG in "httpd" | "ssh" | "squid" | "salt-broker" | "tftpd") SERVICE=$OPTARG ;; ?*) die "Unknown service name" ;; esac ;; \?) die "Invalid option: ${OPTARG}" ;; esac done echo "resetting the config for service ${SERVICE} with the default parameters" rm -f /etc/sysconfig/uyuni-proxy-"${SERVICE}"-service.config || die "Cannot reset config" systemctl daemon-reload || die "Cannot reload daemon" systemctl restart uyuni-proxy-"${SERVICE}"-service || die "Cannot restart restart uyuni-proxy-${SERVICE}-service" exit 0 } ############################# entry ############################# parse_root_params "$@" 07070100000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000B00000000TRAILER!!!
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor