Skip to content
This repository has been archived by the owner on Oct 10, 2021. It is now read-only.

Update to run on Tomcat 9 and Ubuntu 20.04 Focal64 #9

Merged
merged 1 commit into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ fits_install_symlink: /opt/fits

User/group to install as:
```
fits_user: tomcat8
fits_group: tomcat8
fits_user: tomcat
fits_group: tomcat
```

Install the FITS web service in Tomcat
Expand Down
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ fits_version: 1.4.1
fits_ws_version: 1.2.0
fits_install_root: /opt
fits_install_symlink: /opt/fits
fits_user: tomcat8
fits_group: tomcat8
fits_user: tomcat
fits_group: tomcat
fits_ws: yes
crayfits_home: /var/www/html
fits_src_url: "https://github.com/harvard-lts/fits/releases/download/{{ fits_version }}/fits-{{ fits_version }}.zip"
Expand Down
14 changes: 7 additions & 7 deletions tasks/config-ws.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# TODO: find a better way here, this is ugly and will bite us
- name: Set fits.home in catalina.properties
lineinfile:
path: "{{ tomcat8_home }}/conf/catalina.properties"
path: "{{ tomcat9_home }}/conf/catalina.properties"
regexp: "^fits.home="
line: "fits.home={{ fits_install_symlink }}"
notify: restart tomcat8
notify: restart tomcat9

- name: Set shared.loader in catalina.properties
lineinfile:
path: "{{ tomcat8_home }}/conf/catalina.properties"
path: "{{ tomcat9_home }}/conf/catalina.properties"
line: 'shared.loader=${fits.home}/lib/*.jar'
notify: restart tomcat8
notify: restart tomcat9

- name: Wait for FITS to finish coming back up
wait_for:
path: "{{ tomcat8_home }}/webapps/fits/WEB-INF/classes"
path: "{{ tomcat9_home }}/webapps/fits/WEB-INF/classes"
state: present

- name: Configure FITS web service logging
template:
src: log4j.properties.j2
dest: "{{ tomcat8_home }}/webapps/fits/WEB-INF/classes/log4j.properties"
notify: restart tomcat8
dest: "{{ tomcat9_home }}/webapps/fits/WEB-INF/classes/log4j.properties"
notify: restart tomcat9
2 changes: 1 addition & 1 deletion tasks/install-ws.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
- name: "Install FITS web service {{ansible_os_family}}"
get_url:
url: http://projects.iq.harvard.edu/files/fits/files/fits-{{ fits_ws_version }}.war
dest: "{{ tomcat8_home }}/webapps/fits.war"
dest: "{{ tomcat9_home }}/webapps/fits.war"
owner: "{{ fits_user }}"
group: "{{ fits_group }}"
checksum: "{{fits_ws_md5sum}}"
Expand Down
4 changes: 2 additions & 2 deletions tasks/install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
file:
path: "{{ fits_install_root }}/fits-{{ fits_version }}"
state: directory
owner: tomcat8
group: tomcat8
owner: tomcat
group: tomcat
mode: 0700

- name: Downloading FITS executables
Expand Down
2 changes: 1 addition & 1 deletion vars/Debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

httpd_conf_directory: "/etc/apache2"
httpd_conf_directory_enabled: "{{httpd_conf_directory}}/conf-enabled"
fits_log_path: /var/log/tomcat8
fits_log_path: /var/log/tomcat9
apache_service: apache2
apache_restart_state: restarted