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

Ansible ubi upgrade #1990

Merged

Conversation

camilamacedo86
Copy link
Contributor

@camilamacedo86 camilamacedo86 commented Sep 28, 2019

Description of the change:

  • Upgrade ansible images to use ubi8 instead of 7 (for now it has the conditionals to pass in both)

NOTE:
To use ubi8 is required:
-to upgrade epel from 7 to 8 as well.
-python3-pip instead of python36-pip

Motivation
#1656

@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 28, 2019
@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Sep 28, 2019
@camilamacedo86 camilamacedo86 force-pushed the ansible-ubi-upgrade branch 3 times, most recently from 88e8dd8 to 13f2d22 Compare September 28, 2019 12:48
@camilamacedo86
Copy link
Contributor Author

/test e2e-aws-go
/test e2e-aws-helm
/test e2e-aws-ansible
/test e2e-aws-subcommand
/test images

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Sep 30, 2019
@camilamacedo86 camilamacedo86 force-pushed the ansible-ubi-upgrade branch 2 times, most recently from 6a6ec80 to 686516b Compare September 30, 2019 16:02
@openshift-ci-robot openshift-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Sep 30, 2019
ci/tests/e2e-ansible.sh Outdated Show resolved Hide resolved
@camilamacedo86 camilamacedo86 force-pushed the ansible-ubi-upgrade branch 2 times, most recently from 585bcf4 to eb15e97 Compare September 30, 2019 17:01
@openshift-ci-robot openshift-ci-robot removed the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Sep 30, 2019
@camilamacedo86
Copy link
Contributor Author

/test e2e-aws-go

Copy link
Member

@estroz estroz left a comment

Choose a reason for hiding this comment

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

/lgtm

after rebase

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 1, 2019
Copy link
Member

@joelanford joelanford left a comment

Choose a reason for hiding this comment

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

One comment about combining docker layers. I also want to experiment quickly with this because I was thinking there might be more simplifications we can make.

Comment on lines 25 to 42
RUN yum clean all && rm -rf /var/cache/yum/*

# todo; remove ubi7 after CI be updated with images
# ubi7
RUN if $(cat /etc/redhat-release | grep --quiet 'release 7'); then (yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm || true); fi
# ubi8
RUN if $(cat /etc/redhat-release | grep --quiet 'release 8'); then (yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm || true); fi

RUN yum -y update \
&& yum install -y python36-devel gcc

# ubi7
RUN if $(cat /etc/redhat-release | grep --quiet 'release 7'); then (yum install -y python36-pip || true); fi
# ubi8
RUN if $(cat /etc/redhat-release | grep --quiet 'release 8'); then (yum install -y python3-pip || true); fi

# Install inotify-tools. Note: rpm -i will install the rpm in the registry for allow yum install it.
RUN curl -O https://rpmfind.net/linux/fedora/linux/releases/30/Everything/x86_64/os/Packages/i/inotify-tools-3.14-16.fc30.x86_64.rpm \
Copy link
Member

Choose a reason for hiding this comment

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

I think we should still be able to use the \ <newline> && syntax to have this entire set of stuff happen in a single docker layer.

Copy link
Contributor Author

@camilamacedo86 camilamacedo86 Oct 1, 2019

Choose a reason for hiding this comment

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

We will remove all ifs in the next PR. It is just for don't break the CI. Then, all will come back to be just 1 layer. Is it make sense? WDYT? Could we move forward here?

Copy link
Member

Choose a reason for hiding this comment

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

I don't think there's a huge rush on this, and I think we should be more diligent than we normally would be because the ansible base image build is a pretty regular source of issues in CI.

I don't have a major problem with multi-layer vs. single layer since that shouldn't make a difference in the resulting image.

However, I'm a bit confused with some of the additions and changes for ubi8 and want to make sure that we get things right from the start.

  1. For ubi7, my impression is that we are installing the EPEL repo because it contains inotify-tools, so if we're using EPEL, we should be installing inotify-tools with yum install -y inotify-tools, not by downloading and manually installing.
  2. For ubi8, it appears that EPEL does not contain inotify-tools, so I don't think we should be installing EPEL in ubi8. In this case, I'm curious why it disappeared, and if it is now present in another repo, or if it has been removed entirely from RHEL/UBI8. I'd rather that we not download from rpmfind.net if there's an official place that inotify-tools has moved. And if it is totally removed from official RHEL/UBI8 repos, we should have a comment (and ideally a link to discussion about its removal) in the Dockerfile.

Copy link
Contributor Author

@camilamacedo86 camilamacedo86 Oct 2, 2019

Choose a reason for hiding this comment

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

Hi @joelanford,

Thank you for your review and inputs.

Just to clarify my idea was we do it now just to pass in the prow CI and then when we have the ubi8 we could improve it.

  • Regards the epel I think is a good spot and we can remove it. 👍
  • Regards the inotify-tools it was removed from rhel8 and we have for now inotify3-tools. So, let's try to use it now and avoid do the download. Note that if we run locally the docker image with then all is installed, so let's cross the fingers for inotify3-tools work well for us as inotify-tools and pass in all ci tests as well.

Please, let me know if has anything else that you would like to change and/or are you ok with move forward with now?

@joelanford
Copy link
Member

Also @camilamacedo86 can you remove the Jira link in the PR description and replace it with either direct text or a link to another public github issue. That Jira is private and not readable by the community.

@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Oct 1, 2019
Copy link
Member

@fabianvf fabianvf left a comment

Choose a reason for hiding this comment

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

/lgtm as long as we come back and fix the image layers right after everything merges.

@camilamacedo86
Copy link
Contributor Author

/test e2e-aws-subcommand
/test e2e-aws-ansible
/test e2e-aws-helm
/test e2e-aws-go

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 2, 2019
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Oct 2, 2019
@joelanford
Copy link
Member

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Oct 2, 2019
@camilamacedo86 camilamacedo86 merged commit 1a5772e into operator-framework:master Oct 2, 2019
@camilamacedo86 camilamacedo86 deleted the ansible-ubi-upgrade branch October 2, 2019 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants