|Version 14 (modified by jbenito, 3 years ago) (diff)|
You will need:
- A computer;
- Python, Apache (pre-fork) and mod_python (easy to install using any modern Linux distribution);
The examples are provided for *nix, but you should be able to do the same using other operating systems. See GitAndWindows, for instance
Getting the source code
jdoe@localhost ~$ mkdir indico jdoe@localhost ~$ cd indico jdoe@localhost ~/indico$ jdoe@localhost ~/indico$ git clone ssh://firstname.lastname@example.org/afs/cern.ch/project/indico/repo/cds-indico.git Initialized empty Git repository in /home/jdoe/indico/cds-indico/.git/ email@example.com's password: remote: Counting objects: 7854, done. remote: Compressing objects: 100% (5497/5497), done. remote: Total 7854 (delta 4368), reused 3252 (delta 2235) Receiving objects: 100% (7854/7854), 26.73 MiB | 5627 KiB/s, done. Resolving deltas: 100% (4368/4368), done. jdoe@localhost ~/indico$
Now, you should have a clone of the Indico source tree:
jdoe@localhost ~/indico$ cd cds-indico jdoe@localhost ~/indico/cds-indico$ ls AUTHORS bin ChangeLog COPYING doc etc ez_setup.py indico INSTALL MANIFEST.in NEWS README setup.py tests THANKS
Preparing the Development Environment
So, time to configure a development environment...
jdoe@localhost ~/indico/cds-indico$ python setup.py develop running develop Upgrading existing etc/indico.conf.. Indico needs to store some information in the filesystem (database, cache, temporary files, logs...) Please specify the directory where you'd like it to be placed. (Note that putting it outside of your sourcecode tree is recommended) [/home/jdoe/indico/cds-indico]: /home/jdoe/indico Creating directories... Done! uid/gid not provided. Trying to guess them... found apache(48) apache(48) We need to 'sudo' in order to set the permissions of some directories... Password:
At this time you should insert your password, so that the install script can set the permissions for the directories.
2.b. Launching Indico
i. After you have your Indico code somewhere, update the Apache2 configuration files to use the directory where you placed it (see Configuring and testing mod_python).
ii. Create a folder in which logs, temp files and so will be stored: Something like /opt/indico is the best option. Remember to give permissions enough to that folder, otherwise Indico will not work properly. After that, go to the folder where you downloaded the Indico code and rename the etc/indico.conf.sample to indico.conf. Change the directories part relative to the bin, configuration, documentation and htdocs dir in the indico.conf file. That part should look similar to this:
ArchiveDir = "/opt/indico/archive" BinDir = "/home/cesar/cds-indico/bin" ConfigurationDir = "/home/cesar/cds-indico/etc" DocumentationDir = "/home/cesar/cds-indico/doc" HtdocsDir = "/home/cesar/cds-indico/indico/htdocs" LogDir = "/opt/indico/log" UploadedFilesTempDir = "/opt/indico/tmp" XMLCacheDir = "/opt/indico/cache"
Obviously, you'll need to change the path for one that works for you.
iii. Check if python-setuptools package is installed, and install it in case it is not. After that go to the indico directory. You should see a setup.py file. Execute easy_install . and python setup.py develop
iv. Configure the SMTP server that Indico will use to send emails. Without this, you won't be able to create users in Indico because Indico sends confirmation emails.
For this, edit the etc/indico.conf file.
You have 2 options:
-You put cernmx.cern.ch as SMTP server (no user / password needed) (recommended).
-Either you set up a SMTP server at your PC and put your own PC as SMTP server.
v. The final step! See if it all works!
-[Only if you use python2.5 and want to start with an empty database. Not necessary with python2.4, Indico will be able to create the DB itself:] Create an empty database by executing the following script: Script to create an empty ZODB
-Start the zdaemon with zdaemon -C etc/zdctl.conf start
-Open your browser and go to http://(your_host_name)/indico/index.py
If all goes good you should see Indico's welcome page!
The first thing you should do is create the first Indico user which will become Indico's main administrator :)
2.c. Room Booking module
-Only read this if you need to have the room booking module active for your work (you need to test / debug / improve / use it). How to setup the room booking module for developers.
A: Maybe someone messed up the template. Or maybe you did like me and downloaded the source code with TortoiseCVS in Windows, and then copied it from Windows to Linux. Try doing a checkout again from Linux.
Q: When Indico tries to send an email, it doesn't work.
A: Try changing the SMTP server in MaKaCConfig.py to cernmx.cern.ch.
Q: What does MaKaC mean. I cannot sleep without knowing the answer'''
A: Once upon a time, an Indico elder told me that it was not a monkey's name. It actually meant 'Make a Conference'.
Q: I got an error similar to: cannot write to such and such file.
A: Try changing the permissions of the files so that Indico can write on them. If Indico is trying to create a file in a directory, Indico should have read, write and execution rights on that directory. Also create the directory if it doesn't exist already!
Q: I get a DisconnectedError? when connecting to Indico for the first time.
A: This can happen in the following situation: -You are using python2.5 and (possibly) ZODB 3.4, 3.6, 3.7. -You don't have a data.fs file in the data directory, i.e., you are starting without a database file. In this case, you have to create an empty database file with the following file (courtesy of Pedro):
import ZODB from ZODB import FileStorage, DB import transaction storage = FileStorage.FileStorage("data.fs") db = DB(storage) connection = db.open() dbroot = connection.root() transaction.commit() connection.close() db.close() storage.close()