Skip to content

Commit

Permalink
ansible: update agents to run on Java 11+
Browse files Browse the repository at this point in the history
Latest Jenkins LTS release has dropped support for Java 8.
  • Loading branch information
richardlau committed Oct 13, 2022
1 parent 8dad541 commit 04fb086
Show file tree
Hide file tree
Showing 13 changed files with 54 additions and 15 deletions.
28 changes: 28 additions & 0 deletions ansible/MANUAL_STEPS.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
* [Disk layout](#disk-layout)
* [AIX 7.1](#aix-71)
* [Remove en1 network interface](#remove-en1-network-interface)
* [Update XL C/C++ Runtime](#update-xl-cc-runtime)
* [AIX 7.2 Install](#aix-72-install)
* [ccache 3.7.4 on AIX 7.2](#ccache-374-on-aix-72)
* [Enable the AHA fs](#enable-the-aha-fs)
Expand Down Expand Up @@ -412,6 +413,33 @@ to list the available interfaces. To add back the `en1` interface, run
sudo autoconf6 -i en1
```

### Update XL C/C++ Runtime

Java 17 requires XL C/C++ Runtime 16.1 available from https://www.ibm.com/support/pages/fix-list-xl-cc-runtime-aix#161X.
Once downloaded, unpack the files with `zcat`:
```
zcat 16.1.0.9-IBM-xlCrte-AIX-FP009.tar.Z | tar -xvf -
```
and then install with `installp`:
```
installp -aXYgd . -e /tmp/install.log all
```

Use `lslpp -l xlC\*` to view the curently installed version.

```
# lslpp -l xlC\*
Fileset Level State Description
----------------------------------------------------------------------------
Path: /usr/lib/objrepos
xlC.aix61.rte 13.1.3.3 COMMITTED IBM XL C++ Runtime for AIX 6.1
and later
xlC.cpp 9.0.0.0 COMMITTED C for AIX Preprocessor
xlC.rte 13.1.3.3 COMMITTED IBM XL C++ Runtime for AIX
xlC.sup.aix50.rte 9.0.0.1 COMMITTED XL C/C++ Runtime for AIX 5.2
#
```

## AIX 7.2 Install

Most packages should be installed via ansible.
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/docker/templates/alpine311.Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ RUN apk add --no-cache --virtual .build-deps \
python3 \
tar \
ccache \
openjdk8 \
openjdk11 \
git \
procps \
openssh-client \
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/docker/templates/alpine312.Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ RUN apk add --no-cache --virtual .build-deps \
python3 \
tar \
ccache \
openjdk8 \
openjdk11 \
git \
procps \
openssh-client \
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/docker/templates/centos7.Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ RUN yum -y update && \
gcc-c++ \
make \
git \
java-1.8.0-openjdk-headless \
java-11-openjdk-headless \
pkgconfig \
curl \
python3-pip \
Expand Down
2 changes: 1 addition & 1 deletion ansible/roles/docker/templates/ubi81.Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN dnf install --disableplugin=subscription-manager -y \
ccache \
gcc-c++ \
git \
java-1.8.0-openjdk-headless \
java-17-openjdk-headless \
make \
python3 \
openssl-devel \
Expand Down
4 changes: 3 additions & 1 deletion ansible/roles/docker/templates/ubuntu1804.Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,15 @@ RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y \
g++-8 \
gcc-8 \
git \
openjdk-8-jre-headless \
curl \
python-pip \
python3-pip \
libfontconfig1 \
libtool \
automake
# openjdk-17-jre-headless pulls in ca-certificates-java which conflicts with
# something in the list of package above when installed at the same time.
RUN apt-get install -y openjdk-17-jre-headless

RUN pip install tap2junit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ RUN apt-get update \
g++-8 \
gcc-8 \
git \
openjdk-8-jre-headless \
curl \
python-pip \
python3-pip \
Expand All @@ -25,6 +24,9 @@ RUN apt-get update \
g++-6-multilib \
gcc-8-multilib \
g++-8-multilib
# openjdk-17-jre-headless pulls in ca-certificates-java which conflicts with
# something in the list of package above when installed at the same time.
RUN apt-get install -y openjdk-17-jre-headless

RUN pip install tap2junit \
&& pip3 install tap2junit
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,17 @@ RUN apt-get update && apt-get install apt-utils -y && \
g++-8 \
gcc-8 \
git \
openjdk-8-jre-headless \
pkg-config \
curl \
python-pip \
python3-pip \
libfontconfig1 \
libtool \
automake
# openjdk-17-jre-headless pulls in ca-certificates-java which conflicts with
# something in the list of package above when installed at the same time.
RUN apt-get install -y openjdk-17-jre-headless


RUN pip install tap2junit

Expand Down
3 changes: 2 additions & 1 deletion ansible/roles/docker/templates/ubuntu2004.Dockerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,14 @@ ENV OSTYPE linux-gnu
ENV OSVARIANT docker
ENV DESTCPU {{ arch }}
ENV ARCH {{ arch }}
ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y \
ccache \
g++-8 \
gcc-8 \
git \
openjdk-8-jre-headless \
openjdk-17-jre-headless \
curl \
python3-pip \
python-is-python3 \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y ccache \
g++-8 \
gcc-8 \
git \
openjdk-8-jre-headless \
openjdk-17-jre-headless \
pkg-config \
curl \
python3-pip \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ RUN apt-get update && apt-get install apt-utils -y && \
g++-8 \
gcc-8 \
git \
openjdk-8-jre-headless \
openjdk-17-jre-headless \
pkg-config \
curl \
python3-pip \
Expand Down
12 changes: 7 additions & 5 deletions ansible/roles/java-base/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,21 @@
#

packages: {
'centos': 'java-1.8.0-openjdk-headless',
'centos': 'java-11-openjdk-headless',
'debian7': 'openjdk-7-jre-headless',
'debian8': 'oracle-java8-installer',
'debian9': 'openjdk-8-jre-headless',
'debian10': 'openjdk-11-jre-headless',
'fedora': 'java-1.8.0-openjdk-headless',
'fedora': 'java-17-openjdk-headless',
'fedora32': 'java-11-openjdk-headless',
'freebsd': 'openjdk8-jre',
'ibmi': 'openjdk-11-ea',
'macos': 'adoptopenjdk8',
'rhel7': 'java-11-openjdk',
'rhel8': 'java-17-openjdk',
'smartos': 'openjdk8',
'ubuntu': 'openjdk-8-jre-headless',
'ubuntu': 'openjdk-17-jre-headless',
'ubuntu1604': 'openjdk-8-jre-headless',
'ubuntu1404': 'oracle-java8-installer',
'ubuntu2204': 'openjdk-17-jre-headless',
}
Expand All @@ -31,11 +33,11 @@ java_package_name: "{{ packages[os]|default(packages[os|stripversion])|default(o
adoptopenjdk: {
aix71_ppc64: { arch: ppc64 },
aix72_ppc64: { arch: ppc64 },
aix73_ppc64: { arch: ppc64, version: 17 },
aix73_ppc64: { arch: ppc64 },
centos7_ppc64: {}
}

adoptopenjdk_arch: "{{ adoptopenjdk[os+'_'+arch].arch | default(ansible_architecture) }}"
adoptopenjdk_os: "{{ adoptopenjdk[os+'_'+arch].os | default(ansible_system | lower) }}"
adoptopenjdk_version: "{{ adoptopenjdk[os+'_'+arch].version | default('8') }}"
adoptopenjdk_version: "{{ adoptopenjdk[os+'_'+arch].version | default('17') }}"
use_adoptopenjdk: "{{ adoptopenjdk[os+'_'+arch] is defined | bool }}"
1 change: 1 addition & 0 deletions ansible/roles/jenkins-worker/templates/aix.rc2.j2
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ start )
export TERM=ansi; \
export jenkins_log_file="/home/{{server_user}}/jenkins_console.log"; \
export HOME=/home/{{server_user}}; \
export LIBPATH=/opt/freeware/lib64:/usr/lib:/lib; \
export NODE_TEST_DIR=$HOME/tmp; \
export NODE_COMMON_PIPE="$HOME/test.pipe"; \
export PATH="/opt/freeware/bin:/usr/opt/python3/bin/:$PATH"; \
Expand Down

0 comments on commit 04fb086

Please sign in to comment.