Skip to content

Commit

Permalink
[GEODE-8321] backport liberica changes to 1.12. (#5479)
Browse files Browse the repository at this point in the history
* First pass at switching to liberica jdk. (#5312) (#5458)

Authored-by: Sean Goller <sgoller@pivotal.io>
(cherry picked from commit be9a232)

* Change all tests to use liberica instead of openjdk. (#5474)

(cherry picked from commit 43a783b)
(cherry picked from commit cdf6846)
  • Loading branch information
smgoller authored and onichols-pivotal committed Jan 14, 2021
1 parent 9987851 commit 0333dad
Show file tree
Hide file tree
Showing 18 changed files with 45 additions and 19 deletions.
4 changes: 3 additions & 1 deletion ci/docker/Dockerfile
Expand Up @@ -13,7 +13,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
FROM openjdk:8
FROM bellsoft/liberica-openjdk-debian:8
ENTRYPOINT []

ARG CHROME_DRIVER_VERSION=2.35
Expand All @@ -33,6 +33,7 @@ RUN chmod +x /usr/local/bin/tini \
&& apt-get install -y --no-install-recommends \
apt-transport-https \
lsb-release \
gnupg2 \
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& echo "deb http://packages.cloud.google.com/apt cloud-sdk-$(lsb_release -c -s) main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
&& echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list \
Expand All @@ -47,6 +48,7 @@ RUN chmod +x /usr/local/bin/tini \
cgroupfs-mount \
docker-ce \
docker-compose \
git \
golang \
google-chrome-stable \
google-cloud-sdk \
Expand Down
2 changes: 1 addition & 1 deletion ci/images/alpine-tools/Dockerfile
Expand Up @@ -21,7 +21,7 @@ RUN apk --no-cache add \
musl-dev \
&& go get -v github.com/masterzen/winrm-cli

FROM openjdk:8-jdk-alpine
FROM bellsoft/liberica-openjdk-alpine:8

COPY --from=winrm-builder /root/go/bin/winrm-cli /usr/local/bin/winrm
COPY --from=google/cloud-sdk:alpine /google-cloud-sdk /google-cloud-sdk
Expand Down
Expand Up @@ -19,7 +19,7 @@ set -e

WORK_DIR=$(mktemp -d)

export JAVA_HOME=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64
export JAVA_HOME=/usr/lib/jvm/bellsoft-java${JAVA_BUILD_VERSION}-amd64
echo "JAVA_HOME is [${JAVA_HOME}]"

if [ -z ${JAVA_HOME} ]; then
Expand Down
6 changes: 5 additions & 1 deletion ci/images/google-geode-builder/scripts/setup.sh
Expand Up @@ -29,8 +29,10 @@ apt-get install -y --no-install-recommends \

echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list
echo "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list
echo "deb [arch=amd64] https://apt.bell-sw.com/ stable main" | sudo tee /etc/apt/sources.list.d/bellsoft.list
curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add -
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
curl -fsSL https://download.bell-sw.com/pki/GPG-KEY-bellsoft | apt-key add -
apt-get update
set +e && apt-get purge -y google-cloud-sdk lxc-docker && set -e
apt-get install -y --no-install-recommends \
Expand All @@ -56,7 +58,9 @@ apt-get install -y --no-install-recommends \
cp -R /etc/alternatives /etc/keep-alternatives
apt-get install -y --no-install-recommends \
openjdk-8-jdk \
openjdk-11-jdk
openjdk-11-jdk \
bellsoft-java11 \
bellsoft-java8
rm -rf /etc/alternatives
mv /etc/keep-alternatives /etc/alternatives

Expand Down
8 changes: 6 additions & 2 deletions ci/images/google-windows-geode-builder/packer.json
Expand Up @@ -78,9 +78,13 @@
"$ErrorActionPreference = \"Stop\"",
"Set-ExecutionPolicy Bypass -Scope Process -Force",
"choco install -y git cygwin cyg-get adoptopenjdk11",
"Move-Item \"C:\\Program Files\\AdoptOpenJDK\\jdk-11*\" c:\\java11",
"Move-Item \"C:\\Program Files\\AdoptOpenJDK\\jdk-11*\" c:\\java11-adoptopenjdk",
"choco install -y jdk8 -params 'installdir=c:\\\\java8tmp;source=false'",
"Move-Item \"C:\\java8tmp\" c:\\java8",
"Move-Item \"C:\\java8tmp\" c:\\java8-adoptopenjdk",
"choco install -y git cygwin cyg-get liberica11jdk",
"Move-Item \"C:\\Program Files\\BellSoft\\LibericaJDK-11*\" c:\\java11",
"choco install -y liberica8jdk",
"Move-Item \"C:\\Program Files\\BellSoft\\LibericaJDK-8*\" c:\\java8",
"choco install -y openssh --version 7.7.2.1 /SSHServerFeature",
"refreshenv",
"$OldPath = (Get-ItemProperty -Path 'Registry::HKEY_LOCAL_MACHINE\\System\\CurrentControlSet\\Control\\Session Manager\\Environment' -Name PATH).Path",
Expand Down
6 changes: 6 additions & 0 deletions ci/images/test-container/Dockerfile
Expand Up @@ -30,7 +30,9 @@ RUN apt-get update \
unzip \
xz-utils \
&& echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google-chrome.list \
&& echo "deb [arch=amd64] https://apt.bell-sw.com/ stable main" > /etc/apt/sources.list.d/bellsoft.list \
&& curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \
&& curl -fsSL https://download.bell-sw.com/pki/GPG-KEY-bellsoft | apt-key add - \
&& apt-get update \
&& apt-get install -y --no-install-recommends \
aptitude \
Expand All @@ -48,6 +50,10 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends \
openjdk-8-jdk \
openjdk-11-jdk \
java-common \
bellsoft-java11 \
bellsoft-java8 \
&& update-java-alternatives -s bellsoft-java8-amd64 \
&& rm -rf /etc/alternatives \
&& mv /etc/keep-alternatives /etc/alternatives \
&& apt-get clean \
Expand Down
2 changes: 1 addition & 1 deletion ci/pipelines/images/jinja.template.yml
Expand Up @@ -60,7 +60,7 @@ resources:
- name: openjdk8-docker-image
type: docker-image
source:
repository: openjdk
repository: bellsoft/liberica-openjdk-debian
tag: 8

- name: google-geode-builder
Expand Down
2 changes: 1 addition & 1 deletion ci/pipelines/shared/jinja.variables.yml
Expand Up @@ -25,7 +25,7 @@ benchmarks:
options: ''
max_in_flight: 4
- title: '_with_ssl'
flag: '-PwithSsl -PtestJVM=/usr/lib/jvm/java-11-openjdk-amd64/'
flag: '-PwithSsl -PtestJVM=/usr/lib/jvm/bellsoft-java11-amd64'
options: '--tests=*GetBenchmark --tests=*PutBenchmark'
max_in_flight: 1
- title: '_with_security_manager'
Expand Down
3 changes: 2 additions & 1 deletion ci/scripts/execute_build.sh
Expand Up @@ -82,7 +82,8 @@ else
DUNIT_PARALLEL_FORKS=""
fi

SET_JAVA_HOME="export JAVA_HOME=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64"
# SET_JAVA_HOME="export JAVA_HOME=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64"
SET_JAVA_HOME="export JAVA_HOME=/usr/lib/jvm/bellsoft-java${JAVA_BUILD_VERSION}-amd64"

if [ -v CALL_STACK_TIMEOUT ]; then
ssh ${SSH_OPTIONS} geode@${INSTANCE_IP_ADDRESS} "${SET_JAVA_HOME} && tmux new-session -d -s callstacks; tmux send-keys ~/capture-call-stacks.sh\ ${PARALLEL_DUNIT}\ ${CALL_STACK_TIMEOUT} C-m"
Expand Down
3 changes: 2 additions & 1 deletion ci/scripts/execute_build_examples.sh
Expand Up @@ -46,7 +46,8 @@ INSTANCE_IP_ADDRESS="$(cat instance-data/instance-ip-address)"

GEODE_VERSION=$(jq -r .semver geode-passing-tokens/*.json)

SET_JAVA_HOME="export JAVA_HOME=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64"
# SET_JAVA_HOME="export JAVA_HOME=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64"
SET_JAVA_HOME="export JAVA_HOME=/usr/lib/jvm/bellsoft-java${JAVA_BUILD_VERSION}-amd64"

GRADLE_COMMAND="./gradlew \
${DEFAULT_GRADLE_TASK_OPTIONS} \
Expand Down
3 changes: 2 additions & 1 deletion ci/scripts/execute_publish.sh
Expand Up @@ -58,7 +58,8 @@ SSH_OPTIONS="-i ${SSHKEY_FILE} -o ConnectionAttempts=60 -o StrictHostKeyChecking

INSTANCE_IP_ADDRESS="$(cat instance-data/instance-ip-address)"

SET_JAVA_HOME="export JAVA_HOME=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64"
# SET_JAVA_HOME="export JAVA_HOME=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64"
SET_JAVA_HOME="export JAVA_HOME=/usr/lib/jvm/bellsoft-java${JAVA_BUILD_VERSION}-amd64"

GRADLE_COMMAND="./gradlew \
${DEFAULT_GRADLE_TASK_OPTIONS} \
Expand Down
8 changes: 6 additions & 2 deletions ci/scripts/execute_tests.sh
Expand Up @@ -66,13 +66,17 @@ fi

case $ARTIFACT_SLUG in
windows*)
echo "Making environment adjustments for windows."
JAVA_BUILD_PATH=C:/java${JAVA_BUILD_VERSION}
JAVA_TEST_PATH=C:/java${JAVA_TEST_VERSION}
GRADLE_SKIP_TASK_OPTIONS="${GRADLE_SKIP_TASK_OPTIONS} -x docker"
SEP=";"
;;
*)
JAVA_BUILD_PATH=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64
JAVA_TEST_PATH=/usr/lib/jvm/java-${JAVA_TEST_VERSION}-openjdk-amd64
# JAVA_BUILD_PATH=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64
# JAVA_TEST_PATH=/usr/lib/jvm/java-${JAVA_TEST_VERSION}-openjdk-amd64
JAVA_BUILD_PATH=/usr/lib/jvm/bellsoft-java${JAVA_BUILD_VERSION}-amd64
JAVA_TEST_PATH=/usr/lib/jvm/bellsoft-java${JAVA_TEST_VERSION}-amd64
SEP="&&"
;;
esac
Expand Down
3 changes: 2 additions & 1 deletion ci/scripts/rsync_code_down.sh
Expand Up @@ -44,7 +44,8 @@ case $ARTIFACT_SLUG in
EXEC_COMMAND="bash -c 'export JAVA_HOME=${JAVA_BUILD_PATH}; cd geode; ./gradlew --no-daemon combineReports'"
;;
*)
JAVA_BUILD_PATH=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64
# JAVA_BUILD_PATH=/usr/lib/jvm/java-${JAVA_BUILD_VERSION}-openjdk-amd64
JAVA_BUILD_PATH=/usr/lib/jvm/bellsoft-java${JAVA_BUILD_VERSION}-amd64
EXEC_COMMAND="bash -c 'export JAVA_HOME=${JAVA_BUILD_PATH} && cd geode && ./gradlew --no-daemon combineReports'"
;;
esac
Expand Down
2 changes: 1 addition & 1 deletion dev-tools/docker/base/Dockerfile
Expand Up @@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM openjdk:8
FROM bellsoft/liberica-openjdk-debian:8

LABEL Vendor="Apache Geode"
LABEL version=unstable
Expand Down
3 changes: 2 additions & 1 deletion docker/Dockerfile
Expand Up @@ -14,7 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM openjdk:8-jre-alpine
# FROM openjdk:8-jre-alpine
FROM bellsoft/liberica-openjdk-alpine:8

# runtime dependencies
RUN apk add --no-cache \
Expand Down
2 changes: 1 addition & 1 deletion docker/README.md
@@ -1,6 +1,6 @@
# Building the container image

The current Dockerfile is based on the [OpenJDK image](https://hub.docker.com/_/openjdk/) and includes the officially released Apache Geode binaries which are verified via GPG _and_ SHA256.
The current Dockerfile is based on the [Bellsoft Liberica OpenJDK image](https://hub.docker.com/r/bellsoft/liberica-openjdk-debian) and includes the officially released Apache Geode binaries which are verified via GPG _and_ SHA256.

```
docker build .
Expand Down
3 changes: 2 additions & 1 deletion geode-assembly/Dockerfile
Expand Up @@ -14,7 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM openjdk:11
# FROM openjdk:11
FROM bellsoft/liberica-openjdk-debian:11
COPY geode /geode
ENV GEODE_HOME="/geode"
ENV PATH="${GEODE_HOME}/bin:${PATH}"
2 changes: 1 addition & 1 deletion gradle/docker.gradle
Expand Up @@ -30,7 +30,7 @@
* Additional properties that can be set are:
*
* dunitDockerImage - The docker image used for running parallel dunits. The
* default image is 'openjdk:8'. The image is required to
* default image is 'bellsoft/liberica-openjdk-debian:8'. The image is required to
* have 'JAVA_HOME' set as an environment variable.
* dunitParallelForks - The number of parallel containers that will be
* launched. The default is 8.
Expand Down

0 comments on commit 0333dad

Please sign in to comment.