diff --git a/CHANGES/644.feature b/CHANGES/644.feature new file mode 100644 index 00000000..6b967aa0 --- /dev/null +++ b/CHANGES/644.feature @@ -0,0 +1 @@ +Upgrade pulp-web images to use latest nginx images. diff --git a/CHANGES/702.bugfix b/CHANGES/702.bugfix new file mode 100644 index 00000000..3bb6181a --- /dev/null +++ b/CHANGES/702.bugfix @@ -0,0 +1 @@ +Fixed publishing arm64 & amd64 variants for pulp-web image. diff --git a/images/compose/assets/bin/nginx.sh b/images/compose/assets/bin/nginx.sh index 961af745..f81e0e5f 100755 --- a/images/compose/assets/bin/nginx.sh +++ b/images/compose/assets/bin/nginx.sh @@ -18,11 +18,11 @@ fi echo "Nameserver is: $NAMESERVER" echo "Generating nginx config" -envsubst '$NAMESERVER' < /etc/opt/rh/rh-nginx116/nginx/nginx.conf.template > /etc/opt/rh/rh-nginx116/nginx/nginx.conf +envsubst '$NAMESERVER' < /etc/nginx/nginx.conf.template > /etc/nginx/nginx.conf # We cannot use upstream server groups with a DNS resolver without nginx plus # So we modifying the files to use the variables rather than the upstream server groups -for file in /opt/app-root/etc/nginx.default.d/*.conf ; do +for file in /etc/nginx/pulp/*.conf ; do echo "Modifying $file" sed -i 's/pulp-api/$pulp_api:24817/' $file sed -i 's/pulp-content/$pulp_content:24816/' $file diff --git a/images/compose/assets/nginx/nginx.conf.template b/images/compose/assets/nginx/nginx.conf.template index cf7ebb58..0260a1d7 100644 --- a/images/compose/assets/nginx/nginx.conf.template +++ b/images/compose/assets/nginx/nginx.conf.template @@ -41,6 +41,7 @@ http { # static files that can change dynamically, or are needed for TLS # purposes are served through the webserver. + # Should all of our requests for static files still be rooted through /opt? root /opt/app-root/src; location /pulp/content/ { @@ -73,7 +74,7 @@ http { proxy_pass http://$pulp_api:24817; } - include /opt/app-root/etc/nginx.default.d/*.conf; + include /etc/nginx/pulp/*.conf; location / { proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; diff --git a/images/compose/compose.yml b/images/compose/compose.yml index 6a57a298..733468d9 100644 --- a/images/compose/compose.yml +++ b/images/compose/compose.yml @@ -82,7 +82,7 @@ services: user: root volumes: - "./assets/bin/nginx.sh:/usr/bin/nginx.sh:Z" - - "./assets/nginx/nginx.conf.template:/etc/opt/rh/rh-nginx116/nginx/nginx.conf.template:Z" + - "./assets/nginx/nginx.conf.template:/etc/nginx/nginx.conf.template:Z" restart: always pulp_api: diff --git a/images/pulp-minimal/nightly/Containerfile.webserver b/images/pulp-minimal/nightly/Containerfile.webserver index 0a719bd5..58cc352f 100644 --- a/images/pulp-minimal/nightly/Containerfile.webserver +++ b/images/pulp-minimal/nightly/Containerfile.webserver @@ -9,10 +9,10 @@ RUN ln $(pip3 show pulp_python | sed -n -e 's/Location: //p')/pulp_python/app/we -FROM docker.io/centos/nginx-116-centos7:1.16 +FROM docker.io/nginx:latest - -COPY --from=builder /etc/nginx/pulp/*.conf "${NGINX_DEFAULT_CONF_PATH}"/ +RUN mkdir -p /etc/nginx/pulp +COPY --from=builder /etc/nginx/pulp/*.conf /etc/nginx/pulp # Run script uses standard ways to run the application CMD nginx -g "daemon off;" diff --git a/images/pulp-minimal/stable/Containerfile.webserver b/images/pulp-minimal/stable/Containerfile.webserver index a06076b1..1c3e5b0d 100644 --- a/images/pulp-minimal/stable/Containerfile.webserver +++ b/images/pulp-minimal/stable/Containerfile.webserver @@ -9,10 +9,10 @@ RUN ln $(pip3 show pulp_python | sed -n -e 's/Location: //p')/pulp_python/app/we -FROM docker.io/centos/nginx-116-centos7:1.16 +FROM docker.io/nginx:latest - -COPY --from=builder /etc/nginx/pulp/*.conf "${NGINX_DEFAULT_CONF_PATH}"/ +RUN mkdir -p /etc/nginx/pulp +COPY --from=builder /etc/nginx/pulp/*.conf /etc/nginx/pulp # Run script uses standard ways to run the application CMD nginx -g "daemon off;" diff --git a/images/s6_assets/pulp_tests.sh b/images/s6_assets/pulp_tests.sh index 6395f850..5f7b62ce 100755 --- a/images/s6_assets/pulp_tests.sh +++ b/images/s6_assets/pulp_tests.sh @@ -65,11 +65,10 @@ podman exec -u pulp pulp bash -c "pulpcore-manager add-signing-service --class d # Test buildah for pulp_container's usage podman exec -u pulp pulp podman system migrate -# This is currently not working due to a bug in it, so workaround below -# podman exec -u pulp pulp podman build https://github.com/openshift-examples/web.git -podman exec -u pulp pulp git clone https://github.com/openshift-examples/web.git /tmp/web -podman exec -u pulp pulp git -C /tmp/web checkout 7a5e95bbf7111f32be27b5fc9bc0070f844a03a3 -podman exec -u pulp pulp podman build /tmp/web +echo "FROM quay.io/quay/busybox:latest +CMD ['ls', '/']" > /tmp/Containerfile +podman exec -u pulp -i pulp bash -c "cat > /tmp/Containerfile" < /tmp/Containerfile +podman exec -u pulp pulp podman build /tmp # Test skopeo for pulp_container's usage with an image with the nobody uid 65534 # (And the image that pulp_container CI actually tests with)