diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b7477a105d0167326c39b77672f90feeaf9e7590..00ce664b3160494df015f766ce1ecc3f650fdc22 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -51,3 +51,5 @@ deploy-webserver: - cd ansible - whoami - ansible-playbook -vvv -i ./hosts_deploy deploy.yaml --extra-vars "deploy_user_name=ippidb repo_api_token=JZS-4cH7bWkFkHa2rAVf marvin_license_b64=$MARVINJS_LICENSE" + only: + - master \ No newline at end of file diff --git a/ansible/deploy.yaml b/ansible/deploy.yaml index bfb84fd136cea57d67c3b543d51605985aea676b..28d42ef2b9f8b550073800c8ca62dccb14248bdf 100644 --- a/ansible/deploy.yaml +++ b/ansible/deploy.yaml @@ -50,10 +50,10 @@ - name: Install RPMs for openbabel. yum: name: - - https://gitlab.pasteur.fr/hub/openbabel4ippidb/raw/master/rpmbuild/RPMS/x86_64/openbabel-libs-2.4.1-15.PR1829.py3.el7.x86_64.rpm - - https://gitlab.pasteur.fr/hub/openbabel4ippidb/raw/master/rpmbuild/RPMS/x86_64/openbabel-2.4.1-15.PR1829.py3.el7.x86_64.rpm - - https://gitlab.pasteur.fr/hub/openbabel4ippidb/raw/master/rpmbuild/RPMS/x86_64/openbabel-devel-2.4.1-15.PR1829.py3.el7.x86_64.rpm - - https://gitlab.pasteur.fr/hub/openbabel4ippidb/raw/master/rpmbuild/RPMS/x86_64/python3-openbabel-2.4.1-15.PR1829.py3.el7.x86_64.rpm + - https://gitlab.pasteur.fr/hub/openbabel4ippidb/raw/master/rpmbuild/RPMS/x86_64/openbabel-libs-2.4.1-15.PR1902.py3.el7.x86_64.rpm + - https://gitlab.pasteur.fr/hub/openbabel4ippidb/raw/master/rpmbuild/RPMS/x86_64/openbabel-2.4.1-15.PR1902.py3.el7.x86_64.rpm + - https://gitlab.pasteur.fr/hub/openbabel4ippidb/raw/master/rpmbuild/RPMS/x86_64/openbabel-devel-2.4.1-15.PR1902.py3.el7.x86_64.rpm + - https://gitlab.pasteur.fr/hub/openbabel4ippidb/raw/master/rpmbuild/RPMS/x86_64/python3-openbabel-2.4.1-15.PR1902.py3.el7.x86_64.rpm state: present - name: install graphviz-devel yum: name=graphviz-devel state=present update_cache=yes @@ -124,25 +124,33 @@ command: "collectstatic" app_path: "/home/{{ deploy_user_name }}/ippidb-web/ippisite" settings: "ippisite.{{ ansible_hostname }}_settings" + environment: + BABEL_LIBDIR: '/usr/lib64/openbabel/' - name: create mod_wsgi configuration django_manage: command: "runmodwsgi --setup-only --port=80 --user ippidb --group wheel --server-root=/etc/ippidb-80" app_path: "/home/{{ deploy_user_name }}/ippidb-web/ippisite" settings: "ippisite.{{ ansible_hostname }}_settings" - - name: add line in generated WSGI handler script to set DJANGO_SETTINGS_MODULE + environment: + BABEL_LIBDIR: '/usr/lib64/openbabel/' + - name: add line in generated WSGI handler script to set DJANGO_SETTINGS_MODULE and BABEL_LIBDIR for openbabel formats blockinfile: path: /etc/ippidb-80/handler.wsgi insertbefore: BOF content: | # added by ansible deployment script to use the right django settings file + # and set correctly the openbabel formats directory import os os.environ['DJANGO_SETTINGS_MODULE'] = 'ippisite.hub16_settings' + os.environ['BABEL_LIBDIR'] = '/usr/lib64/openbabel/' - name: create or update database become_user: "{{ deploy_user_name }}" django_manage: command: "migrate" app_path: "/home/{{ deploy_user_name }}/ippidb-web/ippisite" settings: "ippisite.{{ ansible_hostname }}_settings" + environment: + BABEL_LIBDIR: '/usr/lib64/openbabel/' # FIXME: this should obviously be removed before switching to prod. env. - name: install passlib for htpasswd in ansible yum: name=python-passlib state=installed diff --git a/ippisite/requirements-core.txt b/ippisite/requirements-core.txt index 66c297d17abd88bea0e088a0f675f1c463a81e56..6d8bbdcc121fe433746260371af23f995ed54760 100644 --- a/ippisite/requirements-core.txt +++ b/ippisite/requirements-core.txt @@ -6,6 +6,8 @@ django-extensions django-formtools django-debug-toolbar django-allauth +# import scripts +pandas==0.22.0 # web services bioservices bioblend