Skip to content

Commit

Permalink
cleanup: handle rebranding of adoptopenjdk and new api url (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
gilesw authored Jul 24, 2024
1 parent 0bc84ec commit 5930279
Show file tree
Hide file tree
Showing 21 changed files with 130 additions and 130 deletions.
26 changes: 13 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ This Ansible role has the following features for:
- Install JDK
- Additional opportunity to install from zulu-fallback, s3, web, local source, chocolatey.

**AdoptOpenJDK**
**Adoptium**

- Install JDK, JRE
- Additional opportunity to install from adoptopenjdk-fallback, repositories, web, local source, s3, chocolatey.
- Additional opportunity to install from adoptium-fallback, repositories, web, local source, s3, chocolatey.


**SapMachine**
Expand Down Expand Up @@ -101,7 +101,7 @@ Requirements
- 8
- 11
- 17
- **Supported AdoptOpenJDK version**:
- **Supported Adoptium version**:
- 8
- 11
- 12
Expand Down Expand Up @@ -156,7 +156,7 @@ Requirements
- `oracle_java`
- `sapjvm`
- `zulu`
- `adoptopenjdk`
- `adoptium`
- `sapmachine`
- `dragonwell8`
- `corretto`
Expand All @@ -169,15 +169,15 @@ Requirements
- `jdk` (default)
- `jre`

- `transport` Artifact source transport. Use `fallback` (OpenJDK, SAPJVM, AdoptOpenJDK, SapMachine, ZULU, Alibaba Dragonwell, Amazon Corretto distributions are supported), `repositories`(OpenJDK, AdoptOpenJDK, Amazon Corretto distributions are supported), `local`, `web` or `s3` according to your requirements.
- `transport` Artifact source transport. Use `fallback` (OpenJDK, SAPJVM, Adoptium, SapMachine, ZULU, Alibaba Dragonwell, Amazon Corretto distributions are supported), `repositories`(OpenJDK, Adoptium, Amazon Corretto distributions are supported), `local`, `web` or `s3` according to your requirements.

Available:
- `repositories` Installing java from system repositories (yum or apt, Linux only)
- `web` Fetching artifact from custom web url
- `chocolatey` Windows specific package manager (Supported OpenJDK: JDK 11, 12 or JRE 8, SapMachine, ZULU, AdoptOpenJDK)
- `chocolatey` Windows specific package manager (Supported OpenJDK: JDK 11, 12 or JRE 8, SapMachine, ZULU, Adoptium)
- `local` Local artifact stored on ansible master (can be used as cache for other transport)
- `s3` Download artifact from s3 bucket (Linux clients only, for Windows please use other transports)
- `fallback` fetching artifacts from official sites (available for distributions: openjdk, sapjvm, zulu, adoptopenjdk, sapmachine, dragonwell8, corretto).
- `fallback` fetching artifacts from official sites (available for distributions: openjdk, sapjvm, zulu, adoptium, sapmachine, dragonwell8, corretto).
This is *default* value for `transport` variable

**Notice** using `s3` transport requires specific packages to be installed on target host:
Expand Down Expand Up @@ -226,8 +226,8 @@ Requirements

default: `{{ lookup('env','AWS_SECRET_KEY') }}`

# Configure AdoptOpenJDK
- `adoptopenjdk_impl` AdoptOpenJDK Implementation
# Configure Adoptium
- `adoptium_impl` Adoptium Implementation
- `hotspot` (default)
- `openj9`

Expand Down Expand Up @@ -373,18 +373,18 @@ https://docs.ansible.com/ansible/latest/modules/aws_s3_module.html#requirements
java_major_version: 17
java_package: jdk
```
### Installing AdoptOpenJDK 8-openj9-jre from adoptopenjdk-fallback:
### Installing Adoptium 8-openj9-jre from adoptium-fallback:
```yaml
- name: Install AdoptOpenJDK
- name: Install Adoptium
hosts: all

roles:
- role: lean_delivery.java
java_distribution: adoptopenjdk
java_distribution: adoptium
transport: fallback
java_package: jre
adoptopenjdk_impl: openj9
adoptium_impl: openj9
java_major_version: 8
```
Expand Down
6 changes: 3 additions & 3 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# - oracle_java
# - sapjvm
# - zulu
# - adoptopenjdk (not supported 9/10)
# - adoptium (not supported 9/10)
# - alibaba_dragonwell (8 only)
# - sapmachine
# - Amazon Corretto (supported only 8/11)
Expand All @@ -20,7 +20,7 @@ java_distribution: openjdk
java_package: jdk

# AdoptOpenJDK Implementation (hotspot/openj9)
adoptopenjdk_impl: hotspot
adoptium_impl: hotspot

# OpenJDK Redhat: 8 (packages) / 11 (package for centos7, tarball for all other) / 12 (tarball)
# OpenJDK Debian: 8 (packages) / 11 (package for ubuntu18, tarball for all other) / 12 (tarball)
Expand Down Expand Up @@ -52,7 +52,7 @@ transport: fallback
# - "local" Local artifact
# - "repositories" Install from repositories for Debian and RHEL
# - "openjdk-fallback" Install from artifact downloaded from openjdk site
# - "adoptopenjdk-fallback" Install from artifact downloaded from adoptopenjdk site
# - "adoptium-fallback" Install from artifact downloaded from adoptium site
# - "sapjvm-fallback" Install from artifact downloaded from SAP site
# - "zulu-fallback" Install from artifact downloaded from AZUL site
# - "sapmachine-fallback" Install from artifact downloaded from SapMachine site
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ lint: |
yamllint
ansible-lint
platforms:
- name: test-aws-centos7-adoptopenjdk-hotspot-jre-tarball-11
- name: test-aws-centos7-adoptium-hotspot-jre-tarball-11
image: ami-9887c6e7
platform: centos7
instance_type: t3.micro
Expand All @@ -23,12 +23,12 @@ platforms:
ssh_user: centos
groups:
- rhel_family
- adoptopenjdk
- adoptium
- hotspot
- jre
- adoptopenjdk_fallback
- adoptium_fallback

- name: test-aws-ubuntu18-adoptopenjdk-openj9-jdk-tarball-11
- name: test-aws-ubuntu18-adoptium-openj9-jdk-tarball-11
image: ami-012fd5eb46f56731f
platform: ubuntu18
instance_type: t3.micro
Expand All @@ -42,12 +42,12 @@ platforms:
ssh_user: ubuntu
groups:
- debian_family
- adoptopenjdk
- adoptium
- openj9
- jdk
- adoptopenjdk_fallback
- adoptium_fallback

- name: test-aws-Debian9-adoptopenjdk-hotspot-jdk-repositories-11
- name: test-aws-Debian9-adoptium-hotspot-jdk-repositories-11
image: ami-003f19e0e687de1cd
platform: debian9
instance_type: t3.micro
Expand All @@ -61,12 +61,12 @@ platforms:
ssh_user: admin
groups:
- debian_family
- adoptopenjdk
- adoptium
- hotspot
- jdk
- repositories

# - name: test-aws-centos8-adoptopenjdk-openj9-jre-repositories-11
# - name: test-aws-centos8-adoptium-openj9-jre-repositories-11
# image: ami-0ed2ad9dc845b42b6
# platform: centos8
# instance_type: t3.micro
Expand All @@ -80,12 +80,12 @@ platforms:
# ssh_user: centos
# groups:
# - rhel_family
# - adoptopenjdk
# - adoptium
# - openj9
# - jre
# - repositories

- name: test-aws-centos7-adoptopenjdk-local-11
- name: test-aws-centos7-adoptium-local-11
image: ami-9887c6e7
platform: centos7
instance_type: t3.micro
Expand All @@ -99,7 +99,7 @@ platforms:
ssh_user: centos
groups:
- rhel_family
- adoptopenjdk
- adoptium
- local

provisioner:
Expand All @@ -111,18 +111,18 @@ provisioner:
callback_whitelist: profile_tasks,timer
inventory:
group_vars:
adoptopenjdk:
java_distribution: adoptopenjdk
adoptium:
java_distribution: adoptium
java_major_version: 11
jdk:
java_package: jdk
jre:
java_package: jre
openj9:
adoptopenjdk_impl: openj9
adoptium_impl: openj9
hotspot:
adoptopenjdk_impl: hotspot
adoptopenjdk_fallback:
adoptium_impl: hotspot
adoptium_fallback:
transport: fallback
repositories:
transport: repositories
Expand All @@ -131,10 +131,10 @@ provisioner:
transport_local: /tmp/OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz
playbooks:
create: ../resources/provisioning/AWS/create.yml
prepare: ../cloud-aws-adoptopenjdk-11/prepare.yml
prepare: ../cloud-aws-adoptium-11/prepare.yml
destroy: ../resources/provisioning/AWS/destroy.yml
verify: ../resources/tests/verify.yml
scenario:
name: cloud-aws-adoptopenjdk-11
name: cloud-aws-adoptium-11
verifier:
name: ansible
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
gather_facts: true
vars:
transport_s3_bucket: java-molecule-s3-test
transport_s3_path: /java/adoptopenjdk/OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz
transport_s3_path: /java/adoptium/OpenJDK11U-jdk_x64_linux_hotspot_11.0.3_7.tar.gz
java_download_path: /tmp
tasks:
- name: Download artifact from s3
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ lint: |
yamllint
ansible-lint
platforms:
# - name: test-aws-centos8-adoptopenjdk-hotspot-jre-repositories-12
# - name: test-aws-centos8-adoptium-hotspot-jre-repositories-12
# image: ami-0ed2ad9dc845b42b6
# platform: centos8
# instance_type: t3.micro
Expand All @@ -23,13 +23,13 @@ platforms:
# ssh_user: centos
# groups:
# - rhel_family
# - adoptopenjdk
# - adoptium
# - hotspot
# - jre
# - repositories
# - pip3

- name: test-aws-centos7-adoptopenjdk-openj9-jdk-tarball-12
- name: test-aws-centos7-adoptium-openj9-jdk-tarball-12
image: ami-9887c6e7
platform: centos7
instance_type: t3.micro
Expand All @@ -43,13 +43,13 @@ platforms:
ssh_user: centos
groups:
- rhel_family
- adoptopenjdk
- adoptium
- openj9
- jdk
- adoptopenjdk_fallback
- adoptium_fallback
- pip2

- name: test-aws-Debian9-adoptopenjdk-openj9-jre-tarball-12
- name: test-aws-Debian9-adoptium-openj9-jre-tarball-12
image: ami-003f19e0e687de1cd
platform: debian9
instance_type: t3.micro
Expand All @@ -63,13 +63,13 @@ platforms:
ssh_user: admin
groups:
- debian_family
- adoptopenjdk
- adoptium
- openj9
- jre
- adoptopenjdk_fallback
- adoptium_fallback
- pip2

- name: test-aws-ubuntu18-adoptopenjdk-hotspot-jdk-repositories-12
- name: test-aws-ubuntu18-adoptium-hotspot-jdk-repositories-12
image: ami-012fd5eb46f56731f
platform: ubuntu18
instance_type: t3.micro
Expand All @@ -83,13 +83,13 @@ platforms:
ssh_user: ubuntu
groups:
- debian_family
- adoptopenjdk
- adoptium
- hotspot
- jdk
- repositories
- pip3

- name: test-aws-Debian9-adoptopenjdk-hotspot-jre-repositories-12
- name: test-aws-Debian9-adoptium-hotspot-jre-repositories-12
image: ami-003f19e0e687de1cd
platform: debian9
instance_type: t3.micro
Expand All @@ -103,13 +103,13 @@ platforms:
ssh_user: admin
groups:
- debian_family
- adoptopenjdk
- adoptium
- hotspot
- jre
- repositories
- pip2

- name: test-aws-Debian9-adoptopenjdk-s3-12
- name: test-aws-Debian9-adoptium-s3-12
image: ami-003f19e0e687de1cd
profile_name: epmldi-instance-profile
platform: debian9
Expand All @@ -124,7 +124,7 @@ platforms:
ssh_user: admin
groups:
- debian_family
- adoptopenjdk
- adoptium
- s3
- pip2

Expand All @@ -143,33 +143,33 @@ provisioner:
pip3:
pip_executable: pip3
python_executable: python3
adoptopenjdk:
java_distribution: adoptopenjdk
adoptium:
java_distribution: adoptium
java_major_version: 12
jdk:
java_package: jdk
jre:
java_package: jre
openj9:
adoptopenjdk_impl: openj9
adoptium_impl: openj9
hotspot:
adoptopenjdk_impl: hotspot
adoptopenjdk_fallback:
adoptium_impl: hotspot
adoptium_fallback:
transport: fallback
repositories:
transport: repositories
s3:
transport: s3
transport_s3_bucket: java-molecule-s3-test
transport_s3_path: /java/adoptopenjdk/OpenJDK12U-jdk_x64_linux_hotspot_12.0.1_12.tar.gz
transport_s3_path: /java/adoptium/OpenJDK12U-jdk_x64_linux_hotspot_12.0.1_12.tar.gz
transport_s3_aws_access_key: "{{ lookup('env','AWS_ACCESS_KEY_ID') }}"
transport_s3_aws_secret_key: "{{ lookup('env','AWS_SECRET_ACCESS_KEY') }}"
playbooks:
create: ../resources/provisioning/AWS/create.yml
prepare: ../cloud-aws-adoptopenjdk-12/prepare.yml
prepare: ../cloud-aws-adoptium-12/prepare.yml
destroy: ../resources/provisioning/AWS/destroy.yml
verify: ../resources/tests/verify.yml
scenario:
name: cloud-aws-adoptopenjdk-12
name: cloud-aws-adoptium-12
verifier:
name: ansible
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 5930279

Please sign in to comment.