mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-16 18:03:06 -06:00
AZURE-211 Determine Java Home for an Ubuntu Crowd deployment
This commit is contained in:
@@ -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' }}"
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
---
|
||||
@@ -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)
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
- netcat
|
||||
- rsync
|
||||
- cifs-utils
|
||||
- python-lxml
|
||||
|
||||
- name: Fetch VM ID
|
||||
command: "dmidecode -s system-uuid"
|
||||
|
||||
@@ -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 }}"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -20,12 +20,12 @@
|
||||
compressableMimeType="text/html,text/xml,application/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript"
|
||||
secure="{{ atl_tomcat_secure }}"
|
||||
scheme="{{ atl_tomcat_scheme }}"
|
||||
{% if atl_proxy_name is defined and atl_proxy_name != '' %}
|
||||
{% if atl_proxy_name is defined and atl_proxy_name != '' %}
|
||||
proxyName="{{ atl_proxy_name }}"
|
||||
{% endif %}
|
||||
{% if atl_proxy_port is defined and atl_proxy_port != '' %}
|
||||
{% endif %}
|
||||
{% if atl_proxy_port is defined and atl_proxy_port != '' %}
|
||||
proxyPort="{{ atl_proxy_port }}"
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
protocol="{{ atl_tomcat_protocol }}">
|
||||
</Connector>
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
- unzip
|
||||
- fontconfig
|
||||
- python-psycopg2
|
||||
- python-lxml
|
||||
|
||||
- name: Create product group
|
||||
group:
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user