diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2ca80766..bbd73e4a 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -359,6 +359,15 @@ AWS sapmachine-13: tags: - aws +AWS Alibaba Dragonwell8: + variables: + AWS_REGION: us-east-1 + stage: deployment test + script: + - molecule test -s cloud-aws-dragonwell8 + tags: + - aws + AZURE sapmachine-windows: stage: deployment test script: diff --git a/README.md b/README.md index 5f280d7b..f43efa31 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,13 @@ This Ansible role has the following features for: - Install JDK, JRE - Additional opportunity to install from sapmachine-fallback, web, local source, chocolatey (only latest version), s3. +**Alibaba Dragonwell 8 JDK** + +- Install JDK +- Alibaba Dragonwell 8 corresponds to OpenJDK 8 and is compatible with the Java SE Standard +- Linux/x86_64 platform only +- Additional opportunity to install from dragonwell8-fallback, web, local source, s3. + DISCLAIMER: usage of any version of this role implies you have accepted the [Oracle Binary Code License Agreement for Java SE](http://www.oracle.com/technetwork/java/javase/terms/license/index.html). @@ -114,6 +121,9 @@ Requirements - Ubuntu bionic: sapmachine-fallback - Debian stretch: sapmachine-fallback - Windows: chocolatey (only latest version, don't support java_minor_version variables), sapmachine-fallback + - **Supported Alibaba Dragonwell version**: + - 8.0.0 + - 8.1.1 - **Supported OS**: - Ubuntu - bionic @@ -138,6 +148,7 @@ Requirements - `zulu` - `adoptopenjdk` - `sapmachine` + - `dragonwell8` **Notice**: this variable is mandatory in case of installing other distribution than 'openjdk'. @@ -147,7 +158,7 @@ Requirements - `jdk` (default) - `jre` - - `transport` Artifact source transport. Use `openjdk-fallback`(OpenJDK only), `repositories`(OpenJDK only), `sapjvm-fallback`(SAPJVM only), `adoptopenjdk-fallback`(AdoptOpenJDK only),`sapmachine-fallback`(SapMachine only), `zulu-fallback`(ZULU only), `local`, `web` or `s3` for more predictable result. + - `transport` Artifact source transport. Use `openjdk-fallback`(OpenJDK only), `repositories`(OpenJDK only), `sapjvm-fallback`(SAPJVM only), `adoptopenjdk-fallback`(AdoptOpenJDK only),`sapmachine-fallback`(SapMachine only), `zulu-fallback`(ZULU only), `dragonwell8-fallback`(Alibaba Dragonwell only), `local`, `web` or `s3` for more predictable result. Available: - `repositories` Installing OpenJDK java from system repositories (yum or apt, Linux only) @@ -159,6 +170,7 @@ Requirements - `zulu-fallback` fetching artifact from AZUL site. - `adoptopenjdk-fallback` fetching artifact from adoptopenjdk site. - `sapmachine-fallback` fetching artifact from SapMachine site. + - `dragonwell8-fallback` fetching artifact from GitHub. - `openjdk-fallback` fetching artifact from jdk.java.net. This is default value for `transport` variable @@ -345,6 +357,7 @@ https://docs.ansible.com/ansible/latest/modules/aws_s3_module.html#requirements adoptopenjdk_impl: openj9 java_major_version: 8 ``` + ### Installing SapMachine sapmachine-jre-10 from sapmachine-fallback: ```yaml - name: Install SapMachine @@ -357,6 +370,17 @@ https://docs.ansible.com/ansible/latest/modules/aws_s3_module.html#requirements java_package: jre java_major_version: 10 ``` +### Installing Alibaba Dragonwell 8 from dragonwell8-fallback: +```yaml +- name: Install Alibaba Dragonwell8 + hosts: all + + roles: + - role: lean_delivery.java + java_distribution: dragonwell8 + transport: dragonwell8-fallback + java_major_version: 8 +``` License ------- diff --git a/defaults/main.yml b/defaults/main.yml index 7f882f6b..6d148020 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -5,6 +5,7 @@ # - sapjvm # - zulu # - adoptopenjdk (not supported 9/10) +# - alibaba_dragonwell (8 only) # - sapmachine java_distribution: openjdk @@ -12,6 +13,7 @@ java_distribution: openjdk # Oracle java supported jre/server-jre/jdk # AdoptOpenJDK supported jdk/jre # SapMachine supported jdk/jre +# Alibaba Dragonwell supported jdk only java_package: jdk # AdoptOpenJDK Implementation (hotspot/openj9) @@ -49,6 +51,7 @@ transport: openjdk-fallback # - "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 +# - "dragonwell-fallback" Install from artifact downloaded from GitHub site transport_web: '{{ transport_web_default }}' transport_local: "/tmp/openjdk-11.0.2_linux-x64_bin.tar.gz" diff --git a/molecule/cloud-aws-adoptopenjdk-11/molecule.yml b/molecule/cloud-aws-adoptopenjdk-11/molecule.yml index 2a26f9f7..04d7ad06 100644 --- a/molecule/cloud-aws-adoptopenjdk-11/molecule.yml +++ b/molecule/cloud-aws-adoptopenjdk-11/molecule.yml @@ -13,7 +13,7 @@ platforms: - name: test-aws-centos7-adoptopenjdk-hotspot-jre-tarball-11 image: ami-9887c6e7 platform: centos7 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -32,7 +32,7 @@ platforms: - name: test-aws-ubuntu18-adoptopenjdk-openj9-jdk-tarball-11 image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -51,7 +51,7 @@ platforms: - name: test-aws-Debian9-adoptopenjdk-hotspot-jdk-repositories-11 image: ami-003f19e0e687de1cd platform: debian9 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -70,7 +70,7 @@ platforms: - name: test-aws-centos8-adoptopenjdk-openj9-jre-repositories-11 image: ami-0ed2ad9dc845b42b6 platform: centos8 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -89,7 +89,7 @@ platforms: - name: test-aws-centos7-adoptopenjdk-local-11 image: ami-9887c6e7 platform: centos7 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false diff --git a/molecule/cloud-aws-adoptopenjdk-12/molecule.yml b/molecule/cloud-aws-adoptopenjdk-12/molecule.yml index 0edfa52c..0884fb12 100644 --- a/molecule/cloud-aws-adoptopenjdk-12/molecule.yml +++ b/molecule/cloud-aws-adoptopenjdk-12/molecule.yml @@ -13,7 +13,7 @@ platforms: - name: test-aws-centos8-adoptopenjdk-hotspot-jre-repositories-12 image: ami-0ed2ad9dc845b42b6 platform: centos8 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -33,7 +33,7 @@ platforms: - name: test-aws-centos7-adoptopenjdk-openj9-jdk-tarball-12 image: ami-9887c6e7 platform: centos7 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -53,7 +53,7 @@ platforms: - name: test-aws-Debian9-adoptopenjdk-openj9-jre-tarball-12 image: ami-003f19e0e687de1cd platform: debian9 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -73,7 +73,7 @@ platforms: - name: test-aws-ubuntu18-adoptopenjdk-hotspot-jdk-repositories-12 image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -93,7 +93,7 @@ platforms: - name: test-aws-Debian9-adoptopenjdk-hotspot-jre-repositories-12 image: ami-003f19e0e687de1cd platform: debian9 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -114,7 +114,7 @@ platforms: image: ami-003f19e0e687de1cd profile_name: epmldi-instance-profile platform: debian9 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false diff --git a/molecule/cloud-aws-adoptopenjdk-8/molecule.yml b/molecule/cloud-aws-adoptopenjdk-8/molecule.yml index ec0a4235..1f018e37 100644 --- a/molecule/cloud-aws-adoptopenjdk-8/molecule.yml +++ b/molecule/cloud-aws-adoptopenjdk-8/molecule.yml @@ -13,7 +13,7 @@ platforms: - name: test-aws-Debian9-adoptopenjdk-hotspot-jdk-tarball-8 image: ami-003f19e0e687de1cd platform: debian9 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -32,7 +32,7 @@ platforms: - name: test-aws-ubuntu18-adoptopenjdk-openj9-jre-tarball-8 image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -51,7 +51,7 @@ platforms: - name: test-aws-centos7-adoptopenjdk-hotspot-jdk-repositories-8 image: ami-9887c6e7 platform: centos7 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -70,7 +70,7 @@ platforms: - name: test-aws-amazon2-adoptopenjdk-openj9-jre-repositories-8 image: ami-0b898040803850657 platform: amazon2 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -89,7 +89,7 @@ platforms: - name: test-aws-ubuntu18-adoptopenjdk-web-8 image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false diff --git a/molecule/cloud-aws-direct-11/molecule.yml b/molecule/cloud-aws-direct-11/molecule.yml index c0b2164b..350f6a81 100644 --- a/molecule/cloud-aws-direct-11/molecule.yml +++ b/molecule/cloud-aws-direct-11/molecule.yml @@ -13,7 +13,7 @@ platforms: - name: test-aws-centos7-oracle_java-11-s3 image: ami-9887c6e7 platform: centos7 - instance_type: m5.large + instance_type: t3.micro profile_name: epmldi-instance-profile region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af @@ -31,7 +31,7 @@ platforms: - name: test-aws-ubuntu18-oracle_java-11-s3-deb image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro profile_name: epmldi-instance-profile region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af @@ -49,7 +49,7 @@ platforms: - name: test-aws-Debian9-oracle_java-11-web-tb image: ami-003f19e0e687de1cd platform: debian9 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false diff --git a/molecule/cloud-aws-direct-12/molecule.yml b/molecule/cloud-aws-direct-12/molecule.yml index cb641143..6b3cef98 100644 --- a/molecule/cloud-aws-direct-12/molecule.yml +++ b/molecule/cloud-aws-direct-12/molecule.yml @@ -13,7 +13,7 @@ platforms: - name: test-aws-centos8-oracle_java-12-s3-rpm image: ami-0ed2ad9dc845b42b6 platform: centos8 - instance_type: m5.large + instance_type: t3.micro profile_name: epmldi-instance-profile region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af @@ -33,7 +33,7 @@ platforms: - name: test-aws-centos7-oracle_java-12-s3-rpm image: ami-9887c6e7 platform: centos7 - instance_type: m5.large + instance_type: t3.micro profile_name: epmldi-instance-profile region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af @@ -53,7 +53,7 @@ platforms: - name: test-aws-ubuntu18-oracle_java-12-s3-deb image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro profile_name: epmldi-instance-profile region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af @@ -72,7 +72,7 @@ platforms: - name: test-aws-Debian9-oracle_java-12-s3-tb image: ami-003f19e0e687de1cd platform: debian9 - instance_type: m5.large + instance_type: t3.micro profile_name: epmldi-instance-profile region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af @@ -91,7 +91,7 @@ platforms: - name: test-aws-Amazon-oracle_java-12 image: ami-035b3c7efe6d061d5 platform: amazon - instance_type: m5.large + instance_type: t3.micro profile_name: epmldi-instance-profile region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af @@ -111,7 +111,7 @@ platforms: - name: test-aws-Amazon2-oracle_java-12 image: ami-0b898040803850657 platform: amazon2 - instance_type: m5.large + instance_type: t3.micro profile_name: epmldi-instance-profile region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af diff --git a/molecule/cloud-aws-direct-6/molecule.yml b/molecule/cloud-aws-direct-6/molecule.yml index 53a16156..5dae17a7 100644 --- a/molecule/cloud-aws-direct-6/molecule.yml +++ b/molecule/cloud-aws-direct-6/molecule.yml @@ -14,7 +14,7 @@ platforms: - name: test-aws-centos6-oracle_java-6-rpm image: ami-1585c46a platform: centos6 - instance_type: t2.medium + instance_type: t2.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -30,7 +30,7 @@ platforms: - name: test-aws-ubuntu18-oracle_java-6-tarball image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false diff --git a/molecule/cloud-aws-direct-7/molecule.yml b/molecule/cloud-aws-direct-7/molecule.yml index 2a3d323f..0ac501c2 100644 --- a/molecule/cloud-aws-direct-7/molecule.yml +++ b/molecule/cloud-aws-direct-7/molecule.yml @@ -30,7 +30,7 @@ platforms: - name: test-aws-Debian9-oracle_java-7-tarball image: ami-003f19e0e687de1cd platform: debian9 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false diff --git a/molecule/cloud-aws-direct-8/molecule.yml b/molecule/cloud-aws-direct-8/molecule.yml index e2e6c493..b65ddec1 100644 --- a/molecule/cloud-aws-direct-8/molecule.yml +++ b/molecule/cloud-aws-direct-8/molecule.yml @@ -14,7 +14,7 @@ platforms: - name: test-aws-centos8-oracle_java-8-s3-rpm image: ami-0ed2ad9dc845b42b6 platform: centos8 - instance_type: m5.large + instance_type: t3.medium profile_name: epmldi-instance-profile region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af @@ -33,7 +33,7 @@ platforms: - name: test-aws-centos7-oracle_java-8-s3 image: ami-9887c6e7 platform: centos7 - instance_type: m5.large + instance_type: t3.micro profile_name: epmldi-instance-profile region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af @@ -52,7 +52,7 @@ platforms: - name: test-aws-ubuntu18-oracle_java-8-s3 image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro profile_name: epmldi-instance-profile region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af @@ -71,7 +71,7 @@ platforms: - name: test-aws-debian9-oracle_java-8-local image: ami-003f19e0e687de1cd platform: debian9 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false diff --git a/molecule/cloud-aws-dragonwell8/molecule.yml b/molecule/cloud-aws-dragonwell8/molecule.yml new file mode 100644 index 00000000..92785906 --- /dev/null +++ b/molecule/cloud-aws-dragonwell8/molecule.yml @@ -0,0 +1,101 @@ +--- +dependency: + name: galaxy + options: + role-file: requirements.yml +driver: + name: ec2 +lint: + name: yamllint + options: + config-file: .yamllint +platforms: + - name: test-aws-centos8-dragonwell8 + image: ami-0ed2ad9dc845b42b6 + platform: centos8 + instance_type: t3.medium + region: us-east-1 + vpc_subnet_id: subnet-314c223d + assign_public_ip: true + spot_price: 0.04 + security_group_name: + - default + wait_timeout: 1800 + ssh_user: centos + groups: + - rhel_family + - dragonwell8 + + - name: test-aws-centos7-dragonwell8 + image: ami-9887c6e7 + platform: centos7 + instance_type: t3.micro + region: us-east-1 + vpc_subnet_id: subnet-314c223d + assign_public_ip: true + spot_price: 0.04 + security_group_name: + - default + wait_timeout: 1800 + ssh_user: centos + groups: + - rhel_family + - dragonwell8 + + - name: test-aws-ubuntu18-dragonwell8 + image: ami-012fd5eb46f56731f + platform: ubuntu18 + instance_type: t3.micro + region: us-east-1 + vpc_subnet_id: subnet-314c223d + assign_public_ip: true + spot_price: 0.04 + security_group_name: + - default + wait_timeout: 1800 + ssh_user: ubuntu + groups: + - debian_family + - dragonwell8 + + - name: test-aws-Debian9-dragonwell8 + image: ami-003f19e0e687de1cd + platform: debian9 + instance_type: t3.micro + region: us-east-1 + vpc_subnet_id: subnet-314c223d + assign_public_ip: true + spot_price: 0.04 + security_group_name: + - default + wait_timeout: 1800 + ssh_user: admin + groups: + - debian_family + - dragonwell8 + +provisioner: + name: ansible + log: false + config_options: + defaults: + callback_whitelist: profile_tasks,timer + inventory: + group_vars: + dragonwell8: + java_distribution: dragonwell8 + transport: dragonwell8-fallback + java_major_version: 8 + playbooks: + create: ../resources/provisioning/AWS/create.yml + prepare: ../resources/provisioning/AWS/prepare.yml + destroy: ../resources/provisioning/AWS/destroy.yml + verify: ../resources/tests/verify.yml + lint: + name: ansible-lint +scenario: + name: cloud-aws-dragonwell8 +verifier: + name: ansible + lint: + name: ansible-lint diff --git a/molecule/cloud-aws-dragonwell8/playbook.yml b/molecule/cloud-aws-dragonwell8/playbook.yml new file mode 100644 index 00000000..2bd7212e --- /dev/null +++ b/molecule/cloud-aws-dragonwell8/playbook.yml @@ -0,0 +1,5 @@ +--- +- name: Converge + hosts: all + roles: + - role: ansible-role-java diff --git a/molecule/cloud-aws-openjdk-11/molecule.yml b/molecule/cloud-aws-openjdk-11/molecule.yml index 3c7aec59..0b2615fa 100644 --- a/molecule/cloud-aws-openjdk-11/molecule.yml +++ b/molecule/cloud-aws-openjdk-11/molecule.yml @@ -13,7 +13,7 @@ platforms: - name: test-aws-centos7-openjdk-11-repo image: ami-9887c6e7 platform: centos7 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -46,7 +46,7 @@ platforms: - name: test-aws-ubuntu18-openjdk-11-repo image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false diff --git a/molecule/cloud-aws-openjdk-12/molecule.yml b/molecule/cloud-aws-openjdk-12/molecule.yml index 6f330eb0..2ca5fe8a 100644 --- a/molecule/cloud-aws-openjdk-12/molecule.yml +++ b/molecule/cloud-aws-openjdk-12/molecule.yml @@ -13,7 +13,7 @@ platforms: - name: test-aws-centos7-openjdk-12-tb image: ami-9887c6e7 platform: centos7 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -47,7 +47,7 @@ platforms: - name: test-aws-ubuntu18-openjdk-12-tb image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false diff --git a/molecule/cloud-aws-openjdk-8/molecule.yml b/molecule/cloud-aws-openjdk-8/molecule.yml index 955f78f9..6a423821 100644 --- a/molecule/cloud-aws-openjdk-8/molecule.yml +++ b/molecule/cloud-aws-openjdk-8/molecule.yml @@ -13,7 +13,7 @@ platforms: - name: test-aws-centos8-openjdk-8-repo image: ami-0ed2ad9dc845b42b6 platform: centos8 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -29,7 +29,7 @@ platforms: - name: test-aws-centos7-openjdk-8-repo image: ami-9887c6e7 platform: centos7 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -61,7 +61,7 @@ platforms: - name: test-aws-ubuntu18-openjdk-8-repo image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -77,7 +77,7 @@ platforms: - name: test-aws-Debian9-openjdk-8-repo image: ami-003f19e0e687de1cd platform: debian9 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false diff --git a/molecule/cloud-aws-openjdk-ga/molecule.yml b/molecule/cloud-aws-openjdk-ga/molecule.yml index 5909849a..3f0d2742 100644 --- a/molecule/cloud-aws-openjdk-ga/molecule.yml +++ b/molecule/cloud-aws-openjdk-ga/molecule.yml @@ -13,7 +13,7 @@ platforms: - name: test-aws-centos8-openjdk-ga image: ami-0ed2ad9dc845b42b6 platform: centos8 - instance_type: m5.large + instance_type: t3.medium region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -28,7 +28,7 @@ platforms: - name: test-aws-centos7-openjdk-ga image: ami-9887c6e7 platform: centos7 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -58,7 +58,7 @@ platforms: - name: test-aws-ubuntu18-openjdk-ga image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -73,7 +73,7 @@ platforms: - name: test-aws-Debian9-openjdk-ga image: ami-003f19e0e687de1cd platform: debian9 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -88,7 +88,7 @@ platforms: - name: test-aws-Amazon-openjdk-ga image: ami-035b3c7efe6d061d5 platform: amazon - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -103,7 +103,7 @@ platforms: - name: test-aws-Amazon2-openjdk-ga image: ami-0b898040803850657 platform: amazon2 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false diff --git a/molecule/cloud-aws-sapjvm-8/molecule.yml b/molecule/cloud-aws-sapjvm-8/molecule.yml index 8ba475bd..d3335c15 100644 --- a/molecule/cloud-aws-sapjvm-8/molecule.yml +++ b/molecule/cloud-aws-sapjvm-8/molecule.yml @@ -10,10 +10,11 @@ lint: options: config-file: .yamllint platforms: + - name: test-aws-centos8-sapjvm-8 image: ami-0ed2ad9dc845b42b6 platform: centos8 - instance_type: m5.large + instance_type: t3.medium region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -30,7 +31,7 @@ platforms: - name: test-aws-centos7-sapjvm-8 image: ami-9887c6e7 platform: centos7 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -46,7 +47,7 @@ platforms: - name: test-aws-ubuntu18-sapjvm-8 image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false @@ -62,7 +63,7 @@ platforms: - name: test-aws-Debian9-sapjvm-8 image: ami-003f19e0e687de1cd platform: debian9 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-0f2b9cd66faea38af assign_public_ip: false diff --git a/molecule/cloud-aws-sapmachine-11/molecule.yml b/molecule/cloud-aws-sapmachine-11/molecule.yml index 372b38ef..91b64847 100644 --- a/molecule/cloud-aws-sapmachine-11/molecule.yml +++ b/molecule/cloud-aws-sapmachine-11/molecule.yml @@ -13,10 +13,10 @@ platforms: - name: test-aws-amazon2-sapmachine-jdk-tarball-11 image: ami-0b898040803850657 platform: amazon2 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 - vpc_subnet_id: subnet-0f2b9cd66faea38af - assign_public_ip: false + vpc_subnet_id: subnet-314c223d + assign_public_ip: true spot_price: 0.04 security_group_name: - default @@ -33,10 +33,10 @@ platforms: - name: test-aws-centos8-sapmachine-jre-tarball-11 image: ami-0ed2ad9dc845b42b6 platform: centos8 - instance_type: m5.large + instance_type: t3.medium region: us-east-1 - vpc_subnet_id: subnet-0f2b9cd66faea38af - assign_public_ip: false + vpc_subnet_id: subnet-314c223d + assign_public_ip: true spot_price: 0.04 security_group_name: - default @@ -52,10 +52,10 @@ platforms: - name: test-aws-Debian9-sapmachine-jre-tarball-11 image: ami-003f19e0e687de1cd platform: debian9 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 - vpc_subnet_id: subnet-0f2b9cd66faea38af - assign_public_ip: false + vpc_subnet_id: subnet-314c223d + assign_public_ip: true spot_price: 0.04 security_group_name: - default @@ -71,10 +71,10 @@ platforms: - name: test-aws-ubuntu18-sapmachine-jdk-tarball-11 image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 - vpc_subnet_id: subnet-0f2b9cd66faea38af - assign_public_ip: false + vpc_subnet_id: subnet-314c223d + assign_public_ip: true spot_price: 0.04 security_group_name: - default @@ -90,10 +90,10 @@ platforms: - name: test-aws-centos7-sapmachine-web-11 image: ami-9887c6e7 platform: centos7 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 - vpc_subnet_id: subnet-0f2b9cd66faea38af - assign_public_ip: false + vpc_subnet_id: subnet-314c223d + assign_public_ip: true spot_price: 0.04 security_group_name: - default diff --git a/molecule/cloud-aws-sapmachine-12/molecule.yml b/molecule/cloud-aws-sapmachine-12/molecule.yml index 5da59876..bdb2e5e0 100644 --- a/molecule/cloud-aws-sapmachine-12/molecule.yml +++ b/molecule/cloud-aws-sapmachine-12/molecule.yml @@ -13,10 +13,10 @@ platforms: - name: test-aws-centos7-sapmachine-jdk-tarball-12 image: ami-9887c6e7 platform: centos7 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 - vpc_subnet_id: subnet-0f2b9cd66faea38af - assign_public_ip: false + vpc_subnet_id: subnet-314c223d + assign_public_ip: true spot_price: 0.04 security_group_name: - default @@ -32,10 +32,10 @@ platforms: - name: test-aws-amazon2-sapmachine-jre-tarball-11 image: ami-0b898040803850657 platform: amazon2 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 - vpc_subnet_id: subnet-0f2b9cd66faea38af - assign_public_ip: false + vpc_subnet_id: subnet-314c223d + assign_public_ip: true spot_price: 0.04 security_group_name: - default @@ -51,10 +51,10 @@ platforms: - name: test-aws-Debian9-sapmachine-jre-tarball-12 image: ami-003f19e0e687de1cd platform: debian9 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 - vpc_subnet_id: subnet-0f2b9cd66faea38af - assign_public_ip: false + vpc_subnet_id: subnet-314c223d + assign_public_ip: true spot_price: 0.04 security_group_name: - default @@ -70,10 +70,10 @@ platforms: - name: test-aws-ubuntu18-sapmachine-jdk-tarball-12 image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 - vpc_subnet_id: subnet-0f2b9cd66faea38af - assign_public_ip: false + vpc_subnet_id: subnet-314c223d + assign_public_ip: true spot_price: 0.04 security_group_name: - default @@ -89,10 +89,10 @@ platforms: - name: test-aws-centos8-sapmachine-local-12 image: ami-0ed2ad9dc845b42b6 platform: centos8 - instance_type: m5.large + instance_type: t3.medium region: us-east-1 - vpc_subnet_id: subnet-0f2b9cd66faea38af - assign_public_ip: false + vpc_subnet_id: subnet-314c223d + assign_public_ip: true spot_price: 0.04 security_group_name: - default diff --git a/molecule/cloud-aws-sapmachine-13/molecule.yml b/molecule/cloud-aws-sapmachine-13/molecule.yml index adfcf4ac..f0406deb 100644 --- a/molecule/cloud-aws-sapmachine-13/molecule.yml +++ b/molecule/cloud-aws-sapmachine-13/molecule.yml @@ -13,10 +13,10 @@ platforms: - name: test-aws-centos7-sapmachine-jdk-tarball-13 image: ami-9887c6e7 platform: centos7 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 - vpc_subnet_id: subnet-0f2b9cd66faea38af - assign_public_ip: false + vpc_subnet_id: subnet-314c223d + assign_public_ip: true spot_price: 0.04 security_group_name: - default @@ -32,10 +32,10 @@ platforms: - name: test-aws-centos8-sapmachine-jre-tarball-13 image: ami-0ed2ad9dc845b42b6 platform: centos8 - instance_type: m5.large + instance_type: t3.medium region: us-east-1 - vpc_subnet_id: subnet-0f2b9cd66faea38af - assign_public_ip: false + vpc_subnet_id: subnet-314c223d + assign_public_ip: true spot_price: 0.04 security_group_name: - default @@ -51,10 +51,10 @@ platforms: - name: test-aws-Debian9-sapmachine-jre-tarball-13 image: ami-003f19e0e687de1cd platform: debian9 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 - vpc_subnet_id: subnet-0f2b9cd66faea38af - assign_public_ip: false + vpc_subnet_id: subnet-314c223d + assign_public_ip: true spot_price: 0.04 security_group_name: - default @@ -70,10 +70,10 @@ platforms: - name: test-aws-ubuntu18-sapmachine-jdk-tarball-13 image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 - vpc_subnet_id: subnet-0f2b9cd66faea38af - assign_public_ip: false + vpc_subnet_id: subnet-314c223d + assign_public_ip: true spot_price: 0.04 security_group_name: - default @@ -90,10 +90,10 @@ platforms: image: ami-0b898040803850657 platform: amazon2 profile_name: epmldi-instance-profile - instance_type: m5.large + instance_type: t3.micro region: us-east-1 - vpc_subnet_id: subnet-0f2b9cd66faea38af - assign_public_ip: false + vpc_subnet_id: subnet-314c223d + assign_public_ip: true spot_price: 0.04 security_group_name: - default diff --git a/molecule/cloud-aws-sapmachine-windows/molecule.yml b/molecule/cloud-aws-sapmachine-windows/molecule.yml index 3a9d02b7..2ae133be 100644 --- a/molecule/cloud-aws-sapmachine-windows/molecule.yml +++ b/molecule/cloud-aws-sapmachine-windows/molecule.yml @@ -15,11 +15,11 @@ platforms: platform: windows2016core aws_region: us-east-1 instance_type: m5.large - assign_public_ip: false + assign_public_ip: true spot_price: 0.14 aws_sec_group: - default - vpc_subnet_id: subnet-0f2b9cd66faea38af + vpc_subnet_id: subnet-314c223d groups: - windows - sapmachine @@ -32,11 +32,11 @@ platforms: platform: windows2019core aws_region: us-east-1 instance_type: m5.large - assign_public_ip: false + assign_public_ip: true spot_price: 0.14 aws_sec_group: - default - vpc_subnet_id: subnet-0f2b9cd66faea38af + vpc_subnet_id: subnet-314c223d groups: - windows - sapmachine diff --git a/molecule/cloud-aws-zulu-12/molecule.yml b/molecule/cloud-aws-zulu-12/molecule.yml index ea43bca3..200ee322 100644 --- a/molecule/cloud-aws-zulu-12/molecule.yml +++ b/molecule/cloud-aws-zulu-12/molecule.yml @@ -13,7 +13,7 @@ platforms: - name: test-aws-centos7-zulu-12 image: ami-9887c6e7 platform: centos7 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-314c223d assign_public_ip: true @@ -29,7 +29,7 @@ platforms: - name: test-aws-ubuntu18-zulu-12 image: ami-012fd5eb46f56731f platform: ubuntu18 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-314c223d assign_public_ip: true @@ -45,7 +45,7 @@ platforms: - name: test-aws-Debian9-zulu-12 image: ami-003f19e0e687de1cd platform: debian9 - instance_type: m5.large + instance_type: t3.micro region: us-east-1 vpc_subnet_id: subnet-314c223d assign_public_ip: true diff --git a/molecule/cloud-azure-sapmachine-windows/molecule.yml b/molecule/cloud-azure-sapmachine-windows/molecule.yml index 4fc5656b..a8decf6e 100644 --- a/molecule/cloud-azure-sapmachine-windows/molecule.yml +++ b/molecule/cloud-azure-sapmachine-windows/molecule.yml @@ -13,7 +13,7 @@ platforms: - name: test-azure-windows2016-sapmachine-tarball-13 platform: windows2016core vm_size: Standard_D2s_v3 - assign_public_ip: false + assign_public_ip: true az_location: northeurope az_resource_group_name: epm-ldi az_virtual_network_name: epm-ldi-northeurope-vnet @@ -29,7 +29,7 @@ platforms: - name: test-azure-windows2019-sapmachine-tarball-11 platform: windows2019core vm_size: Standard_D2s_v3 - assign_public_ip: false + assign_public_ip: true az_location: northeurope az_resource_group_name: epm-ldi az_virtual_network_name: epm-ldi-northeurope-vnet diff --git a/molecule/cloud-azure-windows-12/playbook.yml b/molecule/cloud-azure-windows-12/playbook.yml index 80eabf91..3fddefa8 100644 --- a/molecule/cloud-azure-windows-12/playbook.yml +++ b/molecule/cloud-azure-windows-12/playbook.yml @@ -15,7 +15,7 @@ sas_time_start: '{{ ansible_date_time.iso8601_micro }}' sas_time_expire: >- {{ ('%Y-%m-%dT%H:%M:%S' - | strftime(ansible_date_time.epoch|int + 60)) + | strftime(ansible_date_time.epoch|int + 120)) ~ (ansible_date_time.iso8601_micro | splitext)[1] }} - name: Generate access signature diff --git a/molecule/cloud-azure-windows-sapjvm-8/molecule.yml b/molecule/cloud-azure-windows-sapjvm-8/molecule.yml index 0f5cf98a..3699e3c8 100644 --- a/molecule/cloud-azure-windows-sapjvm-8/molecule.yml +++ b/molecule/cloud-azure-windows-sapjvm-8/molecule.yml @@ -13,7 +13,7 @@ platforms: - name: test-azure-windows2016-sapjvm-8 platform: windows2016core vm_size: Standard_D2s_v3 - assign_public_ip: false + assign_public_ip: true az_location: northeurope az_resource_group_name: epm-ldi az_virtual_network_name: epm-ldi-northeurope-vnet @@ -26,7 +26,7 @@ platforms: - name: test-azure-windows2019-sapjvm-8 platform: windows2019core vm_size: Standard_D2s_v3 - assign_public_ip: false + assign_public_ip: true az_location: northeurope az_resource_group_name: epm-ldi az_virtual_network_name: epm-ldi-northeurope-vnet diff --git a/tasks/Linux/fetch/dragonwell8-fallback.yml b/tasks/Linux/fetch/dragonwell8-fallback.yml new file mode 100644 index 00000000..02ff61f5 --- /dev/null +++ b/tasks/Linux/fetch/dragonwell8-fallback.yml @@ -0,0 +1,49 @@ +--- +- name: Check requested major version for Alibaba Dragonwell + fail: + msg: "Alibaba Dragonwell corresponds to OpenJDK 8 only" + when: java_major_version != 8 + +- name: Check requested architecture for Alibaba Dragonwell + fail: + msg: "Alibaba Dragonwell JDK currently supports Linux/x86_64 platform only" + when: java_arch != "x64" + +- name: Prepare GitHub API release tag + set_fact: + sub_uri: >- + {{ ((java_minor_version != '*') + | ternary('tags/v{{ java_major_version }}.{{ java_minor_version }}-GA', 'latest')) }} + +- name: Fetch Dragonwell version by tag + uri: + url: "{{ github_api_page }}/repos/alibaba/dragonwell8/releases/{{ sub_uri }}" + return_content: true + body_format: json + status_code: [200, 404] # Not found case we are handling below + register: response + +- name: Exit if Dragonwell version is not found + fail: + msg: 'Dragonwell version {{ java_major_version }}.{{ java_minor_version }} not found' + when: response.status == 404 + +# Transform Release name to Asset name +# Release name sample: Alibaba Dragonwell 8.1.1-GA +# Asset name sample: Alibaba_Dragonwell_8.1.1-GA_Linux_x64.tar.gz +- name: Prepare release asset name + set_fact: + asset_name: "{{ (response.json.name | regex_replace(' ', '_')) + '_Linux_x64.tar.gz' }}" + +- name: Get release URL + set_fact: + release_url: "{{ response.json | json_query(\"assets[?name=='\" + asset_name + \"'].browser_download_url\") }}" + +- name: Download artifact from {{ release_url[0] }} + get_url: + url: '{{ release_url[0] }}' + dest: '{{ java_download_path }}' + register: file_downloaded + retries: 20 + delay: 5 + until: file_downloaded is succeeded diff --git a/vars/java_distro_configs/dragonwell8_vars.yml b/vars/java_distro_configs/dragonwell8_vars.yml new file mode 100644 index 00000000..10a3d82e --- /dev/null +++ b/vars/java_distro_configs/dragonwell8_vars.yml @@ -0,0 +1,5 @@ +--- +parts: >- + {{ java_artifact_basename + | regex_findall('^(Alibaba_Dragonwell)_(8)\.([0-9]\.[0-9])-GA_(Linux)_(x64)(\.tar\.gz)') + | first | list }} diff --git a/vars/java_parts.yml b/vars/java_parts.yml index 87c95ff1..8dcbff7d 100644 --- a/vars/java_parts.yml +++ b/vars/java_parts.yml @@ -1,5 +1,5 @@ --- -java_package: '{{ parts[0] | default("jdk") }}' +java_package: '{{ (java_distribution == "dragonwell8") | ternary("jdk", parts[0]) | default("jdk") }}' java_major_version: '{{ (java_distribution == "adoptopenjdk") | ternary(parts[4], parts[1]) }}' java_minor_version: '{{ (java_distribution == "adoptopenjdk") | ternary(parts[5], parts[2]) }}' java_os: '{{ parts[3] }}' diff --git a/vars/main.yml b/vars/main.yml index 9a2651ea..9b81cbc0 100644 --- a/vars/main.yml +++ b/vars/main.yml @@ -3,6 +3,8 @@ openjdk_root_page: https://jdk.java.net sapjvm_root_page: https://tools.hana.ondemand.com adoptopenjdk_api_page: https://api.adoptopenjdk.net/v2/ zulu_api_page: https://zulu.api.azul.com/api/v1/ +sapmachine_root_page: https://github.com/SAP/SapMachine/releases/download/ +github_api_page: https://api.github.com sapmachine_api_page: https://api.github.com/repos/SAP/SapMachine/releases/tags/ # vars file for java