Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/logger jar #874

Merged
merged 6 commits into from
Mar 25, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ansible/README.md
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this line in the README should change from a tomcat_deploy to an exec_jar

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ The easiest way to use these roles is to use parameterised includes in your main
- deploy
}}'

- include: ../../tomcat_deploy/tasks/main.yml war_url='{{ logger_war_url }}' context_path='{{ logger_context_path }}' hostname='{{ logger_hostname }}'
- include: ../../tomcat_deploy/tasks/main.yml war_url='{{ logger_artifact_url }}' context_path='{{ logger_context_path }}' hostname='{{ logger_hostname }}'
tags:
- logger
- apache_vhost
Expand Down
66 changes: 65 additions & 1 deletion ansible/roles/logger-service/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,10 +169,74 @@

- include_tasks: ../../tomcat_deploy/tasks/main.yml
vars:
war_url: '{{ logger_war_url }}'
war_url: '{{ logger_artifact_url }}'
context_path: '{{ logger_context_path }}'
hostname: '{{ logger_hostname }}'
tags:
- logger-service
- deploy
- tomcat_vhost
when: not exec_jar

- name: add logger-service jar and setup service
include_role:
name: exec-jar
vars:
service_name: 'logger-service'
jar_url: '{{ logger_artifact_url }}'
log_config_filename: "logback.xml"
java_headless: True
tags:
- deploy
- service
- logger-service
when: exec_jar

#- name: Restart logger service
# service:
# name: 'logger-service'
# state: restarted
# enabled: yes
# tags:
# - logger-service
# - properties
# when: exec_jar

- name: ensure target directories exist [data subdirectories etc.]
file: path={{item}} state=directory owner="logger-service" group="logger-service"
with_items:
- "{{data_dir}}/logger-service/config"
- "/var/log/atlas/logger-service"
notify:
- restart logger-service
tags:
- logger-service
- properties
when: exec_jar

- name: set data ownership for {{data_dir}}/logger
file: path={{data_dir}}/logger owner="logger-service" group="logger-service"
notify:
- restart logger-service
tags:
- logger-service
- properties
when: exec_jar

- name: set data ownership for /opt/atlas/logger-service
file: path=/opt/atlas/logger-service owner="logger-service" group="logger-service" recurse=true
notify:
- restart logger-service
tags:
- logger-service
- properties
when: exec_jar

- name: set data ownership for /var/log/atlas/logger-service
file: path=/var/log/atlas/logger-service owner="logger-service" group="logger-service" recurse=true
notify:
- restart logger-service
tags:
- logger-service
- properties
when: exec_jar
6 changes: 3 additions & 3 deletions ansible/roles/logger-service/vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
version: "{{ logger_version | default('LATEST') }}"
artifactId: "logger-service"
groupId: "au.org.ala"
classifier: ''
packaging: "war"
logger_war_url: "{{maven_repo_ws_url}}"
classifier: "{{ logger_classifier | default('') }}"
packaging: "{{ logger_packaging | default('war') }}"
logger_artifact_url: "{{maven_repo_ws_url}}"
content_type_options_header: "{{ logger_content_type_options_header | default(false) }}"