Commit 2ffa01d5 authored by Mathieu Courcelles's avatar Mathieu Courcelles

Updates installation for Windows

parent afd982a0
Pipeline #10165181 (#) passed with stage
in 2 minutes and 29 seconds
"""
Copyright 2015-2016 Mathieu Courcelles
Copyright 2015-2017 Mathieu Courcelles
CAPA - Center for Advanced Proteomics Analyses and Thibault's lab
IRIC - Universite de Montreal
"""
......@@ -24,27 +24,17 @@ for arg in sys.argv:
# Other wise check if local or production file is there
if loaded is False:
# Production settings
try:
from .production import *
except ImportError:
pass
# Development settings
print('hey')
# Local settings
try:
from .local import *
except ImportError:
pass
# Staging settings
try:
from .staging import *
except ImportError:
# Production settings
try:
from .production import *
pass
except ImportError:
pass
"""
Copyright 2013-2017 Mathieu Courcelles
CAPA - Center for Advanced Proteomics Analyses and Thibault's lab
IRIC - Universite de Montreal
"""
# Import standard libraries
# Import Django related libraries
# Import project libraries
from .base import *
from unipath import Path
PROJECT_DIR = Path(__file__).ancestor(3)
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
('Admin name', 'admin@name.ca'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': PROJECT_DIR + '/CLMSVault.db', # Or path to database file if using sqlite3.
'USER': '', # Not used with sqlite3.
'PASSWORD': '', # Not used with sqlite3.
'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
'PORT': '', # Set to empty string for default. Not used with sqlite3.
}
}
# SECURITY WARNING: keep the secret key used in production secret!
# You can generate a new secret_key here:
# http://www.miniwebtool.com/django-secret-key-generator/
SECRET_KEY = 'cur%pf+1k5=mf2d=jaurhr(djv&ve&&y%4px=pouav)0ytn@7-'
# Local time zone for this installation. Choices can be found here:
# http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
# although not all choices may be available on all operating systems.
# In a Windows environment this must be set to your system time zone.
TIME_ZONE = 'America/Montreal'
PERCOLATOR_BIN = r'C:\Program Files (x86)\percolator-v2-07\bin\percolator.exe'
# CLMSVault
CLMSVault is an open source web based software for storing, processing and visualizing protein cross-linking data sets.
CLMSVault can be run as a standalone software or deployed on a server running Docker.
## Getting started
* [Demo site] (http://democlmsvault.tyerslab.com/admin/)
* [User manual] (https://gitlab.com/courcelm/clmsvault/raw/master/static/CLMSVault_User_manual.pdf)
This diff is collapsed.
cd win32
REM Installing CLMSVault dependancies
pip install MySQL_python-1.2.5-cp27-none-win32.whl
pip install biopython-1.65-cp27-none-win32.whl
pip install numpy-1.9.2+mkl-cp27-none-win32.whl
pip install scipy-0.16.0-cp27-none-win32.whl
pip install setuptools-17.1.1-py2.py3-none-any.whl
cd ..
cd ..
cd requirements
pip install -r production_win.txt
cd ..
cd win64
REM Installing CLMSVault dependancies
pip install MySQL_python-1.2.5-cp27-none-win_amd64.whl
pip install biopython-1.65-cp27-none-win_amd64.whl
pip install numpy-1.9.2+mkl-cp27-none-win_amd64.whl
pip install scipy-0.16.0-cp27-none-win_amd64.whl
pip install setuptools-17.1.1-py2.py3-none-any.whl
cd ..
cd ..
cd requirements
pip install -r production_win.txt
cd ..
REM Python 2.7 must be installed for this script to work
cd install_dep
REM Update pip
python get-pip.py
REM Prepare Virtual environment
pip install virtualenv
easy_install -U distribute
pip install virtualenvwrapper-win
REM Creating virtual environnment for CLMSVault
mkvirtualenv CLMSVault_venv
REM Activating virutal environment of CLMSVault
workon CLMSVault_venv
copy .\CLMSVault\settings\local_.py .\CLMSVault\settings\local.py
conda create -n CLMSVault python=2.7 --yes --file requirements/base_win.txt
activate CLMSVault
\ No newline at end of file
pip install -q -r requirements/pip_win.txt
\ No newline at end of file
CLMSVault v1.0 - Installation instruction
CLMSVault 2017/07/24 - Windows 7 installation instruction
---------------------------------------------
Standalone on Windows 7 instruction:
---------------------------------------------
Notes:
-You will need administrator rights on your computer to install Python and its libraries.
1. Download and install Python 2.7 and the following python libraries
-Python 2.7 (https://www.python.org/downloads/) (Do not use Python 3, this code is not compatible!!)
1. Download and install Anaconda Python 2.7 (https://www.continuum.io/downloads).
2. Extract CLMSVault_v1.zip archive to C:\CLMSVault
2. Extract CLMSVault zip archive to C:\CLMSVault
3. Open Windows console
3. Open Windows command prompt:
-Open the Start menu
-Type in the search box:
cmd.exe
......@@ -23,99 +15,27 @@ cmd.exe
4. Navigate to the CLMSVault directory by typing:
cd C:\CLMSVault
5. Install the remaining Python libraries by typing:
5. Install the Python libraries by typing:
install_win.bat
then:
win32 for 32-bit Windows system
install_win_dep.bat
or
6. Edit settings files (ADMINS, SECRET_KEY, TIME_ZONE, Percolator path)
.\CLMSVault\settings\local.py
win64 for 64-bit Windows system
6. Add environment variables
-Open the Start menu
-Type in the search box:
env
-Click new
-Variable name: DJANGO_SETTINGS_MODULE
-Variable value: CLMSVault.settings.local
-Click new
-Variable name: SECRET_KEY
-Variable value: cur%pf+1k5=mf2d=jaurhr(djv&ve&&y%4px=pouav)0ytn@7-
-You can generate a new secret_key here: http://www.miniwebtool.com/django-secret-key-generator/
7. Edit settings files
.\CLMSVault\settings\local.py (ADMINS, TIME_ZONE)
8. Now everytime you want to start CLMSVault, navigate to the CLMSVault directory by typing:
7. Every time you want to start CLMSVault, navigate to the CLMSVault directory by typing:
cd C:\CLMSVault
workon CLMSVault_venv
activate CLMSVault
CLMSVault_win.bat
On the first start, you need to allow access to Windows Firewall to python.exe.
9. Use your web browser to access CLMSVault at: http://localhost:8000
8. Use your web browser to access CLMSVault at: http://localhost:8000
Login with the following administrator user:
user name: clmsvault
password: clms123
To add new users, go to the administration section and add user.
New users should have "staff" status activated and be in the "ms_expert" group.
Server on Windows 7 instruction:
---------------------------------------------
Follow the standalone installation instruction with the following modifications:
-Install Apache & MySQL servers
-Add the following configuration to your Apache config file. Replace username in WSGIPythonPath directive.
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName clmsvault.yourhost.com
Alias /media/ C:/CLMSVault/site_media/
Alias /static/ C:/CLMSVault/static/
## configuration for Django:
DocumentRoot C:/CLMSVault
WSGIScriptAlias / C:/CLMSVault/apache/django.wsgi
WSGIApplicationGroup %{GLOBAL}
WSGIPythonPath C:/CLMSVault;C:/Users/username/Envs/CLMSVault_venv/Lib/site-packages
<Directory C:/CLMSVault_v1>
Order deny,allow
Allow from all
</Directory>
</VirtualHost>
-Add SECRET_KEY variable to Apache environnment variable.
-Prepare MYSQL database
CREATE DATABASE CLMSVault;
GRANT USAGE ON *.* TO clmsvault IDENTIFIED BY "password";
GRANT ALL PRIVILEGES ON CLMSVault.* TO clmsvault;
-Edit CLMSVault_app\settings\production.py config file with your database host, user and password.
-Also edit ADMINS, TIME_ZONE, EMAIL_* variables
-Edit apache/django.wsgi (sys.path)
-Execute the following commands to export and import fixture into database
cd C:\CLMSVault
SET DJANGO_SETTINGS_MODULE=CLMSVault.settings.local
export SECRET_KEY='xysue^!p+a*082#c4t4#k%new0jm&j8=!$ir25)q#4y78joh7-'
python manage.py dumpdata > datadump.json
SET DJANGO_SETTINGS_MODULE=CLMSVault.settings.production
python manage.py syncdb
python manage.py loaddata datadump.json
-Check that the apache user can write recursively to C:/CLMSVault/site_media/
-Restart Apache and MySQL servers
-Use your web browser to access CLMSVault at: http://clmsvault.yourhost.com
\ No newline at end of file
See CLMSVault manual for usage instruction.
Django==1.7
django-grappelli==2.6.1
Unipath==1.0
MySQL-python==1.2.5
biopython==1.64
numpy==1.9.1
scipy==0.16.0
pytz==2014.7
\ No newline at end of file
django-grappelli==2.6.1
Unipath==1.0
-r base.txt
\ No newline at end of file
-r base_win.txt
\ No newline at end of file
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