Skip to content

Use ubuntu image with pre-installed java 8 for IT docker#4970

Merged
leventov merged 8 commits intoapache:masterfrom
jon-wei:it_docker_jdk
Oct 18, 2017
Merged

Use ubuntu image with pre-installed java 8 for IT docker#4970
leventov merged 8 commits intoapache:masterfrom
jon-wei:it_docker_jdk

Conversation

@jon-wei
Copy link
Copy Markdown
Contributor

@jon-wei jon-wei commented Oct 17, 2017

The integration tests in Travis CI are failing because the docker image can't be built:

Location: http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1508271753_28541b80944dd708d047e6e43e9143b5 [following]
--2017-10-17 20:20:33--  http://download.oracle.com/otn-pub/java/jdk/8u144-b01/090f390dda5b47b9b721c7dfaa008135/jdk-8u144-linux-x64.tar.gz?AuthParam=1508271753_28541b80944dd708d047e6e43e9143b5
Connecting to download.oracle.com (download.oracle.com)|165.254.94.208|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2017-10-17 20:20:33 ERROR 404: Not Found.
download failed
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 oracle-java8-installer

The patch changes the integration test docker container to build from an ubuntu 14.04 image with these commands already completed:

-# Java 8		
 -RUN apt-get update \		
 -      && apt-get install -y software-properties-common \		
 -      && apt-add-repository -y ppa:webupd8team/java \		
 -      && apt-get purge --auto-remove -y software-properties-common \		
 -      && apt-get update \		
 -      && echo oracle-java-8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections \		
 -      && apt-get install -y oracle-java8-installer \		
 -      && apt-get install -y oracle-java8-set-default \		
 -      && rm -rf /var/cache/oracle-jdk8-installer

This is intended to be a temporary change, please refer to the comment in the PR change.

https://hub.docker.com/r/jonweiimply/ubuntu-j8/

@jon-wei
Copy link
Copy Markdown
Contributor Author

jon-wei commented Oct 18, 2017

integration tests are able to run with this patch now, but the latest run hit travis' job time limit

@jon-wei jon-wei changed the title Use OpenJDK8 instead of Oracle for IT docker (Don't merge) Use ubuntu image with pre-installed java 8 for IT docker Oct 18, 2017
@jon-wei
Copy link
Copy Markdown
Contributor Author

jon-wei commented Oct 18, 2017

Travis CI passes with this, if we're still having problems tomorrow with the integration tests related to the java 8 install, this will fix the issues for now.

&& apt-get install -y oracle-java8-installer \
&& apt-get install -y oracle-java8-set-default \
&& rm -rf /var/cache/oracle-jdk8-installer
FROM jonweiimply/ubuntu-j8
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This line certainly needs some comments, ideally describing the image, linking to the Dockerfile that produced the image, and linking to this issue. It should also be temporary; even if we want to use our own Docker base image long term, it should be something in an organization repo rather than a personal repo.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Added a comment on the temporary nature of the change and a link to the dockerhub page for the image, which has a description of the commands used to build it

@leventov leventov merged commit 9d91ffd into apache:master Oct 18, 2017
gianm pushed a commit to gianm/druid that referenced this pull request Oct 18, 2017
* Use OpenJDK8 instead of Oracle for IT docker

* install wget

* Use different docker image

* Revert "Use different docker image"

This reverts commit 5786c03.

* Revert "install wget"

This reverts commit 8d1d5ec.

* Revert "Use OpenJDK8 instead of Oracle for IT docker"

This reverts commit 55ea163.

* Use prebuilt java8 image

* Add comment on docker image
leventov pushed a commit to metamx/druid that referenced this pull request Oct 18, 2017
* Use OpenJDK8 instead of Oracle for IT docker

* install wget

* Use different docker image

* Revert "Use different docker image"

This reverts commit 5786c03.

* Revert "install wget"

This reverts commit 8d1d5ec.

* Revert "Use OpenJDK8 instead of Oracle for IT docker"

This reverts commit 55ea163.

* Use prebuilt java8 image

* Add comment on docker image
gianm added a commit that referenced this pull request Oct 18, 2017
* Use OpenJDK8 instead of Oracle for IT docker

* install wget

* Use different docker image

* Revert "Use different docker image"

This reverts commit 5786c03.

* Revert "install wget"

This reverts commit 8d1d5ec.

* Revert "Use OpenJDK8 instead of Oracle for IT docker"

This reverts commit 55ea163.

* Use prebuilt java8 image

* Add comment on docker image
@drcrallen
Copy link
Copy Markdown
Contributor

Can you explain more why an openjdk build does not suffice for integration tests?

I'm a bit worried about using something based on echo oracle-java-8-installer shared/accepted-oracle-license-v1-1 select true

@jon-wei
Copy link
Copy Markdown
Contributor Author

jon-wei commented Nov 8, 2017

@drcrallen When I last tried using OpenJDK instead of Oracle, the integration tests never completed, individual tests seemed to take up to 50% longer if I remember correctly, not sure why there was such slowdown

@drcrallen
Copy link
Copy Markdown
Contributor

Gotcha, thanks. This is helpful for any future questions or discussions on the matter.

@KenjiTakahashi
Copy link
Copy Markdown
Contributor

Be careful when using public, prebuilt Docker images with Oracle Java inside. It is not clear if it doesn't violate their convoluted licensing. Just saying, IANAL.

@gianm gianm added this to the 0.11.0 milestone Dec 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants