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

Add s2i-core version #121

Merged
merged 11 commits into from
Jun 29, 2017
Merged

Add s2i-core version #121

merged 11 commits into from
Jun 29, 2017

Conversation

omron93
Copy link
Contributor

@omron93 omron93 commented May 3, 2017

Discussed in #115

image name size content used by images
s2i-core ~183MB rhel7 base + s2i settings webstack, dbs
s2i-base ~423MB s2i-core + libraries perl python, php, ruby

(npm not added yet)

Which rpm packages should be installed in s2i-core and which in s2i-base?

I've choosed findutils, gettext, scl-utils, tar, yum-utils for core version. (installed in by database images or used in s2i scripts)

@bparees @hhorak @jsvgoncalves @torsava @GrahamDumpleton @pkubatrh Please take a look. Which rpms to install in s2i-core?

base/Dockerfile Outdated
RUN rpmkeys --import file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 && \
INSTALL_PKGS="autoconf \
automake \
bsdtar \
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think you need bsdtar in core (needed for s2i).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, added.

@@ -6,7 +6,7 @@
# IMAGE_NAME specifies a name of the candidate image used for testing.
# The image has to be available before this script is executed.
#
IMAGE_NAME=${IMAGE_NAME-openshift/base-centos7-candidate}
IMAGE_NAME=${IMAGE_NAME-centos/s2i-base-centos7-candidate}
Copy link
Member

Choose a reason for hiding this comment

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

Just out of curiosity, what's the reason behind this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This image is no longer built to openshift/ namespace. It is built as centos/s2i-base-centos7. This changes was forgotten to be done in #114

Copy link
Member

Choose a reason for hiding this comment

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

Ah, thanks!

base/Dockerfile Outdated
# This is the list of basic dependencies that all language Docker image can
# consume.
# Also setup the 'openshift' user that is used for the build execution and for the
# application runtime execution.
Copy link
Member

Choose a reason for hiding this comment

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

The user is not being set in the base so the comment should be removed. Also in tho .rhel7 version

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated.

base/Dockerfile Outdated
# Also setup the 'openshift' user that is used for the build execution and for the
# application runtime execution.
# TODO: Use better UID and GID values
RUN rpmkeys --import file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7 && \
Copy link
Member

@torsava torsava May 11, 2017

Choose a reason for hiding this comment

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

I believe this can be omitted since it's already in core.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated.

base/Dockerfile Outdated
which \
zlib-devel" && \
mkdir -p ${HOME}/.pki/nssdb && \
chown -R 1001:0 ${HOME}/.pki && \
Copy link
Member

Choose a reason for hiding this comment

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

I've tested it and it seems these two lines above can also be safely removed from the base.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated.

# application runtime execution.
# TODO: Use better UID and GID values
RUN yum repolist > /dev/null && \
yum-config-manager --enable rhel-7-server-optional-rpms && \
Copy link
Member

Choose a reason for hiding this comment

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

These two lines above should be able to be omitted as well.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, updated.

@torsava
Copy link
Member

torsava commented May 11, 2017

I've tried building s2i-python-container on top of the new base image and everything went well, all tests are passing. But let's see how dbs do when build against the core.

Just a note: I would have appreciated splitting the change into more commits so the diffs are easier to navigate.

I've made a few comments, however, overall the PR looks good to me. 👍

@omron93
Copy link
Contributor Author

omron93 commented May 12, 2017

@torsava Thanks for the review.

I've tried building s2i-python-container on top of the new base image and everything went well, all tests are passing. But let's see how dbs do when build against the core.

Github CI for container images is testing changes also for all images which uses this image as a base. So if CI pass tests for current s2i based images are passing too.

I'll try to test PRs for database images manually.

Just a note: I would have appreciated splitting the change into more commits so the diffs are easier to navigate.

Sorry. I've split it into more commits. I hope it is easier to review now.

core/README.md Outdated
`docker exec ... /bin/bash` command, the collection will be automatically enabled.

*Note*:
The language interpreter executables in the collection (e.g., `ruby`)
Copy link
Member

Choose a reason for hiding this comment

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

As this is s2i-core this should not mention language interpreter executables as none of the language images will be built directly upon s2i-core afaik.

Maybe write it in a general manner, something along the lines "Executables provided by the image layered upon s2i-core might not be present in a directory named in the PATH ..."

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks. I've made it more generic.

@torsava
Copy link
Member

torsava commented May 15, 2017

@omron93 Thanks for the commit split, it's much more readable now. And the changes look good as well!

@omron93
Copy link
Contributor Author

omron93 commented May 15, 2017

Pull requests with adding s2i support for database images (sclorg/mongodb-container#239 and sclorg/mariadb-container#32) are working with centos/s2i-core-centos7 as the base image.

@pkubatrh
Copy link
Member

LGTM, however we need to wait with merging this until after we manage to sync up in the rhel space.

@torsava
Copy link
Member

torsava commented May 24, 2017

@omron93 Regarding the movement from the contrib directory structure to the root directory structure as mandated by sclorg/container-common-scripts#8: Should I make a new PR or will you incorporate it here into yours?

@omron93
Copy link
Contributor Author

omron93 commented May 25, 2017

Should I make a new PR or will you incorporate it here into yours?

@torsava I can add the change into this PR.

@omron93
Copy link
Contributor Author

omron93 commented May 25, 2017

Rebased + contrib moved to /root/opt/app-root.

@hhorak
Copy link
Member

hhorak commented May 26, 2017

Sorry, I broke your PR again by merging #118. Anyway, there are two another issues, that make the tests fail:

  1. Failure on this line: https://github.com/omron93/s2i-base-container/blob/core-version/core/Dockerfile#L54
Step 8 : COPY bin/ /usr/bin/
lstat bin/: no such file or directory
  1. RHEL testing failing during squashing, maybe Updated hack/build.sh to use the newer docker-squash tool #110 might help (just re-started the test there to see whether docker-squash works)

@omron93 omron93 force-pushed the core-version branch 2 times, most recently from c539c79 to cb30e6d Compare May 26, 2017 08:19
@omron93
Copy link
Contributor Author

omron93 commented May 26, 2017

Rebased.

Failure on this line: https://github.com/omron93/s2i-base-container/blob/core-version/core/Dockerfile#L54
Step 8 : COPY bin/ /usr/bin/
lstat bin/: no such file or directory

Thanks. It is fixed now.

RHEL testing failing during squashing, maybe #110 might help (just re-started the test there to see whether docker-squash works)

This PR adds using of https://github.com/sclorg/container-common-scripts . So squashing should be updated there. (it needs to be fixed too... hopefully I'll do it next week)

@hhorak
Copy link
Member

hhorak commented Jun 28, 2017

@omron93 It looks like it is a good time for merging, so once you have some time to make the final rebase, please do and merge. Review is done I guess.

@omron93 omron93 force-pushed the core-version branch 2 times, most recently from 71b5eee to 9e09ce6 Compare June 29, 2017 10:32
@omron93
Copy link
Contributor Author

omron93 commented Jun 29, 2017

Tests are passing. So merging.

@omron93 omron93 merged commit 798c7a6 into sclorg:master Jun 29, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants