Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PR #703/02ebce22 backport][3.49] Upgrade pulp-web image to latest nginx image #705

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES/644.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Upgrade pulp-web images to use latest nginx images.
1 change: 1 addition & 0 deletions CHANGES/702.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed publishing arm64 & amd64 variants for pulp-web image.
4 changes: 2 additions & 2 deletions images/compose/assets/bin/nginx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion images/compose/assets/nginx/nginx.conf.template
Original file line number Diff line number Diff line change
Expand Up @@ -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/ {
Expand Down Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion images/compose/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions images/pulp-minimal/nightly/Containerfile.webserver
Original file line number Diff line number Diff line change
Expand Up @@ -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;"
6 changes: 3 additions & 3 deletions images/pulp-minimal/stable/Containerfile.webserver
Original file line number Diff line number Diff line change
Expand Up @@ -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;"
9 changes: 4 additions & 5 deletions images/s6_assets/pulp_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading