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: update to Java 11/17 #3047

Merged
merged 2 commits into from
Oct 13, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
14 changes: 8 additions & 6 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',
'freebsd': 'openjdk8-jre',
'fedora': 'java-17-openjdk-headless',
'fedora32': 'java-11-openjdk-headless',
'freebsd': 'openjdk11-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 }}"
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,19 @@
#

- name: install pip
package: name=py38-pip state=present
package:
name: py39-pip
state: present

- name: freebsd | update pip3 symlink
when: os == "freebsd12"
file:
dest: "/usr/local/bin/pip3"
state: link
src: "/usr/local/bin/pip-3.8"
src: "/usr/local/bin/pip-3.9"

- name: install tap2junit
pip: name=tap2junit state=present
pip:
executable: pip3
name: tap2junit
state: present
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
2 changes: 1 addition & 1 deletion ansible/roles/package-upgrade/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
'yum': ['centos', 'rhel7', 'aix71', 'aix72', 'ibmi'],
'apt': ['debian', 'ubuntu'],
'dnf': ['aix73', 'fedora', 'rhel8'],
'pkg': 'freebsd',
'pkgng': 'freebsd',
Copy link
Member Author

Choose a reason for hiding this comment

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

FWIW I needed to change this to get the Jenkins worker create Ansible playbook to run against our FreeBSD 12 machines otherwise I was getting errors:

Could not find a module for pkg.

from Ansible (2.11.2).

'pkgin': 'smartos',
'chocolatey': 'win',
'brew': 'macos'
Expand Down