tweaking the service startup options, altering permissions and ensuring the jmx access file exists

This commit is contained in:
Geoff Jacobs
2022-08-31 13:49:54 +10:00
parent 73de6b7f61
commit 1992ab0725
2 changed files with 13 additions and 0 deletions

View File

@@ -17,9 +17,12 @@
- 'Environment=JMX_PASSWORD_FILE=/var/atlassian/application-data/jmx/jmx.access' - 'Environment=JMX_PASSWORD_FILE=/var/atlassian/application-data/jmx/jmx.access'
- 'Environment="JVM_SUPPORT_RECOMMENDED_ARGS=-Dmesh.enabled=true -Dplugin.bitbucket-git.mesh.sidecar.child-process=false -Dcom.sun.management.jmxremote.port=4444 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath={{ atl_home_base }}/{{ atl_product_edition }}/log"' - 'Environment="JVM_SUPPORT_RECOMMENDED_ARGS=-Dmesh.enabled=true -Dplugin.bitbucket-git.mesh.sidecar.child-process=false -Dcom.sun.management.jmxremote.port=4444 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath={{ atl_home_base }}/{{ atl_product_edition }}/log"'
- 'Environment=JVM_MAXIMUM_MEMORY={{ atl_jvm_heap }}' - 'Environment=JVM_MAXIMUM_MEMORY={{ atl_jvm_heap }}'
- 'PassEnvironment=JMX_REMOTE_AUTH JMX_PASSWORD_FILE JAVA_HOME'
atl_startup_exec_path: "{{ mesh_install_dir }}/current/bin/start-mesh.sh" atl_startup_exec_path: "{{ mesh_install_dir }}/current/bin/start-mesh.sh"
atl_stop_exec_path: "{{ mesh_install_dir }}/current/bin/stop-mesh.sh" atl_stop_exec_path: "{{ mesh_install_dir }}/current/bin/stop-mesh.sh"
atl_systemd_service_target: "multi-user.target" atl_systemd_service_target: "multi-user.target"
atl_startup_exec_options: []
roles: roles:
- role: linux_common - role: linux_common

View File

@@ -7,8 +7,10 @@
group: "{{ atl_product_user_uid }}" group: "{{ atl_product_user_uid }}"
mode: 0750 mode: 0750
state: directory state: directory
recurse: yes
with_items: with_items:
- "{{ atl_home_base }}/{{ atl_product_edition }}" - "{{ atl_home_base }}/{{ atl_product_edition }}"
- "{{ atl_home_base }}/{{ atl_product_user }}"
- "{{ mesh_install_dir }}" - "{{ mesh_install_dir }}"
- name: download the mesh distribution using maven - name: download the mesh distribution using maven
@@ -54,3 +56,11 @@
state: link state: link
when: when:
- mesh_extract.changed | bool - mesh_extract.changed | bool
- name: touch the jmx password file
ansible.builtin.file:
src: '/var/atlassian/application-data/jmx/jmx.access'
state: touch
owner: "{{ atl_product_user_uid }}"
group: "{{ atl_product_user_uid }}"
mode: 0600