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" git_version: "2.14.4"
atl_shared_mountpoint: "/media/atl" 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 # Simplify NFS mapping by using a fixed UID
atl_product_user_uid: "{{ lookup('env', 'ATL_PRODUCT_USER_UID') or '2001' }}" atl_product_user_uid: "{{ lookup('env', 'ATL_PRODUCT_USER_UID') or '2001' }}"

View File

@@ -8,6 +8,7 @@
atl_download_format: "tarball" atl_download_format: "tarball"
roles: roles:
- role: linux_common - role: linux_common
- role: az_common
- role: product_common - role: product_common
- role: product_install - role: product_install
- role: az_app_insights_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', [ @pytest.mark.parametrize('pkg', [
'netcat', 'netcat',
'rsync', 'rsync',
'cifs-utils' 'cifs-utils',
'python-lxml'
]) ])
def test_pkg(host, pkg): def test_pkg(host, pkg):
package = host.package(pkg) package = host.package(pkg)

View File

@@ -6,6 +6,7 @@
- netcat - netcat
- rsync - rsync
- cifs-utils - cifs-utils
- python-lxml
- name: Fetch VM ID - name: Fetch VM ID
command: "dmidecode -s system-uuid" 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 - name: Create application directories
file: file:
path: "{{ item }}" path: "{{ item }}"

View File

@@ -47,11 +47,12 @@
insertbefore: "^export CATALINA_OPTS$" insertbefore: "^export CATALINA_OPTS$"
marker: "# {mark} ANSIBLE MANAGED 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 - name: Set JAVA_HOME
lineinfile: lineinfile:
path: "{{ atl_product_installation_versioned }}/apache-tomcat/bin/setenv.sh" path: "{{ atl_product_installation_versioned }}/apache-tomcat/bin/setenv.sh"
insertafter: "EOF" 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 - name: Create application directories
file: file:
@@ -114,6 +115,7 @@
positional_args: positional_args:
- "{{ atl_tomcat_scheme }}://{{ atl_proxy_name }}{{ atl_tomcat_contextpath }}/crowd" - "{{ atl_tomcat_scheme }}://{{ atl_proxy_name }}{{ atl_tomcat_contextpath }}/crowd"
when: when:
- atl_db_engine == "postgres"
- atl_proxy_name is defined - atl_proxy_name is defined
- atl_tomcat_scheme is defined - atl_tomcat_scheme is defined
- db_created is undefined or not db_created.changed - db_created is undefined or not db_created.changed

View File

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

View File

@@ -6,6 +6,11 @@
- java-{{ java_version }}-openjdk-devel - java-{{ java_version }}-openjdk-devel
when: atl_use_system_jdk 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 - name: Install other base packages on Amazon Linux
yum: yum:
name: name:

View File

@@ -8,9 +8,9 @@
tags: tags:
- runtime_pkg - runtime_pkg
- name: Set java_home variable - name: Set system_java_home variable
set_fact: 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 when: atl_use_system_jdk
- name: Install other base packages on Ubuntu - name: Install other base packages on Ubuntu