|Version 28 (modified by jherr, 4 years ago) (diff)|
You will need:
- A computer running any modern Linux distribution or Windows (Mac OS X should work, although none of us have tested it). Most of the CERN Indico development team is currently using Ubuntu, so unless you have strong feelings otherwise, you might make your life easier by installing Ubuntu 9.10.
- The following software (Ubuntu package names listed in square brackets - use Synaptic Package Manager to find and install them)
- Python 2.4, 2.5 or 2.6 [python]
- Python development packages [python-dev]
- Apache httpd 2.2 or greater (make sure to use the pre-fork package! ) [apache2-mpm-prefork]
- mod_python 3.3 or greater [libapache2-mod-python]
- git [git-core]
- gettext package [gettext]
- The following three packages will eventually be installed automatically by Indico, but for now you will need to install them yourself:
- ReportLab [python-reportlab]
- libxml2 [libxml2]
- libxslt [libxslt1.1]
For help installing the required software in Windows, see GitAndWindows.
Getting the source code
You should choose one of the following two options...
OPTION 1. If you are CERN staff/user, you should do the following:
- Ask an administrator to create an Indico development account for you
- Make sure you have AFS working
- Clone the git repo as follows:[BR]
For the following examples, assume both your local username and indicodev account are jdoe
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$
OPTION 2. If you are not CERN staff/user:
- You won't have access to the CERN AFS repository. You should clone the git repo using http as follows:
jdoe@localhost ~/indico$ git clone http://cdsware.cern.ch/repo/cds-indico.git
- If you make contributions that you would like to include in CERN's installation of Indico, read these instructions: Dev/Collaboration
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
Indico requires some dependencies (libraries, etc...) that will now be installed automatically, with the exception of ReportLab, libxml2 and libxslt (which you have already installed manually as specified earlier). For more information on all of these dependencies, see Admin/Installation.
Now it's time to configure a development environment...
jdoe@localhost ~/indico/cds-indico$ sudo 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 enter your password, so that the install script can set the permissions for the directories.
You will be told to run the zdaemon command with some command line vars to start the database. You may need to do sudo on this command.
You should edit the file .git/info/exclude, adding a list of patterns to match files you want git to ignore.
jdoe@localhost:~/indico/cds-indico$ cat .git/info/exclude # git-ls-files --others --exclude-from=.git/info/exclude # Lines that start with '#' are comments. # For a project mostly in C, the following would be a good set of # exclude patterns (uncomment them if you want to use them): # *.[oa] # *~ *.pyc *.mo *~ etc/indico.conf etc/zdctl.conf etc/zodb.conf
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()