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

DRAFT :: Enhancement: solve issue #29255 - Change docker image from CentOS to Ubuntu20.04 #29374

Closed
wants to merge 3 commits into from

Conversation

dsmello
Copy link

@dsmello dsmello commented Dec 9, 2021

What does this PR do?

Chage the docker image from CentOS to Ubuntu20.04 and update the RUN commands.

Why is it important?

Closes #29255

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

Author's Checklist

  • Run tests at pipeline

How to test this PR locally

I don't know, will be tested at pipeline due the scale

Related issues

Davi Mello added 2 commits December 9, 2021 20:29
Changes Notes: To migratre from CentOS to Ubuntu, the following changes are needed:
- atk -> libatk1.0-0
- gtk -> GTK3 is installed by default REMOVED
- gdk -> libgdk-pixbuf2.0-dev
- xrandr -> x11-xserver-utils
- pango -> libpango-1.0-0
- libXcomposite -> libxcomposite-dev
- libXcursor -> libxcursor-dev
- libXdamage -> libxdamage-dev
- libXext -> libxext-dev
- libXi -> libxi-dev
- libXtst -> libxtst-dev
- libXScrnSaver -> libxss-dev
- libXrandr -> libxrandr-dev
- GConf2 -> libgconf2-4
- alsa-lib -> libasound2
- gtk3 -> GTK3 is installed by default REMOVED
- ipa-gothic-fonts -> fonts-ipafont-gothic
- xorg-x11-fonts-100dpi -> xfonts-100dpi
- xorg-x11-fonts-75dpi -> xfonts-75dpi
- xorg-x11-utils -> x11-utils
- xorg-x11-fonts-cyrillic -> xfonts-cyrillic
- xorg-x11-fonts-Type1 -> GET at xfonts-base
- xorg-x11-fonts-misc ->  xfonts-base
@dsmello dsmello requested a review from a team as a code owner December 9, 2021 20:38
@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 9, 2021
@cla-checker-service
Copy link

cla-checker-service bot commented Dec 9, 2021

❌ Author of the following commits did not sign a Contributor Agreement:
2853d59, 34df028, aac5ba9

Please, read and sign the above mentioned agreement if you want to contribute to this project

@mergify
Copy link
Contributor

mergify bot commented Dec 9, 2021

This pull request does not have a backport label. Could you fix it @dsmello? 🙏
To fixup this pull request, you need to add the backport labels for the needed
branches, such as:

  • backport-v./d./d./d is the label to automatically backport to the 7./d branch. /d is the digit

NOTE: backport-skip has been added to this pull request.

@mergify mergify bot added the backport-skip Skip notification from the automated backport with mergify label Dec 9, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented Dec 9, 2021

❕ Build Aborted

The PR is not allowed to run in the CI yet

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Reason: The PR is not allowed to run in the CI yet

  • Start Time: 2021-12-13T21:49:48.217+0000

  • Duration: 5 min 39 sec

  • Commit: aac5ba9

🤖 GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • /package : Generate the packages and run the E2E tests.

  • /beats-tester : Run the installation tests with beats-tester.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@@ -42,27 +42,48 @@ ENV BEAT_SETUID_AS={{ .user }}
{{- if contains .from "ubi-minimal" }}
RUN for iter in {1..10}; do microdnf update -y && microdnf install -y shadow-utils jq && microdnf clean all && exit_code=0 && break || exit_code=$? && echo "microdnf error: retry $iter in 10s" && sleep 10; done; (exit $exit_code)
{{- else }}
# Installing jq needs to be installed after epel-release and cannot be in the same yum install command.
RUN case $(arch) in aarch64) YUM_FLAGS="-x bind-license";; esac; \
Copy link
Author

Choose a reason for hiding this comment

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

The YUM_FLAGS was not requested when running ubuntu

done; \
(exit $exit_code)
{{- end }}

## Changes Notes: To migratre from CentOS to Ubuntu, the following changes are needed:
Copy link
Author

Choose a reason for hiding this comment

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

Those are all packages migrated from CentOs to Ubuntu related

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this temporarily for discussion or you plane to level this in here?

Copy link
Author

Choose a reason for hiding this comment

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

Hello @ruflin, this is for temporary discussion, I'll try to find where I add them to a changelog for future notes. 😸

@dsmello
Copy link
Author

dsmello commented Dec 11, 2021

run elasticsearch-ci/docs

@dsmello
Copy link
Author

dsmello commented Dec 11, 2021

/test

@ruflin ruflin added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Dec 13, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Dec 13, 2021
# alsa-lib -> libasound2
# gtk3 -> GTK3 is installed by default REMOVED
# ipa-gothic-fonts -> fonts-ipafont-gothic
# xorg-x11-fonts-100dpi -> xfonts-100dpi
Copy link
Contributor

Choose a reason for hiding this comment

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

@jsoriano @andrewkroh Do you remember what requires the xorg dependencies?

Copy link
Contributor

Choose a reason for hiding this comment

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

Blind guess: abrt-xorg.

The abrt-xorg service collects and processes information about crashes of the X.Org server.

Copy link
Member

Choose a reason for hiding this comment

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

That must be a dependency required by Synthetics.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, I missed the part below that it is only included in the "complete" image. Good to know it is not in the standard image.

@andrewvc FYI

Copy link
Contributor

Choose a reason for hiding this comment

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

Yep!


RUN for iter in {1..10}; do \
apt update -y && \
apt install --no-install-recommends --yes jq && \
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to add DEBIAN_FRONTEND=noninteractive in front of the apt install command here.

So it should be come:

DEBIAN_FRONTEND=noninteractive apt install --no-install-recommends --yes jq

exit_code=0 && break || exit_code=$? && echo "yum error: retry $iter in 10s" && sleep 10; \
RUN apt update -y && \
for iter in {1..10}; do \
apt install --no-install-recommends --yes libatk1.0-0 libgdk-pixbuf2.0-dev x11-xserver-utils libpango-1.0-0 libxcomposite-dev libxcursor-dev libxdamage-dev \
Copy link
Contributor

Choose a reason for hiding this comment

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

Same here add the DEBIAN_FRONTEND=noninteractive

@blakerouse
Copy link
Contributor

Closing in favor of #29681

@blakerouse blakerouse closed this Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-skip Skip notification from the automated backport with mergify Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change the base docker image to ubuntu 20.04 for Beats & Elastic Agent
7 participants