|
|
|
|
69
|
|
69
|
|
70
|
* developed with python >=3.4.
|
70
|
* developed with python >=3.4.
|
71
|
* based on the [TurboGears](http://www.turbogears.org/) web framework.
|
71
|
* based on the [TurboGears](http://www.turbogears.org/) web framework.
|
72
|
-* relying on [PostgreSQL](http://www.postgresql.org/) as the storage engine.
|
|
|
|
|
72
|
+* relying on [PostgreSQL](http://www.postgresql.org/) or [MySQL](https://www.mysql.fr/) as the storage engine.
|
73
|
|
73
|
|
74
|
The user interface is based on the following resources and technologies:
|
74
|
The user interface is based on the following resources and technologies:
|
75
|
|
75
|
|
|
|
|
|
79
|
* Icons are taken from [Tango Icons](http://tango.freedesktop.org/) and [Font Awesome](http://fortawesome.github.io/Font-Awesome/)
|
79
|
* Icons are taken from [Tango Icons](http://tango.freedesktop.org/) and [Font Awesome](http://fortawesome.github.io/Font-Awesome/)
|
80
|
* The design is based on the [Bootstrap dashboard example](http://getbootstrap.com/examples/dashboard/) and uses some images from [Start Boostrap free templates](http://startbootstrap.com/)
|
80
|
* The design is based on the [Bootstrap dashboard example](http://getbootstrap.com/examples/dashboard/) and uses some images from [Start Boostrap free templates](http://startbootstrap.com/)
|
81
|
|
81
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
It runs on [Debian GNU/Linux](http://www.debian.org/), it should work out-of-the-box on [Ubuntu](http://www.ubuntu.com/) and also on other GNU/Linux distributions.
|
82
|
It runs on [Debian GNU/Linux](http://www.debian.org/), it should work out-of-the-box on [Ubuntu](http://www.ubuntu.com/) and also on other GNU/Linux distributions.
|
85
|
|
83
|
|
86
|
-Hopefully it works on BSD and Windows OSes (but this has not been tested yet)
|
|
|
|
|
84
|
+Hopefully it works on BSD and Windows OSes (but this has not been tested yet).
|
87
|
|
85
|
|
88
|
----
|
86
|
----
|
89
|
|
87
|
|
|
|
|
|
113
|
|
111
|
|
114
|
_Note: the following information is for Debian. For other OS, adapt the package names._
|
112
|
_Note: the following information is for Debian. For other OS, adapt the package names._
|
115
|
|
113
|
|
116
|
-You'll need to install the following packages:
|
|
|
|
|
114
|
+You'll need to install the following packages on your Operating System:
|
|
|
115
|
+
|
|
|
116
|
+ apt-get install git realpath python3 python-virtualenv python3-dev python-pip build-essential libxml2-dev libxslt1-dev python-lxml
|
|
|
117
|
+
|
|
|
118
|
+## Database ##
|
117
|
|
119
|
|
118
|
- apt-get install realpath python3 python-virtualenv python3-dev python-pip build-essential postgresql-server-dev-all libxml2-dev libxslt1-dev python-lxml
|
|
|
|
|
120
|
+If you want use PostgreSQL as database engine:
|
119
|
|
121
|
|
120
|
-If you work on a local database, then you also need to install PostgreSQL:
|
|
|
|
|
122
|
+ apt-get install postgresql-server-dev-all postgresql postgresql-client
|
121
|
|
123
|
|
122
|
- apt-get install postgresql postgresql-client
|
|
|
|
|
124
|
+Or if you want to use MySQL as database engine
|
|
|
125
|
+
|
|
|
126
|
+ apt-get install mysql-server mysql-client libmysqlclient-dev
|
123
|
|
127
|
|
124
|
## Installation ##
|
128
|
## Installation ##
|
125
|
|
129
|
|
126
|
### Get the source ###
|
130
|
### Get the source ###
|
127
|
|
131
|
|
128
|
-Get the sources from Bitbucket:
|
|
|
|
|
132
|
+Get the sources from github with git:
|
129
|
|
133
|
|
130
|
git clone https://github.com/tracim/tracim.git
|
134
|
git clone https://github.com/tracim/tracim.git
|
131
|
cd tracim/
|
135
|
cd tracim/
|
132
|
|
136
|
|
133
|
*Note: Now everything is documented to be executed from the tracim directory newly created.*
|
137
|
*Note: Now everything is documented to be executed from the tracim directory newly created.*
|
134
|
|
138
|
|
135
|
-
|
|
|
136
|
### Setting-up python virtualenv ###
|
139
|
### Setting-up python virtualenv ###
|
137
|
|
140
|
|
138
|
-_Reminder : Tracim is developped and tested using python3.4._
|
|
|
|
|
141
|
+_Reminder : Tracim is developed and tested using python3.4._
|
|
|
142
|
+
|
|
|
143
|
+We strongly recommend to use virtualenv as deployment environment. This ensure that there will be no conflict between system-wide python installation and Tracim required ones. To Create the virtual environment:
|
139
|
|
144
|
|
140
|
-Tracim uses virtualenv as deployment environment. This ensure that there will be no
|
|
|
141
|
-conflict between system-wide python installation and Tracim required ones.
|
|
|
|
|
145
|
+ virtualenv -p /usr/bin/python3.4 tg2env
|
|
|
146
|
+
|
|
|
147
|
+And to activate it in your terminal session (**all tracim command execution must be executed under this virtual environment**)):
|
142
|
|
148
|
|
143
|
- virtualenv -p /usr/bin/python3 tg2env
|
|
|
144
|
source tg2env/bin/activate
|
149
|
source tg2env/bin/activate
|
|
|
150
|
+
|
|
|
151
|
+To install tracim and it's dependencies:
|
|
|
152
|
+
|
145
|
cd tracim && python setup.py develop && cd -
|
153
|
cd tracim && python setup.py develop && cd -
|
146
|
pip install -r install/requirements.txt
|
154
|
pip install -r install/requirements.txt
|
147
|
|
155
|
|
|
|
156
|
+**Note**: If you want to use MySQL database, please refer to Documentation/database schema note to install required package.
|
|
|
157
|
+
|
148
|
## Database Setup ##
|
158
|
## Database Setup ##
|
149
|
|
159
|
|
150
|
### Minimalist introduction to PostgreSQL ###
|
160
|
### Minimalist introduction to PostgreSQL ###
|
|
|
|
|
220
|
|
230
|
|
221
|
In this case, delete the user and database you previously created (using pgtool) and do it again. Do not forget to run the grant_all_rights command!
|
231
|
In this case, delete the user and database you previously created (using pgtool) and do it again. Do not forget to run the grant_all_rights command!
|
222
|
|
232
|
|
|
|
233
|
+### Minimalist introduction to MySQL ###
|
|
|
234
|
+
|
|
|
235
|
+## Create database ##
|
|
|
236
|
+
|
|
|
237
|
+Connect to mysql with root user (password has been set at "Installation" -> "Dependencies" chapter, when installing package)
|
|
|
238
|
+
|
|
|
239
|
+ mysql -u root -p
|
|
|
240
|
+
|
|
|
241
|
+Create a database with following command:
|
|
|
242
|
+
|
|
|
243
|
+ CREATE DATABASE tracimdb;
|
|
|
244
|
+
|
|
|
245
|
+Create a user with following command:
|
|
|
246
|
+
|
|
|
247
|
+ CREATE USER 'tracimuser'@'localhost' IDENTIFIED BY 'tracimpassword';
|
|
|
248
|
+
|
|
|
249
|
+And allow him to manipulate created database with following command:
|
|
|
250
|
+
|
|
|
251
|
+ GRANT ALL PRIVILEGES ON tracimdb . * TO 'tracimuser'@'localhost';
|
|
|
252
|
+
|
|
|
253
|
+Then flush privileges:
|
|
|
254
|
+
|
|
|
255
|
+ FLUSH PRIVILEGES;
|
|
|
256
|
+
|
|
|
257
|
+You can now quit mysql prompt:
|
|
|
258
|
+
|
|
|
259
|
+ \q
|
|
|
260
|
+
|
223
|
## Configuration ##
|
261
|
## Configuration ##
|
224
|
|
262
|
|
225
|
At this point, you have :
|
263
|
At this point, you have :
|
226
|
|
264
|
|
227
|
* an installation of Tracim with its dedicated python3-ready virtualenv
|
265
|
* an installation of Tracim with its dedicated python3-ready virtualenv
|
228
|
-* a PostgreSQL server and dedicated database
|
|
|
|
|
266
|
+* a PostgreSQL/MySQL server and dedicated database
|
229
|
|
267
|
|
230
|
What you have to do now is to configure the application and to initialize the database content.
|
268
|
What you have to do now is to configure the application and to initialize the database content.
|
231
|
|
269
|
|
|
|
|
|
237
|
|
275
|
|
238
|
#### Database access ####
|
276
|
#### Database access ####
|
239
|
|
277
|
|
240
|
-Configure database in the development.ini file. This is defined as sqlalchemy.url
|
|
|
241
|
-and the default value is below:
|
|
|
|
|
278
|
+Configure database in the development.ini file. This is defined as sqlalchemy.url. There is an example value for PostgreSQL below:
|
242
|
|
279
|
|
243
|
sqlalchemy.url = postgresql://tracimuser:tracimpassword@127.0.0.1:5432/tracimdb?client_encoding=utf8
|
280
|
sqlalchemy.url = postgresql://tracimuser:tracimpassword@127.0.0.1:5432/tracimdb?client_encoding=utf8
|
244
|
|
281
|
|
|
|
282
|
+There is an example value for MySQL below (please refer to Documentation/database schema note to install required package):
|
|
|
283
|
+
|
|
|
284
|
+ sqlalchemy.url = mysql+oursql://tracimuser:tracimpassword@127.0.0.1/tracimdb
|
|
|
285
|
+
|
245
|
#### Listening port
|
286
|
#### Listening port
|
246
|
|
287
|
|
247
|
Default configuration is to listen on port 8080. If you want to adapt this to your environment, edit the .ini file and setup the port you want:
|
288
|
Default configuration is to listen on port 8080. If you want to adapt this to your environment, edit the .ini file and setup the port you want:
|
|
|
|
|
256
|
|
297
|
|
257
|
#### SMTP parameters for resetpassword and notifications
|
298
|
#### SMTP parameters for resetpassword and notifications
|
258
|
|
299
|
|
259
|
-for some reason, you have to configure SMTP parameters for rest password process and SMTP parameters for notifications in separate places.
|
|
|
|
|
300
|
+for technical reason, you have to configure SMTP parameters for rest password process and SMTP parameters for notifications in separate places.
|
260
|
|
301
|
|
261
|
The reset password related parameters are the follwoing ones :
|
302
|
The reset password related parameters are the follwoing ones :
|
262
|
|
303
|
|
|
|
|
|
316
|
|
357
|
|
317
|
You may need an administrator account to manage Tracim. Use the following command (from ``/install/dir/of/tracim/tracim``):
|
358
|
You may need an administrator account to manage Tracim. Use the following command (from ``/install/dir/of/tracim/tracim``):
|
318
|
|
359
|
|
319
|
-```
|
|
|
320
|
-gearbox user create -l admin-email@domain.com -g managers -g administrators
|
|
|
321
|
-```
|
|
|
|
|
360
|
+ gearbox user create -l admin@admin.admin -p admin@admin.admin -g managers -g administrators
|
322
|
|
361
|
|
323
|
Keep in mind ``admin-email@domain.com`` must match with LDAP user.
|
362
|
Keep in mind ``admin-email@domain.com`` must match with LDAP user.
|
324
|
|
363
|
|
|
|
|
|
336
|
|
375
|
|
337
|
The last step before to run the application is to initialize the database schema. This is done through the following command:
|
376
|
The last step before to run the application is to initialize the database schema. This is done through the following command:
|
338
|
|
377
|
|
339
|
- source tg2env/bin/activate
|
|
|
|
|
378
|
+**Note**: If you want to use MySQL database, please install this pip package: ```pip install https://launchpad.net/oursql/py3k/py3k-0.9.4/+download/oursql-0.9.4.zip```
|
|
|
379
|
+
|
340
|
cd tracim && gearbox setup-app && cd -
|
380
|
cd tracim && gearbox setup-app && cd -
|
341
|
|
381
|
|
342
|
## Running the server ##
|
382
|
## Running the server ##
|
|
|
|
|
356
|
13:53:50,862 INFO [gearbox] Starting server in PID 11174.
|
396
|
13:53:50,862 INFO [gearbox] Starting server in PID 11174.
|
357
|
Starting HTTP server on http://0.0.0.0:8080
|
397
|
Starting HTTP server on http://0.0.0.0:8080
|
358
|
|
398
|
|
359
|
-You can now enter the application at [http://localhost:8080](http://localhost:8080) and login:
|
|
|
|
|
399
|
+You can now enter the application at [http://localhost:8080](http://localhost:8080) and login with admin created user. If admin user not created yet, execute following command:
|
360
|
|
400
|
|
361
|
-* user : admin@admin.admin
|
|
|
362
|
-* password : admin@admin.admin
|
|
|
|
|
401
|
+ gearbox user create -l admin@admin.admin -p admin@admin.admin -g managers -g administrators
|
363
|
|
402
|
|
364
|
Enjoy :)
|
403
|
Enjoy :)
|
365
|
|
404
|
|
|
|
|
|
397
|
Building the community is a work in progress.
|
436
|
Building the community is a work in progress.
|
398
|
|
437
|
|
399
|
Need help ? Do not hesitate to contact me : damien.accorsi@free.fr
|
438
|
Need help ? Do not hesitate to contact me : damien.accorsi@free.fr
|
400
|
-
|
|
|