mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
DCD-224: Inject JVM heap overrides into the product setenv script.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
atl_product_user: "jira"
|
||||
atl_product_version: "7.13.2"
|
||||
atl_jdbc_user: 'atljira'
|
||||
atl_jvm_heap: 'PLACEHOLDER'
|
||||
roles:
|
||||
- role: linux_common
|
||||
- role: product_common
|
||||
|
||||
@@ -6,10 +6,16 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
os.environ['MOLECULE_INVENTORY_FILE']).get_hosts('all')
|
||||
|
||||
|
||||
def test_hosts_file(host):
|
||||
def test_dbconfig_file(host):
|
||||
f = host.file('/var/atlassian/application-data/jira/dbconfig.xml')
|
||||
assert f.exists
|
||||
assert f.user == 'jira'
|
||||
assert f.contains("<driver-class>org.postgresql.Driver</driver-class>")
|
||||
assert f.contains("<username>atljira</username>")
|
||||
assert f.contains("<pool-min-size>20</pool-min-size>")
|
||||
|
||||
def test_setenv_file(host):
|
||||
f = host.file('/opt/atlassian/jira-software/current/bin/setenv.sh')
|
||||
assert f.exists
|
||||
assert f.contains('JVM_MINIMUM_MEMORY="PLACEHOLDER"')
|
||||
assert f.contains('JVM_MAXIMUM_MEMORY="PLACEHOLDER"')
|
||||
|
||||
@@ -5,3 +5,14 @@
|
||||
src: dbconfig.xml.j2
|
||||
dest: "{{ atl_product_home }}/dbconfig.xml"
|
||||
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:
|
||||
path: "{{ atl_product_installation_target }}/bin/setenv.sh"
|
||||
backrefs: true
|
||||
regexp: "^{{ item }}="
|
||||
line: "{{ item }}=\"{{ atl_jvm_heap }}\""
|
||||
with_items:
|
||||
- 'JVM_MINIMUM_MEMORY'
|
||||
- 'JVM_MAXIMUM_MEMORY'
|
||||
|
||||
Reference in New Issue
Block a user