mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
DCD-224: Add Jira cluster config.
This commit is contained in:
@@ -16,4 +16,3 @@
|
|||||||
- jira_download
|
- jira_download
|
||||||
- jira_config
|
- jira_config
|
||||||
- jira_startup
|
- jira_startup
|
||||||
|
|
||||||
|
|||||||
@@ -3,6 +3,10 @@
|
|||||||
- name: Install distro-specific prerequisites
|
- name: Install distro-specific prerequisites
|
||||||
include_tasks: "{{ ansible_distribution|lower }}.yml"
|
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
|
- name: Fetch local EC2 metadata
|
||||||
ec2_metadata_facts:
|
ec2_metadata_facts:
|
||||||
# Guard is mostly for testing
|
# Guard is mostly for testing
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ provisioner:
|
|||||||
skip-tags: runtime_pkg
|
skip-tags: runtime_pkg
|
||||||
lint:
|
lint:
|
||||||
name: ansible-lint
|
name: ansible-lint
|
||||||
|
options:
|
||||||
|
x: ["701"]
|
||||||
inventory:
|
inventory:
|
||||||
links:
|
links:
|
||||||
group_vars: ../../../../group_vars/
|
group_vars: ../../../../group_vars/
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
atl_product_version: "7.13.2"
|
atl_product_version: "7.13.2"
|
||||||
atl_jdbc_user: 'atljira'
|
atl_jdbc_user: 'atljira'
|
||||||
atl_jvm_heap: 'PLACEHOLDER'
|
atl_jvm_heap: 'PLACEHOLDER'
|
||||||
|
atl_cluster_node_id: 'FAKEID'
|
||||||
roles:
|
roles:
|
||||||
- role: linux_common
|
- role: linux_common
|
||||||
- role: product_common
|
- role: product_common
|
||||||
|
|||||||
@@ -19,3 +19,9 @@ def test_setenv_file(host):
|
|||||||
assert f.exists
|
assert f.exists
|
||||||
assert f.contains('JVM_MINIMUM_MEMORY="PLACEHOLDER"')
|
assert f.contains('JVM_MINIMUM_MEMORY="PLACEHOLDER"')
|
||||||
assert f.contains('JVM_MAXIMUM_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')
|
||||||
|
|||||||
@@ -1,11 +1,17 @@
|
|||||||
---
|
---
|
||||||
|
|
||||||
- name: Create dbconfig.xml
|
- name: Create database config
|
||||||
template:
|
template:
|
||||||
src: dbconfig.xml.j2
|
src: dbconfig.xml.j2
|
||||||
dest: "{{ atl_product_home }}/dbconfig.xml"
|
dest: "{{ atl_product_home }}/dbconfig.xml"
|
||||||
owner: "{{ atl_product_user }}"
|
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.
|
- name: Override JVM memory settings.
|
||||||
# Ugly but necessary as the product installs this file so we need to make the change here.
|
# Ugly but necessary as the product installs this file so we need to make the change here.
|
||||||
lineinfile:
|
lineinfile:
|
||||||
|
|||||||
2
roles/jira_config/templates/cluster.properties.j2
Normal file
2
roles/jira_config/templates/cluster.properties.j2
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
jira.node.id = {{ atl_cluster_node_id }}
|
||||||
|
jira.shared.home = {{ atl_product_home_shared }}
|
||||||
Reference in New Issue
Block a user