Agilo for Scrum is a project management tool for Scrum. Agilo is open source software, but you can also buy Pro extension. It is a web application, based on Trac, which is a great lightweight, flexible and extensible ticketing software.
I need Agilo for Scrum with support for Git and user accounts and I will host it on Apache web server with mod_WSGI. MySQL is my choice for database. There are a lot of other possibilities for Agilo/Trac installation, but this post should be a good reference even in that case.
Get all software we need
First we have to get all software that is going to be used. We will need apache web server, WSGI module, mysql server and python setuptools.
sudo apt-get update && sudo apt-get upgrade sudo apt-get install apache2 libapache2-mod-wsgi python-setuptools python-genshi mysql-server python-mysqldb subversion git-core sudo apt-get install python-pybabel python-docutils python-pygments python-tz
Now we have to install Trac, AccountManager and GitPlugin. We will do that with setuptools.
sudo easy_install Trac==0.12 sudo easy_install https://trac-hacks.org/svn/accountmanagerplugin/trunk sudo easy_install http://github.com/hvr/trac-git-plugin/tarball/master
We will download Agilo from their webiste. There are eggs availible for Python 2.4, 2.5 and 2.6 (direct download links for Agilo 1.3.3: 2.4, 2.5, 2.6). Downloaded file must be unziped and installed using setuptools.
unzip binary_agilo-//version nr//_PRO-py//your python version//.egg.zip sudo easy_install binary_agilo-//version nr//_PRO-py//your python version//.egg
Configure MySQL
We are going to need one database and user with all privileges for that database. First login:
mysql -u root -p //type in root password//
Now create database and user:
CREATE DATABASE trac DEFAULT CHARACTER SET utf8 COLLATE utf8_bin; GRANT ALL ON trac.* TO trac@localhost IDENTIFIED BY 'yourpassword';
MySQL connection string for this case would be:
mysql://trac:yourpassword@localhost/trac
Create and deploy Trac project
We'll need one Trac project for our installation. We can create one using trac-admin tool. We'll be asked for some basic configuration. When installer asks us about database configuration we have to enter MySQL string from previous chapter.
sudo trac-admin /path/to/trac/project initenv
Now we have to deploy our project (create .wsgi file). We will use trac-admin once again.
sudo trac-admin /path/to/trac/project deploy /path/to/trac/project
Correct permissions for Apache.
sudo chown -R www-data:www-data /path/to/trac/project
Configure Apache for WSGI
We create new config file in Apache's conf.d folder.
sudo nano /etc/apache2/conf.d/trac.conf
Config file should look something like this.
WSGIScriptAlias /trac /path/to/trac/project/deploy/cgi-bin/trac.wsgi
<directory /path/to/trac/project/deploy/cgi-bin>
WSGIApplicationGroup %{GLOBAL}
Order deny,allow
Allow from all
</directory>
Enable Apache's WSGI module.
sudo a2enmod wsgi
And finnaly restart Apache.
sudo /etc/init.d/apache2 restart
Basic Trac installation should be now already availible at http://ip-or-domain/trac.
Install Agilo for Scrum
We have to enable Agilo, when Trac works. We can do that in Trac's config file. Let's open it.
sudo nano /path/to/trac/project/conf/trac.ini
Search for "Component" part and add following lines.
[components] agilo.* = enabled # the following lines are only required to use Agilo Pro agilo_common.* = enabled agilo_pro.* = enabled
Upgrade Trac's database.
sudo trac-admin /path/to/trac/project upgrade
Agilo for Scrum should be enabled now. Visit your Trac installation in web browser to check out.
Enable Git repository browsing
We use Git at work. Trac also supports other most popular versioning systems if you need something else. Git extension was already installed in first part of this HowTo. Now we just have to enable it. We will open trac.ini once again and add following lines in "trac" and "git" sections.
[components] tracext.git.* = enabled [trac] # simple single-repository configuration repository_dir = /path/to/git/repo repository_type = git ## the following settings are only supported for plugin version 0.11 or later [git] ## let Trac cache meta-data via CachedRepository wrapper; default: false cached_repository = true ## disable automatic garbage collection for in-memory commit-tree cache; default: false persistent_cache = true ## length revision sha-sums should be tried to be abbreviated to (must be >= 4 and <= 40); default: 7 shortrev_len = 6 ## (0.12.0.3+) minimum length for which hex-strings will be interpreted as commit ids in wiki context; default: 40 wiki_shortrev_len = 7 ## executable file name (in case of doubt use absolute path!) of git binary; default: 'git' git_bin = /usr/bin/git ## (0.12.0.5+) define charset encoding of paths stored within git repository; default: 'utf-8' git_fs_encoding = latin1 ## (0.12.0.3+) enable reverse mapping of git email addresses to trac user ids; default: false trac_user_rlookup = true ## (0.12.0.3+) use git-committer id instead of git-author id as changeset owner; default: true use_committer_id = false ## (0.12.0.3+) use git-committer timestamp instead of git-author timestamp as changeset time; default: true use_committer_time = false
Change this values upon your needs. Put special attention to git_bin and repository_dir. Link to Git browser should appear in Agilo's main menu if everything went fine.
Enable AccountManager
AccountManager was already installed, so we just have to enable it. Open config file once again and add following lines to "components" section. AccountManager supports various password storing backends. We'll use htpasswd here.
[components] trac.web.auth.LoginModule = disabled acct_mgr.web_ui.LoginModule = enabled acct_mgr.web_ui.RegistrationModule = disabled trac.web.auth.loginmodule = disabled acct_mgr.htfile.HtPasswdStore = enabled [account-manager] account_changes_notify_addresses = password_store = HtPasswdStore htpasswd_hash_type = password_file = /path/to/htpasswd/file
If we want to login to Agilo, we have to create at least one username in htpasswd file. We can do tis with htpasswd command.
htpasswd -c /path/to/htpasswd/file admin
We can configure permissions with trac-admin.
trac-admin /path/to/projenv permission add admin TRAC_ADMIN
TRAC_ADMIN is superuser permission. More info about permissions in Trac can be found in Trac's wiki.





Comments
Perfect tutorial
Submitted by Dave (not verified) on
Thanks for this great tutorial! I followed all the steps and everything is working perfectly on my server. I only had to keep the 'deploy' out of the apache config file.
Thanks again.
How to install Trac, Agilo for Scrum and Git browser on Ubuntu 1
Submitted by Webseite (not verified) on
Bonjour, das Thema finde ich spannend, existieren mittlerweile etwas
neuere "Fakten"? Habe auf deiner Seite leider wenig gefunden.
i got a problem
Submitted by problem (not verified) on
i cant create user somehow :( everything is fine , but i cant crease a user instead of the admin
No permission to access /trac on this server
Submitted by Oguz Meteer (not verified) on
I followed this guide (but did remove the '/deploy/'-part since there is no deploy directory), but I cannot view the trac page. I get the error:
Forbidden
You don't have permission to access /trac on this server.
So I tried using tracd, which does show me a page, but then I get the error:
Warning: Error in navigation-contributor "BrowserModule"
Oops…
Trac encountered an internal error:
GitError: GIT control files not found, maybe wrong directory?
Any clues why I can't use apache?
When configuring the git
Submitted by Oguz Meteer (not verified) on
When configuring the git repository I forgot to add the '/.git' part, so now it can find the repository.
The reason why I couldn't use apache was because I put the trac project folder somewhere where the apache user www-data could not reach. So I put the project folder in /var/www/trac and now it works.
Unfortunately I can't login with 'admin' + password that is in the htpasswd file, but I'll figure out how to fix that.
Hi,
Submitted by Martin Röbert (not verified) on
Hi,
great tutorial. But I have the same problem as the poster above: I cannot log in with admin and the password I've set. I get an Error: "Username or password invalid" (something like this). Any hints on that?
Just got the answer myself:
Submitted by Martin Röbert (not verified) on
Just got the answer myself: One have to use htpasswd_file instead of password_file
Some points
Submitted by Martin Röbert (not verified) on
- If you want to use the XmlRpc-Plugin (MyLyn-Integration) you have to tweak some config params and install an additional plugin
- Add the HttpAuthPlugin and enable it (httpauth.* = enable)
- configure it for the rpc-paths:
[httpauth]
paths = /xmlrpc, /login/xmlrpc
- Add to your apache2 configuration (/etc/apache2/conf.d/trac.conf):
WSGIPassAuthorization On
Otherwise the auth-headers are stripped from the request
- If you plan to use the CommitTicketReferenceMacro and CommitTicketUpdater:
- If you are using a Git Gatekeeper (Gitosis, Gitolite, …) modify the git* user, so he belongs to the www-data group and can access the trac.ini and write to your trac environment.
- Add a postreceive-hook to your gits hooks-directory (see http://trac-hacks.org/wiki/GitPlugin#post-receivehookscripts)
hovalot
Submitted by Exinkanna (not verified) on
hovalot
http://www.hovalot1.ru/
Add new comment