mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
Merged in ITPLAT-387-dcd---update-systemd-servic (pull request #120)
ITPLAT-387 dcd update systemd servic Approved-by: Ben Partridge Approved-by: Adam Brokes
This commit is contained in:
@@ -265,6 +265,16 @@
|
||||
state: link
|
||||
force: true
|
||||
|
||||
- name: "Ensure catalina.out log dir exists after product is installed (except bitbucket)"
|
||||
file:
|
||||
path: "{{ atl_product_installation_current }}/logs"
|
||||
state: directory
|
||||
mode: 0750
|
||||
owner: "{{ atl_product_user }}"
|
||||
group: "{{ atl_product_user }}"
|
||||
when: atl_product_family != "stash"
|
||||
changed_when: false # For Molecule idempotence check
|
||||
|
||||
- name: Include if jsd is requested to be installed from OBR
|
||||
include_tasks: "jira-servicedesk_as_obr.yml"
|
||||
when: atl_install_jsd_as_obr
|
||||
|
||||
@@ -9,7 +9,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
def test_service_file(host):
|
||||
systemd_prefix = "/lib" if host.system_info.distribution == "ubuntu" else "/usr/lib"
|
||||
f = host.file(systemd_prefix+'/systemd/system/jira-software.service')
|
||||
assert f.contains("^ExecStart=/opt/atlassian/jira-software/current/bin/start-jira.sh -fg$")
|
||||
assert f.contains("^ExecStart=/opt/atlassian/jira-software/current/bin/start-jira.sh -fg >/opt/atlassian/jira-software/current/logs/catalina.out 2>&1$")
|
||||
assert f.user == 'root'
|
||||
assert f.group == 'root'
|
||||
assert f.mode == 0o0640
|
||||
|
||||
@@ -9,7 +9,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
||||
def test_service_file(host):
|
||||
systemd_prefix = "/lib" if host.system_info.distribution == "ubuntu" else "/usr/lib"
|
||||
f = host.file(systemd_prefix+'/systemd/system/synchrony.service')
|
||||
assert f.contains("^ExecStart=/opt/atlassian/bin/start-synchrony$")
|
||||
assert f.contains("^ExecStart=/opt/atlassian/bin/start-synchrony >/opt/atlassian/confluence/current/logs/catalina.out 2>&1$")
|
||||
assert f.contains("^EnvironmentFile=/etc/atl$")
|
||||
assert f.contains("^EnvironmentFile=/etc/atl.synchrony$")
|
||||
assert f.contains("^WorkingDirectory=/opt/atlassian/confluence/current/logs/$")
|
||||
|
||||
@@ -5,12 +5,15 @@ After=network-online.target
|
||||
[Service]
|
||||
User={{ atl_product_user }}
|
||||
Group={{ atl_product_user }}
|
||||
StandardOutput=journal+console
|
||||
StandardError=journal+console
|
||||
|
||||
{% for p in atl_startup_systemd_params -%}
|
||||
{{ p }}
|
||||
{% endfor %}
|
||||
|
||||
ExecStart={{ atl_startup_exec_path }}{% for c in atl_startup_exec_options %} {{ c }}{% endfor %}
|
||||
{# Bitbucket DC sets up its service start/stop logging in a different way to all our other DC offerings and so we exclude it from having the catalina.out redirect #}
|
||||
ExecStart={{ atl_startup_exec_path }}{% for c in atl_startup_exec_options %} {{ c }}{% endfor %}{% if (atl_product_family != "stash") %} >{{ atl_product_installation_current }}/logs/catalina.out 2>&1{% endif %}
|
||||
|
||||
Restart=on-failure
|
||||
|
||||
|
||||
Reference in New Issue
Block a user