mirror of
https://bitbucket.org/atlassian/dc-deployments-automation.git
synced 2025-12-14 00:43:06 -06:00
Merged in ITPLAT-518-dcd---modify-systemd-unitfi (pull request #135)
ITPLAT-518 modify unit file for bbdc to not start foreground Approved-by: Ben Partridge
This commit is contained in:
@@ -22,7 +22,6 @@
|
|||||||
- "Environment=JVM_MINIMUM_MEMORY={{ atl_jvm_heap }}"
|
- "Environment=JVM_MINIMUM_MEMORY={{ atl_jvm_heap }}"
|
||||||
- "Environment=JVM_SUPPORT_RECOMMENDED_ARGS={{ atl_jvm_opts }}"
|
- "Environment=JVM_SUPPORT_RECOMMENDED_ARGS={{ atl_jvm_opts }}"
|
||||||
atl_startup_exec_options:
|
atl_startup_exec_options:
|
||||||
- "-fg"
|
|
||||||
- "--no-search"
|
- "--no-search"
|
||||||
|
|
||||||
roles:
|
roles:
|
||||||
|
|||||||
@@ -10,9 +10,16 @@ atl_startup_script_map:
|
|||||||
stash: "bin/start-bitbucket.sh"
|
stash: "bin/start-bitbucket.sh"
|
||||||
crowd: "start_crowd.sh"
|
crowd: "start_crowd.sh"
|
||||||
|
|
||||||
|
atl_stop_script_map:
|
||||||
|
jira: "bin/stop-jira.sh"
|
||||||
|
confluence: "bin/stop-confluence.sh"
|
||||||
|
stash: "bin/stop-bitbucket.sh"
|
||||||
|
crowd: "stop_crowd.sh"
|
||||||
|
|
||||||
atl_startup_exec_path: "{{ atl_product_installation_current }}/{{ atl_startup_script_map[atl_product_family] }}"
|
atl_startup_exec_path: "{{ atl_product_installation_current }}/{{ atl_startup_script_map[atl_product_family] }}"
|
||||||
atl_startup_exec_options: ["-fg"]
|
atl_startup_exec_options: ["-fg"]
|
||||||
atl_startup_systemd_params: []
|
atl_startup_systemd_params: []
|
||||||
|
atl_stop_exec_path: "{{ atl_product_installation_current }}/{{ atl_stop_script_map[atl_product_family] }}"
|
||||||
|
|
||||||
atl_systemd_service_dir_map:
|
atl_systemd_service_dir_map:
|
||||||
amazon: "/usr/lib/systemd/system"
|
amazon: "/usr/lib/systemd/system"
|
||||||
|
|||||||
@@ -20,7 +20,6 @@
|
|||||||
- "Environment=JVM_SUPPORT_RECOMMENDED_ARGS={{ atl_jvm_opts }}"
|
- "Environment=JVM_SUPPORT_RECOMMENDED_ARGS={{ atl_jvm_opts }}"
|
||||||
|
|
||||||
atl_startup_exec_options:
|
atl_startup_exec_options:
|
||||||
- "-fg"
|
|
||||||
- "--no-search"
|
- "--no-search"
|
||||||
|
|
||||||
atl_startup_enable: false
|
atl_startup_enable: false
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ testinfra_hosts = testinfra.utils.ansible_runner.AnsibleRunner(
|
|||||||
def test_service_file(host):
|
def test_service_file(host):
|
||||||
systemd_prefix = "/lib" if host.system_info.distribution == "ubuntu" else "/usr/lib"
|
systemd_prefix = "/lib" if host.system_info.distribution == "ubuntu" else "/usr/lib"
|
||||||
f = host.file(systemd_prefix+'/systemd/system/bitbucket.service')
|
f = host.file(systemd_prefix+'/systemd/system/bitbucket.service')
|
||||||
assert f.contains("^ExecStart=/opt/atlassian/bitbucket/current/bin/start-bitbucket.sh -fg --no-search$")
|
assert f.contains("^ExecStart=/opt/atlassian/bitbucket/current/bin/start-bitbucket.sh --no-search$")
|
||||||
assert f.contains("^UMask=0027$")
|
assert f.contains("^UMask=0027$")
|
||||||
assert f.contains("^LimitNOFILE=4096$")
|
assert f.contains("^LimitNOFILE=4096$")
|
||||||
assert f.contains("^Environment=BITBUCKET_HOME=/media/atl/bitbucket$")
|
assert f.contains("^Environment=BITBUCKET_HOME=/media/atl/bitbucket$")
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ Description=Atlassian {{ atl_product_edition }}
|
|||||||
After=network-online.target
|
After=network-online.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
{% if (atl_product_family == "stash") %}
|
||||||
|
Type=forking
|
||||||
|
{% endif %}
|
||||||
User={{ atl_product_user }}
|
User={{ atl_product_user }}
|
||||||
Group={{ atl_product_user }}
|
Group={{ atl_product_user }}
|
||||||
StandardOutput=journal+console
|
StandardOutput=journal+console
|
||||||
@@ -12,8 +15,15 @@ StandardError=journal+console
|
|||||||
{{ p }}
|
{{ p }}
|
||||||
{% endfor %}
|
{% 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 #}
|
{# 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 and foreground startup #}
|
||||||
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 %}
|
{% if (atl_product_family == "stash") %}
|
||||||
|
PIDFile={{ atl_product_home }}/log/bitbucket.pid
|
||||||
|
ExecStart={{ atl_startup_exec_path }}{% for c in atl_startup_exec_options %} {{ c }}{% endfor %}
|
||||||
|
|
||||||
|
ExecStop={{ atl_stop_exec_path }}
|
||||||
|
{% else %}
|
||||||
|
ExecStart={{ atl_startup_exec_path }}{% for c in atl_startup_exec_options %} {{ c }}{% endfor %} >{{ atl_product_installation_current }}/logs/catalina.out 2>&1
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user