Skip to content

Commit

Permalink
Upgrade default sequenceserver and blast version (#7)
Browse files Browse the repository at this point in the history
* Upgrade default sequenceserver version to 2.0.0 
* Upgrade default blast version to 2.12.0
* Add variable for the path to the log file
* Fix regexp to change the logo and the title
* Molecule test: add tasks to display logs
  • Loading branch information
loraine-gueguen authored Feb 21, 2022
1 parent 88dbfbb commit f44b227
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Available variables are listed below, along with default values (see `defaults/m

```yaml
# Version of the ruby gem to install (>= 2.0.0)
sequenceserver_version: 2.0.0.rc8
sequenceserver_version: 2.0.0
```
Variable to set the version of SequenceServer to install. This role can be used with SequenceServer version >= 2.0.0.
Expand Down Expand Up @@ -57,7 +57,7 @@ SequenceServer logs are stored in `/var/log/sequenceserver/sequenceserver.log`.

```yaml
# Version of BLAST to use in sequenceserver (called with "module load" in the slurm bash script)
sequenceserver_blast_version: 2.9.0
sequenceserver_blast_version: 2.12.0
# Absolute path to the blast binaries
sequenceserver_blast_binaries: "~/conda3/envs/blast-{{ sequenceserver_blast_version }}/bin"
# --cpus-per-task (SLURM option)
Expand Down
4 changes: 2 additions & 2 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Ruby gem
#
# Version of the ruby gem to install (>= 2.0.0)
sequenceserver_version: 2.0.0.rc8
sequenceserver_version: 2.0.0

# List of blast databases
#
Expand All @@ -23,7 +23,7 @@ sequenceserver_blast_db:
# Used in the slurm bash scripts
#
# Version of BLAST to use in sequenceserver (called with "module load" in the slurm bash script)
sequenceserver_blast_version: 2.9.0
sequenceserver_blast_version: 2.12.0
# Absolute path to the blast binaries
sequenceserver_blast_binaries: "~/conda3/envs/blast-{{ sequenceserver_blast_version }}/bin"
# --cpus-per-task (SLURM option)
Expand Down
2 changes: 2 additions & 0 deletions molecule/default/converge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@
# yamllint disable-line rule:braces
- { name: 'my_db', port: '4567', path: '/tmp/test-data' }
sequenceserver_top_web_page_html_path: "/tmp/top_web_page.html"
sequenceserver_home_url: "http://myfavoritewebsite.com"
sequenceserver_support_email: "mailto:[email protected]"
2 changes: 1 addition & 1 deletion molecule/default/tests/env.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ channels:
- bioconda
- defaults
dependencies:
- blast=2.9.0
- blast=2.12.0
7 changes: 7 additions & 0 deletions molecule/default/verify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@
when: (ansible_distribution == "CentOS" or ansible_distribution == "RedHat") and ansible_distribution_major_version == "7"
register: sequenceserver_command
failed_when: sequenceserver_command.rc > 0
- name: Get SequenceServer service logs
slurp:
src: "/var/log/sequenceserver/sequenceserver.log"
register: log
- name: Display SequenceServer service logs
debug:
msg: "{{ log.content | b64decode }}"
- name: Test that SequenceServer service is running for my_db
systemd:
name: sequenceserver-my_db.service
Expand Down
2 changes: 1 addition & 1 deletion tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
replace: "{{ item.replace }}"
backup: yes
with_items:
- {regexp: ' <a\n class="navbar-brand"\n href="http://sequenceserver.com" target="_blank">\n <img class="logo" src="SequenceServer_logo.png" alt="sequenceserver_logo">\n <small>\n <%= SequenceServer::VERSION %>\n </small>\n </a>', replace: ' <a\n class="navbar-left"\n href="{{ sequenceserver_home_url }}" target="_blank">\n <img src="{{ sequenceserver_logo }}" alt="logo" height="40px" style="margin-top:5px;margin-right:30px;">\n </a>\n <div\n class="navbar-brand" style="margin-top:10px;">\n <%= SequenceServer::WEB_PAGE_TITLE %>\n </div>'} # noqa 204
- {regexp: '\s+<a\n\s+class="navbar-brand"\n\s+href="https://sequenceserver.com" target="_blank">\n\s+<img class="logo" src="SequenceServer_logo.png" alt="sequenceserver_logo">\n\s+<small>\n\s+<%= SequenceServer::VERSION %>\n\s+</small>\n\s+</a>', replace: ' <a\n class="navbar-left"\n href="{{ sequenceserver_home_url }}" target="_blank">\n <img src="{{ sequenceserver_logo }}" alt="logo" height="40px" style="margin-top:5px;margin-right:30px;">\n </a>\n <div\n class="navbar-brand" style="margin-top:10px;">\n <%= SequenceServer::WEB_PAGE_TITLE %>\n </div>'} # noqa 204
- {regexp: 'http://www.sequenceserver.com/#license-and-support', replace: '{{ sequenceserver_support_email }}'}

- name: Modify source erb file for custom web page title | Insert supplementary HTML code on the top of the web page | Check if the file exists
Expand Down
4 changes: 2 additions & 2 deletions templates/syslog.j2
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
if $programname == 'sequenceserver' then /var/log/sequenceserver/sequenceserver.log
if $programname == 'scl' then /var/log/sequenceserver/sequenceserver.log
if $programname == 'sequenceserver' then {{ sequenceserver_log_file }}
if $programname == 'scl' then {{ sequenceserver_log_file }}
& stop
2 changes: 2 additions & 0 deletions vars/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ sequenceserver_config_dir: config
sequenceserver_extension_dir: extension
# Contains SLURM scripts
sequenceserver_hpc_dir: hpc_script
# Absolute path to the log file
sequenceserver_log_file: /var/log/sequenceserver/sequenceserver.log
# Default logo image name (used if sequenceserver_logo_url and sequenceserver_logo_path are not provided)
sequenceserver_logo: SequenceServer_logo.png

Expand Down

0 comments on commit f44b227

Please sign in to comment.