Installation du serveur Regovar

Pré-requis

  • Linux Ubuntu Xenial (la seule distribution testé à ce jour).
  • Les droits admins sur le serveur
  • Accès internet depuis le serveur
  • refgen database hg19 (TODO manage also hg18/38...)

Installation

Les commandes préfixées par '#' sont a exécuter en tant que root.

    # apt update && apt upgrade
    # apt install git ca-certificates nginx postgresql postgresql-contrib postgresql-server-dev-9.5 build-essential libssl-dev libffi-dev python3-dev virtualenv libpq-dev libmagickwand-dev
    # useradd regovar --create-home
    # sudo -u postgres createuser -P -s regovar # type "regovar" as password
    # sudo -u postgres createdb regovar
    # mkdir -p /var/regovar/{cache,downloads,files,pipelines,jobs,databases}
    # chown -R regovar:regovar /var/regovar
    # su regovar
    $ cd
    $ git clone https://github.com/REGOVAR/Regovar.git ~/Regovar
    $ cd ~/Regovar
    $ virtualenv -p /usr/bin/python3.5 venv
    $ source venv/bin/activate
    $ pip install -r requirements.txt
    $ cd regovar
    $ make init
    => Please, edit the $PWD/config.py file before proceed to the installation with the command 'make install'
    $ make install 
    => TODO ! Need hep from advanced linux user, for this step. make file doesn't work with simple regovar user

Configuration avec NginX

    $ nano ./config.py # edit the config file with your settings
    # echo 'upstream aiohttp_regovar
    {
        server 127.0.0.1:8100 fail_timeout=0;
    }

    server
    {
        listen 80;
        listen [::]:80;
        server_name regovar.org;

        location / {
            # Need for websockets
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";

            proxy_set_header Host $http_host;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_redirect off;
            proxy_buffering off;
            proxy_pass http://aiohttp_regovar;
        }

        location /static {
            root /var/regovar/regovar;
        }
    }' > /etc/nginx/sites-available/regovar
    # rm /etc/nginx/sites-enabled/default
    # ln -s /etc/nginx/sites-available/regovar /etc/nginx/sites-enabled
    # /etc/init.d/nginx restart

Configurer HTTPS et la certification

TODO

Démarrer et tester le serveur

    $ make app &!