diff --git a/.github/workflows/build_containers.yml b/.github/workflows/build_containers.yml index 114dc6e32518..696e2fab21ad 100644 --- a/.github/workflows/build_containers.yml +++ b/.github/workflows/build_containers.yml @@ -7,37 +7,7 @@ env: IMAGE_NAME: ${{ github.repository }} jobs: - build-and-push-server-all-in-one-image: - runs-on: ubuntu-latest - permissions: - contents: read - packages: write - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Log in to the Container registry - uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d - with: - registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38 - with: - images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-test-server-all-in-one - - - name: Build and push Docker image - uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc - with: - context: ./testsuite/dockerfiles/server-all-in-one/ - push: true - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} build-and-push-server-all-in-one-dev-image: - needs: build-and-push-server-all-in-one-image runs-on: ubuntu-latest permissions: contents: read @@ -67,8 +37,8 @@ jobs: tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} build-args: | - BASE=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}/ci-test-server-all-in-one - VERSION=master + BASE=registry.opensuse.org/uyuni/server + VERSION=2023.12 build-and-push-ubuntu-minion-image: runs-on: ubuntu-latest permissions: diff --git a/testsuite/dockerfiles/server-all-in-one/Dockerfile b/testsuite/dockerfiles/server-all-in-one/Dockerfile deleted file mode 100644 index 8d7b2b05ab5e..000000000000 --- a/testsuite/dockerfiles/server-all-in-one/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -FROM registry.suse.com/bci/bci-init:15.5 -# from https://raw.githubusercontent.com/rjmateus/uyuni-container/main/uyuni/Dockerfile - -RUN zypper ar -G http://download.opensuse.org/update/leap/15.5/backports/ backports_update_repo -RUN zypper ar -G http://download.opensuse.org/distribution/leap/15.5/repo/oss/ os_pool_repo -RUN zypper ar -G http://download.opensuse.org/update/leap/15.5/oss/ os_update_repo -RUN zypper ar -G http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/images/repo/Uyuni-Server-POOL-x86_64-Media1/ server_pool_repo -RUN zypper ar -G http://download.opensuse.org/update/leap/15.5/sle/ sle_update_repo -RUN zypper ar -G http://download.opensuse.org/repositories/systemsmanagement:/Uyuni:/Stable/images/repo/Testing-Overlay-POOL-x86_64-Media1/ testing_overlay_devel_repo - -copy setup_env.sh /root/setup_env.sh - -RUN zypper ref -RUN zypper -n in vi openssh-server -RUN zypper --non-interactive install --auto-agree-with-licenses --force-resolution patterns-uyuni_server -RUN zypper mr -d repo-backports-update repo-sle-update - -# hack to correct the report db script to work on containers -RUN cp /usr/bin/uyuni-setup-reportdb /usr/bin/uyuni-setup-reportdb.original -RUN sed -i 's/sysctl kernel.shmmax/#sysctl kernel.shmmax/g' /usr/bin/uyuni-setup-reportdb -RUN sed -i 's/-a "$PG_SOCKET"//g' /usr/bin/uyuni-setup-reportdb - -# hack to fix pam for podman -COPY etc_pam.d_sshd /etc/pam.d/sshd - -EXPOSE 443/tcp -EXPOSE 80/tcp -EXPOSE 4505/tcp -EXPOSE 4506/tcp - - -CMD ["/usr/lib/systemd/systemd"] -HEALTHCHECK --interval=5s --timeout=5s --retries=5 CMD ["/usr/bin/systemctl", "is-active", "multi-user.target"] - - diff --git a/testsuite/dockerfiles/server-all-in-one/etc_pam.d_sshd b/testsuite/dockerfiles/server-all-in-one/etc_pam.d_sshd deleted file mode 100644 index 7862c01274bf..000000000000 --- a/testsuite/dockerfiles/server-all-in-one/etc_pam.d_sshd +++ /dev/null @@ -1,11 +0,0 @@ -#%PAM-1.0 -auth requisite pam_nologin.so -auth include common-auth -account requisite pam_nologin.so -account include common-account -password include common-password -session optional pam_loginuid.so -session include common-session -session optional pam_lastlog.so silent noupdate showfailed -session optional pam_keyinit.so force revoke - diff --git a/testsuite/dockerfiles/server-all-in-one/setup_env.sh b/testsuite/dockerfiles/server-all-in-one/setup_env.sh deleted file mode 100644 index e2fe577c04e5..000000000000 --- a/testsuite/dockerfiles/server-all-in-one/setup_env.sh +++ /dev/null @@ -1,24 +0,0 @@ -MANAGER_USER="spacewalk" -MANAGER_PASS="spacewalk" -MANAGER_ADMIN_EMAIL="galaxy-noise@suse.de" -CERT_O="SUSE" -CERT_OU="SUSE" -CERT_CITY="Nuernberg" -CERT_STATE="Bayern" -CERT_COUNTRY="DE" -CERT_EMAIL="galaxy-noise@suse.de" -CERT_PASS="spacewalk" -USE_EXISTING_CERTS="N" -MANAGER_DB_NAME="susemanager" -MANAGER_DB_HOST="localhost" -MANAGER_DB_PORT="5432" -MANAGER_DB_PROTOCOL="TCP" -MANAGER_ENABLE_TFTP="Y" -#SCC_USER="" -#SCC_PASS="" -#REPORT_DB_HOST="localhost" -#REPORT_DB_PORT="5432" -#REPORT_DB_NAME="reportdb" -#REPORT_DB_USER="pythia_susemanager" -#REPORT_DB_PASS="pythia_susemanager" - diff --git a/testsuite/podman_runner/07_start_server.sh b/testsuite/podman_runner/07_start_server.sh index 41477fad3404..ac83eda65a0a 100755 --- a/testsuite/podman_runner/07_start_server.sh +++ b/testsuite/podman_runner/07_start_server.sh @@ -2,7 +2,7 @@ set -xe src_dir=$(cd $(dirname "$0")/../.. && pwd -P) -sudo -i podman run --rm \ +sudo -i podman run --cap-add AUDIT_CONTROL --rm \ --tmpfs /run \ -v ${src_dir}/schema/spacewalk/spacewalk-schema-upgrade:/usr/bin/spacewalk-schema-upgrade \ -v ${src_dir}/testsuite:/testsuite \ diff --git a/testsuite/podman_runner/08_manager_setup.sh b/testsuite/podman_runner/08_manager_setup.sh index 778c875b8b7c..ff8c0eaa06af 100755 --- a/testsuite/podman_runner/08_manager_setup.sh +++ b/testsuite/podman_runner/08_manager_setup.sh @@ -4,7 +4,7 @@ set -xe src_dir=$(cd $(dirname "$0")/../.. && pwd -P) sudo -i podman exec uyuni-server-all-in-one-test bash -c "/testsuite/podman_runner/provide-db-schema.sh" -sudo -i podman exec uyuni-server-all-in-one-test bash -c "/usr/lib/susemanager/bin/mgr-setup -l /var/log/susemanager_setup.log -s" +sudo -i podman exec -e CERT_O="test_org" -e CERT_OU="test_ou" -e CERT_CITY="test_city" -e CERT_STATE="test_state" -e CERT_COUNTRY="DE" -e CERT_EMAIL="a@b.com" -e CERT_CNAMES="uyuni-server-all-in-one-test" -e CERT_PASS="spacewalk" -e UYUNI_FQDN="uyuni-server-all-in-one-test" -e MANAGER_USER="admin" -e MANAGER_PASS="spacewalk" -e MANAGER_ADMIN_EMAIL="a@b.com" -e MANAGER_MAIL_FROM="a@b.com" -e MANAGER_ENABLE_TFTP="n" -e MANAGER_DB_NAME="manager" -e MANAGER_DB_HOST="localhost" -e MANAGER_DB_PORT="5432" -e MANAGER_DB_USER="manager" -e MANAGER_DB_PASS="manager" -e MANAGER_DB_PROTOCOL="TCP" -e REPORT_DB_NAME="reportdb" -e REPORT_DB_USER="pythia_susemanager" -e REPORT_DB_PASS="pythia_susemanager" -e EXTERNALDB_ADMIN_USER="" -e EXTERNALDB_ADMIN_PASS="" -e EXTERNALDB_PROVIDER="" -e ISS_PARENT="" -e ACTIVATE_SLP="" -e SCC_USER="" -e SCC_PASS="" uyuni-server-all-in-one-test bash -c "/usr/lib/susemanager/bin/mgr-setup -l /var/log/susemanager_setup.log -s" sudo -i podman exec uyuni-server-all-in-one-test bash -c "/usr/bin/spacewalk-schema-upgrade -y" # Make sure latest sql migration scripts have been executed for both the main and the reporting database