Commit 83c16cd2 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

Merge branch...

Merge branch 'doc/3175-documenter-le-processus-de-a-a-z-pour-deployer-sur-un-serveur-sous-docker' into 'dev'

Improve Docker and server documentation (

See merge request !285
parents 9a6421a9 55ff60e2
Pipeline #41217 failed with stages
in 3 minutes and 4 seconds
......@@ -16,7 +16,60 @@ This page will show you the config list, config are just parameters for Vidjil r
* Pre-process configurations
Admin can add pre-processing step before launching an analysis.
The common usage of these preprocess is to merge paired-end reads.
To add a new pre-process, multiple step are require, and may differ
if you use a plain-installation or a docker image.
- Add a new preprocess script into the tools directory.
This script make the link between the server, the data, the preprocess
software or pipeline and the output file. A template is given in this
directory ( and need to be adapted to your
usage and software.
- You need to add the executable or preprocessing script to the path
of vidjil to be callable. For this, give the correct path of it into the files.
- You need to modifiy the function "run_pre_process" in the
script "server/web2py/application/vidjil/models/". This part allow
to use specific shortcut (files names for example) into the command line
constructed by the server when calling the preprocess
- You need to add the preprocess to the list of available process into the
vidjil server interface. To do this, you need an admin account. You will
see the pre-process tab in the list of admin tabs.
Here is an example with a fictive paired-end merger: "mymerger".
- For this example, this fictionnal merger only need to use 3 parameters: 2 fastq files,
paired-end, and an output file.
- The fisrt step will be to reuse the template given into the tools directory.
You need to adapt it to use the 3 paramters that will be called by the server
when executed as described into it.
- The second step will be to add the merger executable into the path to be callable
by the server. This step will depend of you installation of the server. If you use
a plain installation, you only need the add the executable to the path use by
www-data user (if it is the one choose to serve the server). If you choose to use
the docker installation, you need to uncomment the binaries volume into the
docker-compose.yml file (service fuse); and copy the executable into the
corresponding local directory (by default vidjil/docker/binaries/). After this, you should
inquire the path into the ** file (relative path start from server/web2py).
- After that, you will need to adapt the function "run_pre_process" of
The goal here is to add some shortcut that will be use by the server to adapt the
calling of preprocess to replace the file names or path of the executable. For
example, existing shortcut will be &file1&, &file2& and &result&. You should add &mymerger&.
Here is the line to add : cmd = cmd.replace("&mymerger&", defs.DIR_MYMERGER).
It should be place into the try loop, after the shortcut for &result&.
- Last step is to add the preprocess into the server administration interface. To do
it, you need to inquire three fields, The first is the name of the preprocess,
the third is a more complete description of it, that will be show when the preprocess
on hover at the selection by user. The second field is the one where the command to
execute is defined. In this case, his content is : "python &mymerger& &file1& &file2& &result&".
Now, you can set the permission to give the access to this preprocess at your users.
To do this, you need to click on the key logo of into the list of preprocess.
This open a panel from where you can set the permissions of acces to preprocess.
If you give permission to a group, each user of it will have access to it.
If you need to give permissions to all users of the server, you can simply
do that by given permission to public group.
You can also give permissions to some specifics users of the list.
* Users, groups, and permissions
This diff is collapsed.
This diff is collapsed.
......@@ -8,7 +8,7 @@ services:
- ./mysql/:/docker-entrypoint-initdb.d/
- /opt/vidjil/mysql:/var/lib/mysql
image: vidjil/server:test
image: vidjil/server:latest
command: bash /entrypoints/
- fuse
......@@ -19,7 +19,7 @@ services:
- mysql:mysql
- fuse:fuse
image: vidjil/server:test
image: vidjil/server:latest
command: bash /entrypoints/
- /opt/vidjil/databases:/usr/share/vidjil/server/web2py/applications/vidjil/databases
......@@ -31,7 +31,7 @@ services:
- /opt/vidjil/backup:/mnt/backup
#- ./vidjil-server/conf:/etc/vidjil
image: vidjil/client:test
image: vidjil/client:latest
- uwsgi
......@@ -46,7 +46,7 @@ services:
- ../germline:/usr/share/vidjil/germline
image: vidjil/server:test
image: vidjil/server:latest
command: /usr/local/bin/gosu www-data python /usr/share/vidjil/server/web2py/ -K vidjil,vidjil,vidjil
- uwsgi
......@@ -56,7 +56,7 @@ services:
- mysql
image: vidjil/server:test
image: vidjil/server:latest
command: bash -c "echo '0 5 * * * cd /usr/share/vidjil/server; sh /mnt/backup 2>1&' > /etc/cron.d/backup-cron && cron"
- uwsgi
......@@ -64,7 +64,7 @@ services:
- mysql
build: ./reporter
image: reporter:test
image: reporter:latest
- uwsgi
......@@ -13,6 +13,7 @@ pages:
- locus and recombinations:
- vidjil-algo:
- .vidjil file format:
- server installation/maintenance:
- credits:
......@@ -811,6 +811,11 @@ def run_pre_process(pre_process_id, sequence_file_id, clean_before=True, clean_a
cmd = cmd.replace( "&file2&", defs.DIR_SEQUENCES + sequence_file.data_file2)
cmd = cmd.replace( "&result&", output_file)
cmd = cmd.replace("&pear&", defs.DIR_PEAR)
# Example of template to add some preprocess shortcut
# cmd = cmd.replace("&preprocess_template&", defs.DIR_preprocess_template)
# Where &preprocess_template& is the shortcut to change and
# defs.DIR_preprocess_template the variable to set into the file
# The value should be the path to access to the preprocess software.
print("=== Pre-process %s ===" % pre_process_id)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment