This repository has been archived by the owner on May 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
INSTALL
134 lines (103 loc) · 4.85 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
mobyle2 installation procedure
==============================
Disclaimer: this document is a work in progress, which is currently only aimed
at facilitating setup for development purposes.
Development setup
-----------------
This procedure describes the installation of mobyle2 in a virtualenv sandbox for
development purposes.
### Install Prerequisites
Prior to setting up mobyle2, you need to:
* install virtualenv: **virtualenv** is a tool to create isolated Python environments. It's safer to
set up your mobyle2 development environment in such a sandbox, to prevent
library conflicts with your default Python environment.
* install mongodb
Distribution-specific notes for the installation of these prerequisites are available at the end of
this document (currently Ubuntu and CentOS).
### Modify etc/hosts configuration for velruse authentication library to work
For authentication to work properly, the current code of mobyle2/velruse
forces you to connect to Mobyle in HTTP using the **mobyle2** host name.
Just add the following line in your '/etc/hosts' file:
127.0.0.1 mobyle2
### Install mobyle2 in virtualenv
1. Create a mobyle2 environment
$virtualenv mobyle2
or if you do not have a virtualenv wrapper
$python [virtualenv.py full path] mobyle2
This will create the mobyle2 folder, which will contain the Mobyle2 environment.
Note: depending on your virtualenv version, it may be necessary to add the '--no-site-packages' option.
This option has no effect in recent relases, so it won't hurt to use it in any cases.
2. Run the activate script
$cd mobyle2
$. bin/activate
3. Install mobyle2
$pip install -e git+https://github.com/mobyle2/mf-pyramid.git#egg=mf
$pip install -e git+https://github.com/mobyle2/mobyle2.lib.git@develop#egg=mobyle2.lib
$pip install -r src/mobyle2.lib/requirements.txt
$pip install -e git+https://github.com/mobyle2/mobyle2.conf.git@develop#egg=mobyle2.conf
$pip install -e git+https://github.com/mobyle2/mobyle2.web.git@develop#egg=mobyle2.web
Option '-e' will install mobyle2 in **edit mode** in the 'src/mobyle.web' folder
and create automatically a mobyle.web.pth path configuration file, so that you can
edit and test it directly.
4. Initialize the database
python src/mobyle2.lib/scripts/db/mob_seed --config src/mobyle2.conf/mobyle.ini
5. Load EDAM
(EDAM ontology, in OWL format, can be found at http://edamontology.org/EDAM.owl)
python src/mobyle2.lib/scripts/imports/edam_import.py --config src/mobyle2.web/development.ini --edamfile [path to EDAM ontology owl file] init
6. Load Mobyle services
You can either:
- load existing Mobyle2 services directly. You can have such examples of descriptions in the Mobyle 2 services repository (https://github.com/mobyle2/mobyle2.services)
you can chekout this repository locally along your other git repositories then load the services with the following command:
python src/mobyle2.lib/scripts/db/mob_services_loader -public -init --config src/mobyle2.conf/mobyle.ini --load src/mobyle2.services/*.yaml
- import Mobyle1 XML service descriptions.
(XML files for Mobyle 1 can be found at ftp://ftp.pasteur.fr/pub/gensoft/projects/mobyle)
python src/mobyle2.lib/import/mob_m1_services_import --config src/mobyle2.conf/mobyle.ini [path to Mobyle 1 XML files] -init -public
7. Start and connect to your mobyle2 server
$pserve --reload src/mobyle2.web/development.ini
You're done! Go to:
http://mobyle2:6543/
10. Unit tests
You first need to install nose in the virtualenv:
$pip install nose
Once this is done, bin/activate needs to be re-sourced to update the path:
$. bin/activate
**Warning**: to run the tests, please note that you need to start the server.
Otherwise, at least the login tests will fail.
Simply call:
$python /usr/bin/nosetests src/mobyle2.web
(If nose is not installed on your system: $pip install nose)
### Ubuntu installation notes
1. Virtualenv
$sudo apt-get install python-virtualenv
2. MongoDB
$sudo apt-get install mongodb
### CentOS
1. Virtualenv
$easy_install virtualenv
2. MongoDB
To install mongodb in CentOS:
Create a /etc/yum.repos.d/10gen.repo file to hold information about your repository.
If you are running a 64-bit system (recommended) place the following configuration in
/etc/yum.repos.d/10gen.repo file:
[10gen]
name=10gen Repository
baseurl=http://downloads-distro.mongodb.org/repo/redhat/os/x86_64
gpgcheck=0
enabled=1
$yum update
$yum install mongo-10gen mongo-10gen-server
$mkdir /data
$cd /data
$mkdir db
for more information see:
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-redhat-centos-or-fedora-linux/
3. Git
$yum install git.x86_64
4. Python on CentOS
You may have to recompile your Python Interpreter with --with-ssl option, if SSL support is not
available by default in your installation.
$cd Python-2.7.3
$./configure --with-ssl
$make
$su
$make install