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

Update postgresql to multi-arch to support s390x #16903

Closed
Closed
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
2 changes: 1 addition & 1 deletion dockerfiles/postgres/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# SPDX-License-Identifier: EPL-2.0
#

FROM centos/postgresql-96-centos7
FROM registry.access.redhat.com/rhscl/postgresql-10-rhel7
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to make sure that the upgrade for existed installation from postgresql 9.6 to 10 is working.
Have you tested it?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it work with docker.io/postgres:9.6.17-alpine or docker.io/postgres:9.6.17 (debian based)
(no bump of the postgres version) ?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skabashnyuk I must confess that this use case skipped from my mind. So if updating postgresql version is causing other overheads, I'll revert the changes for 9.6.17 as @benoitf has suggested.

@benoitf I am able to build che-postgres docker image using both variants you suggested i.e. docker.io/postgres:9.6.17-alpine and docker.io/postgres:9.6.17. Let me know your preference for the base image. Will update the PR with same.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@shahidhs-ibm there are quite a few scripts that make PostgreSQL installation possible https://github.com/eclipse/che/tree/master/dockerfiles/postgres can you check if they compatible with docker.io/postgres:9.6.17?
CC @tolusha

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@skabashnyuk The che-postgres docker image built with docker.io/postgres:9.6.17-alpine is not compatible with the scripts. The centos Vs alpine postgres images are built with different methodology which makes them incompatible.

This best possible approach is to extend postgresql-96 docker image support to s390x. We have raised an issue for this.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tolusha @nickboldt @benoitf Your updates?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The best way if we find (build ?) centos/postgresql-96-centos7 image for s390x platform
Otherwise we have to perform a lot of tests to be sure the previous deployments work well.
BTW codeready uses registry.redhat.io/rhscl/postgresql-96-rhel7:1-47

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tolusha Thanks for the update. Yes the best way will be to get the image from centos but we haven't got any response from community on issue we raised for code contribution. The registry.redhat.io/rhscl/postgresql-96-rhel7:1-47 which is used by CRW is unfortunately not multi-arch, so we don't have many options left other than using registry.redhat.io/rhel8/postgresql-96 or adding multi-arch support to centos/postgresql-96-centos7.

@nickboldt Could you please provide your inputs on using RH subscription image for postgres? Will it be OK?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nickboldt Any update?

Copy link
Contributor

@nickboldt nickboldt Dec 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that registry.redhat.io/rhscl/postgresql-96-rhel7:1-47 is single arch, amd64.

We switched to registry.redhat.io/rhel8/postgresql-96:1 to get support for Z and Power (it also includes arm).

For future reference, you can check the arches in a given image like this:

$➔ skopeo inspect docker://registry.redhat.io/rhel8/postgresql-96:1 --raw \
  | yq '.manifests[].platform.architecture' -r
amd64
arm64
ppc64le
s390x

I don't believe we can (yet) use authenticated RHEC images for Che builds. See #18292 (comment) for ongoing discussion.

ADD init-che-user-and-run.sh.erb init-che-user.sh.erb /var/lib/pgsql/
RUN cat /var/lib/pgsql/init-che-user.sh.erb | \
sed -e "/exit 0/d" > /var/lib/pgsql/init-che-user-and-run.sh && \
Expand Down