Trac install

From OPeNDAP Documentation
Revision as of 17:37, 20 January 2014 by Jimg (talk | contribs)
⧼opendap2-jumptonavigation⧽

Todo (1/20/14):

  • Remove current trac install
  • install Trac 0.12
  • install plugins
  • copy old data
  • add in agilo

Old todo:

  • Figure out if the account manager plugin will work with Agilo - it does
  • turn on https
  • copy more set up info from the notebook
  • Install Agilo plugin DONE
  • figure out what else to instal and do it (goto http://scm.opendap.org/trac/about to see what's installed) DONE but there are issues to be resolved
  • copy over the old data base
  • edit the value of base_url in [trac] section of trac.ini


Updated with information about the update to Trac 1.0.1 and the Agilo plugin.

Authentication

Added code to the trac.conf httpd conf file in /etc/httpd/conf.d/trac.conf:

<Location "/trac/login">
  AuthType Basic
  AuthName "Trac"
  AuthUserFile /usr/local/scm/svn-httpd-passwd
  Require valid-user
</Location>

And the login button worked. Since the passwd file was copied over the old user names and passwords are all there.

Logging

In the [logging] section of the trac.ini file. Need to set the log type to file to get log info in a file. The default is none and that turns off logging.

Serving static pages

First, use trac-admin to deploy the htdocs. I copied the result to /var/www/trac. dropping the htdocs dir and just copying the common and site dirs into /var/www/trac. Then set up the two directories so that the aliases /chrome/{common,site} can be used to access the stuff they contain. Note that site is supposed to hold the site specific stuff like a logo.

I also copied the trac.wsgi file in deploy/cgi-bin to /var/www/cgi-bin.

In trac.ini, set the logo (in the section [header_logo]0 using src = /chrome/site/opendap_scm_2.png and the htdocs location for the common pages (in the section [trac]) using htdocs_location = /chrome/common

# This configures the web server to serve Trac pages so the static              
# parts don't get processed by python. The paths /chrome/common and             
# /chrome/site are used in the trac.ini file.                                   
Alias /chrome/common /var/www/trac/common

<Directory /var/www/trac/common>
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
</Directory>

<Location /chrome/common>
  SetHandler None
</Location>

Alias /chrome/site /var/www/trac/site

<Directory /var/www/trac/site>
        Options Indexes MultiViews
        AllowOverride None
        Order allow,deny
        Allow from all
</Directory>

<Location /chrome/site>
  SetHandler None
</Location>

Agilo Plugin

Goto http://www.agilofortrac.com/, get an account and download the Agilo egg file, checking the hosts python version (2.6.6 right now) and making sure to get the egg file with the matching version (2.6)

The egg file was ziped, so I uncompressed it (unzip binary_agilo-PRO-py2.6.egg.zip) and restarted the web server.

I then ran trac-admin /usr/local/scm/trac/opendap upgrade and trac-admin /usr/local/scm/trac/opendap wiki upgrade as instructed.

borked

easy_install binary_agilo-1.3.12_PRO-py2.6.egg

trac-admin /usr/local/scm/trac/opendap permission add jimg TRAC_ADMIN

The easy_install step edited the trac.ini file, else add the following to [components] agilo.* = enabled

Re-run the upgrade command for/with trac-admin

Works; should look at opitons and tweak the setup/config

XML/RPM Plugin

This is used by Eclipse and the MyLyn task manager

Source: http://trac-hacks.org/wiki/XmlRpcPlugin

easy_install -Z -U http://trac-hacks.org/svn/xmlrpcplugin/trunk

then in trac.ini:

[components]
tracrpc.* = enabled

Not sure why this doesn't show up in the admin's plugin panel.

Table of Contents Plugin

This adds a TOC to the wiki pages. I'm adding it because we used it before and I want to smooth migration of old pages.

Source: http://trac-hacks.org/wiki/TocMacro

Looks like it does not support Trac 1.0++

Master tickets Plugin

Enables ticket dependency.

Source: http://trac-hacks.org/wiki/MasterTicketsPlugin

easy_install http://trac-hacks.org/svn/masterticketsplugin/trunk/

Then in trac.ini:

[components]
mastertickets.* = enabled

[ticket-custom]
blocking = text
blocking.label = Blocking
blockedby = text
blockedby.label = Blocked By

Upgrade the Trac environment:

trac-admin /usr/local/scm/trac/opendap/ upgrade

And

trac-admin /usr/local/scm/trac/opendap wiki upgrade

Agilo seems to override this...

account manager plugin

Makes it easier for people to manage their accounts

Source: http://trac-hacks.org/wiki/AccountManagerPlugin

easy_install https://trac-hacks.org/svn/accountmanagerplugin/tags/acct_mgr-0.4.3/

No idea if this is working - Agilo seems to bork other plugins.

Configuration notes

In the trac.ini I can turn off or on the 'native' ticket system of Trac using these settings:

trac.ticket.api.ticketsystem = enabled
trac.ticket.roadmap.roadmapmodule = enabled
trac.ticket.web_ui.ticketmodule = enabled

Agilo seems to want to have only four types of tickets; not sure if turning on the 'regular' ticket system will break it or what. Enabling these does add a 'New Ticket' menu item to the menu bar.

This seems to break things...