DCD-224: Add Jira cluster config.

This commit is contained in:
Steve Smith
2019-04-18 13:38:07 +10:00
parent 87b6d9cb50
commit 15ce955c2e
7 changed files with 22 additions and 2 deletions

View File

@@ -16,4 +16,3 @@
- jira_download
- jira_config
- jira_startup

View File

@@ -3,6 +3,10 @@
- name: Install distro-specific prerequisites
include_tasks: "{{ ansible_distribution|lower }}.yml"
- name: Use EC2 instance ID for cluster node ID
set_fact:
atl_cluster_node_id: "{{ ansible_ec2_instance_id }}"
- name: Fetch local EC2 metadata
ec2_metadata_facts:
# Guard is mostly for testing

View File

@@ -16,6 +16,8 @@ provisioner:
skip-tags: runtime_pkg
lint:
name: ansible-lint
options:
x: ["701"]
inventory:
links:
group_vars: ../../../../group_vars/

View File

@@ -8,6 +8,7 @@
atl_product_version: "7.13.2"
atl_jdbc_user: 'atljira'
atl_jvm_heap: 'PLACEHOLDER'
atl_cluster_node_id: 'FAKEID'
roles:
- role: linux_common
- role: product_common

View File

@@ -19,3 +19,9 @@ def test_setenv_file(host):
assert f.exists
assert f.contains('JVM_MINIMUM_MEMORY="PLACEHOLDER"')
assert f.contains('JVM_MAXIMUM_MEMORY="PLACEHOLDER"')
def test_cluster_file(host):
f = host.file('/var/atlassian/application-data/jira/cluster.properties')
assert f.exists
assert f.contains('jira.node.id = FAKEID')
assert f.contains('jira.shared.home = /media/atl/jira/shared')

View File

@@ -1,11 +1,17 @@
---
- name: Create dbconfig.xml
- name: Create database config
template:
src: dbconfig.xml.j2
dest: "{{ atl_product_home }}/dbconfig.xml"
owner: "{{ atl_product_user }}"
- name: Create cluster config
template:
src: cluster.properties.j2
dest: "{{ atl_product_home }}/cluster.properties"
owner: "{{ atl_product_user }}"
- name: Override JVM memory settings.
# Ugly but necessary as the product installs this file so we need to make the change here.
lineinfile:

View File

@@ -0,0 +1,2 @@
jira.node.id = {{ atl_cluster_node_id }}
jira.shared.home = {{ atl_product_home_shared }}