DCD-1037 use AdoptOpenJDK from official repos

This commit is contained in:
Lee Goolsbee
2020-08-07 13:57:08 -05:00
parent 5bae465412
commit 45c2d01b17
5 changed files with 45 additions and 22 deletions

View File

@@ -39,8 +39,7 @@ atl_installer_temp: "{{ atl_installation_base }}/tmp"
# See product_common/task/ubuntu.yml for an example of apropriate
# linking using `alternatives`.
atl_java_home: "{{ '/usr/lib/jvm/java' if atl_use_system_jdk else (atl_product_installation_current + '/jre') }}"
atl_jre_home: "{{ '/usr/lib/jvm/jre' if atl_use_system_jdk else atl_java_home }}"
atl_java_binary: "{{ atl_jre_home }}/bin/java"
atl_java_binary: "{{ atl_java_home }}/bin/java"
atl_product_logs_default: &logs_default
- path: "{{ atl_product_installation_current }}/logs/*"

View File

@@ -3,8 +3,6 @@
atl_jvm_heap: "2048m"
atl_fonts_fallback_dirs:
- "{{ atl_java_home }}/lib/fonts/fallback/"
- "{{ atl_jre_home }}/lib/fonts/fallback/"
atl_autologin_cookie_age: "{{ lookup('env', 'ATL_AUTOLOGIN_COOKIE_AGE') }}"

View File

@@ -148,7 +148,7 @@
xpath: "/application-configuration/properties/property[@name='hibernate.connection.url']"
value: "{{ atl_jdbc_url }}?reWriteBatchedInserts=true"
when: crowd_cfg_stat_result.stat.exists
- name: Remove crowd.xml to prevent duplicates from appearing in cluster reporting
file:
path: "{{ atl_product_installation_versioned }}/apache-tomcat/conf/Catalina/localhost/crowd.xml"

View File

@@ -1,10 +1,26 @@
---
- name: Install JDK if necessary on Amazon Linux
yum:
name:
- java-1.{{ java_major_version }}.0-openjdk-devel
- name: Add AdoptOpenJDK repo and install if necessary on Amazon Linux
block:
- name: Add AdoptOpenJDK yum repository
yum_repository:
name: AdoptOpenJDK
file: adoptopenjdk
description: AdoptOpenJDK Repo
baseurl: "https://adoptopenjdk.jfrog.io/adoptopenjdk/rpm/amazonlinux/{{ ansible_distribution_version }}/{{ ansible_architecture }}/"
gpgkey: https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public
gpgcheck: yes
state: present
- name: Install AdoptOpenJDK
yum:
name: "adoptopenjdk-{{ java_major_version }}-hotspot"
state: present
when: atl_use_system_jdk
tags:
- runtime_pkg
- name: Install other base packages on Amazon Linux
yum:

View File

@@ -1,25 +1,35 @@
---
- name: Install JDK if necessary on Ubuntu
- name: Add AdoptOpenJDK repo and install if necessary on Ubuntu
block:
- name: Install JDK package
package:
name:
- openjdk-{{ java_major_version }}-jdk-headless
- name: Install gnupg
apt:
name: gnupg
state: present
- name: Add AdoptOpenJDK debian repo public key
apt_key:
url: https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public
state: present
- name: Add AdoptOpenJDK debian repository
apt_repository:
repo: "deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb {{ ansible_distribution_release }} main"
state: present
filename: adoptopenjdk
- name: Install AdoptOpenJDK
apt:
name: "adoptopenjdk-{{ java_major_version }}-hotspot"
update_cache: yes
state: present
- name: Ensure common JDK symlink exists
alternatives:
link: "/usr/lib/jvm/java"
name: "java_sdk"
path: "/usr/lib/jvm/java-8-openjdk-amd64"
priority: 99
- name: Ensure common JRE symlink exists
alternatives:
link: "/usr/lib/jvm/jre"
name: "jre"
path: "/usr/lib/jvm/java-8-openjdk-amd64/jre"
path: "/usr/lib/jvm/adoptopenjdk-{{ java_major_version }}-hotspot"
priority: 99
when: atl_use_system_jdk