AZURE-211 Determine Java Home for an Ubuntu Crowd deployment

This commit is contained in:
dbacon
2020-07-22 14:29:52 +01:00
parent 3e3d83d162
commit d5ed36e488
11 changed files with 20 additions and 20 deletions

View File

@@ -14,8 +14,6 @@ postgres_version: "9.6"
git_version: "2.14.4"
atl_shared_mountpoint: "/media/atl"
java_home: "{{ lookup('env', 'JAVA_HOME') or '/usr/lib/jvm/jre-{{ java_version }}-openjdk'}}"
# Simplify NFS mapping by using a fixed UID
atl_product_user_uid: "{{ lookup('env', 'ATL_PRODUCT_USER_UID') or '2001' }}"

View File

@@ -8,6 +8,7 @@
atl_download_format: "tarball"
roles:
- role: linux_common
- role: az_common
- role: product_common
- role: product_install
- role: az_app_insights_install

View File

@@ -1 +0,0 @@
---

View File

@@ -9,7 +9,8 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
@pytest.mark.parametrize('pkg', [
'netcat',
'rsync',
'cifs-utils'
'cifs-utils',
'python-lxml'
])
def test_pkg(host, pkg):
package = host.package(pkg)

View File

@@ -6,6 +6,7 @@
- netcat
- rsync
- cifs-utils
- python-lxml
- name: Fetch VM ID
command: "dmidecode -s system-uuid"

View File

@@ -1,11 +1,5 @@
---
- debug:
msg: atl_db_engine {{ atl_db_engine }}
- debug:
msg: atl_dbms {{ atl_dbms }}
- name: Create application directories
file:
path: "{{ item }}"

View File

@@ -47,11 +47,12 @@
insertbefore: "^export CATALINA_OPTS$"
marker: "# {mark} ANSIBLE MANAGED CATALINA_OPTS"
# Crowd uses the system jdk installed (atl_use_system_jdk == true) rather than a packaged JDK
- name: Set JAVA_HOME
lineinfile:
path: "{{ atl_product_installation_versioned }}/apache-tomcat/bin/setenv.sh"
insertafter: "EOF"
line: "export JAVA_HOME={{ java_home | default('/usr/lib/jvm/jre-{{ java_version }}-openjdk') }}"
line: "export JAVA_HOME={{ system_java_home }}"
- name: Create application directories
file:
@@ -114,6 +115,7 @@
positional_args:
- "{{ atl_tomcat_scheme }}://{{ atl_proxy_name }}{{ atl_tomcat_contextpath }}/crowd"
when:
- atl_db_engine == "postgres"
- atl_proxy_name is defined
- atl_tomcat_scheme is defined
- db_created is undefined or not db_created.changed

View File

@@ -14,7 +14,6 @@
- unzip
- fontconfig
- python-psycopg2
- python-lxml
- name: Create product group
group:

View File

@@ -6,6 +6,11 @@
- java-{{ java_version }}-openjdk-devel
when: atl_use_system_jdk
- name: Set system_java_home variable
set_fact:
system_java_home: "/usr/lib/jvm/jre-{{ java_version }}-openjdk"
when: atl_use_system_jdk
- name: Install other base packages on Amazon Linux
yum:
name:

View File

@@ -8,9 +8,9 @@
tags:
- runtime_pkg
- name: Set java_home variable
- name: Set system_java_home variable
set_fact:
java_home: "/usr/lib/jvm/java-{{ java_version }}-openjdk-amd64"
system_java_home: "/usr/lib/jvm/java-{{ java_version }}-openjdk-amd64"
when: atl_use_system_jdk
- name: Install other base packages on Ubuntu