RT: Request Tracker, Part 2By Amy Rich, July 2003 In the previous article, I gave an overview of RT, and I installed all of the dependencies and RT itself from a bare Solaris 9 OS install. At that point, I still didn't have a functioning RT installation since I hadn't done any configuration. In this article, I'll cover RT concepts and configuration options, and walk through a simple setup. Initial RT ConfigurationI used the RT layout and installed RT into /usr/local/rt3, so my configuration files were located in the directory /usr/local/rt3/etc/. The default configuration, /usr/local/rt3/etc/RT_Config.pm, contained a number of variables that had to be set before I could even bring up the web interface. Instead of making changes to the default config file that might get overwritten by an upgrade, I copied this to the site config file and made my changes there:cp /usr/local/rt3/etc/RT_Config.pm /usr/local/rt3/etc/RT_SiteConfig.pm vi /usr/local/rt3/etc/RT_SiteConfig.pmI left only those lines I changed, and the last line, ";1". When I was done, my /usr/local/rt3/etc/RT_SiteConfig.pm contained the following: Set($rtname , "your.domain"); Set($Organization , "your.domain"); Set($OwnerEmail , 'rt-sysadmin'); Set($RTAddressRegexp , '^rt\@your.domain$'); Set($CorrespondAddress , 'rt@your.domain'); Set($CommentAddress , 'rt@your.domain'); Set($CanonicalizeEmailAddressMatch , 'subdomain.your.domain$'); Set($CanonicalizeEmailAddressReplace , 'your.domain'); Set($SendmailPath , "/usr/lib/sendmail"); Set($WebBaseURL , "https://rt.your.domain"); 1;I then initialized the RT database from inside the RT source tree: make initialize-databaseIn the previous article, I mentioned that I didn't want to set an administrative password for MySQL when I did the MySQL install, because RT would try to connect to the database without a password. Now that RT has done that and created its databases, I'm free to change the MySQL password: /usr/local/mysql/bin/mysqladmin -u root password 'YourPasswd' Configuring ApacheNow that I had finished the initial config file setup for RT, I needed to modify /usr/local/apache/conf/httpd.conf. Because I didn't want any unencrypted connections, I only wanted to run a server on port 443 of this machine. To do this, I removed the line "Listen: 80" from the SSL definition in httpd.conf:I also wanted Apache to run as the user www and the group www, since that is what the default RT installation expects. I also set the ServerAdmin to webmaster@your.domain: User www Group www ServerAdmin webmaster@your.domainThe only service I wanted running under Apache was RT, so I modified the virtual host _default_:443 and made the RT html directory my docroot. In addition, I needed to add a handler for fastcgi, specify the fastcgi server, and add a script alias so that everything went through the mason fastcgi: After saving these changes, I ran a configuration test to verify that the config file contained no errors: /usr/local/apache/bin/apachectl configtestThe test passed, so I started the web server: /usr/local/apache/bin/apachectl startsslAs a side note, with no startup/shutdown script in place, Apache won't exit cleanly on shutdown or start on reboot. I generally remove the <IfDefine SSL> blocks from httpd.conf, copy the apachectl script from /usr/local/apache/bin into /etc/init.d, and link to it from the appropriately named files in the rc directories.
RT ConceptsBefore I walk through a setup of RT via the web interface, let me detail the basic RT entities. The internals of RT are a number of perl scripts designed around the following concepts:
RT Setup Via the WebNow that I've discussed the basic building blocks of the RT configuration, here's the simple set up I went through. The first step was to point my web browser at https://rt.your.domain/. This presented me with a login screen asking for a username and a password. I logged in with the username root and the password specified at configuration time.
Now I got my first view of the RT GUI. Since RT hadn't received any tickets yet, most of the columns to the right were empty. There were no tickets that root owned or requested, and no tickets populated the default "General" queue. At this point, what was of interest to me was the configuration option on the left menu bar.
I started by making a user, so I wouldn't have to log in with the root account anymore. Here are the steps I took:
Next, I created a custom group so that I can later assign permissions to a number of users at once on a per-group basis.
Next I populated the new group with my new user.
Now that I had populated my "RT Administrators" group, I wanted to globally assign every possible right to users in that group.
Depending on how I was setting up RT, I might also want to assign various rights to the predefined system groups on this screen. For example, if I was setting up a ticketing system where people without RT accounts could also submit tickets, which is a fairly common scenario, I'd want to give the group "Everyone" the ability to create tickets. Create QueuesI wanted to create a custom queue just for handling the administration of RT.
I wanted the rt admin queue to be monitored for new tickets by all the users in my "RT Administrators" group, so I added that group as AdminCc watchers. I chose AdminCc because one of the default scrips that ships with RT sends an email to the AdminCc users upon creation of a new ticket.
Mail Gateway SetupFinishing my very basic RT web setup meant that I was ready to add in the mail gateway portion. This required that mail be deliverable to the machine. Since sendmail is already installed by default on the Solaris 9 Operating System, I went with that as my MTA. I started up the daemon so that it accepted local and remote connections, and I added two aliases to the /etc/mail/aliases file and ran newaliases:
rt-admin: "|/usr/local/rt3/bin/rt-mailgate \
--queue 'rt admin' --action correspond \
--url https://rt.your.domain/"
rt-admin-comment: "/usr/local/rt3/bin/rt-mailgate \
--queue 'rt admin' \
--action comment \
--url https://rt.your.domain/"
Both of these aliases pipe the mail to the perl script rt-mailgate. Extra documentation on this program is available by reading the source or via
perldoc:
perldoc /usr/local/rt3/bin/rt-mailgateThe first alias tells RT that the mail applies to the queue rt admin and that the action is correspond. This means that the scrips that apply to correspond for the queue rt admin will be triggered by an incoming message. By default, these scrips are:
Since I used a space in my queue name when I created it, I need to put single quotes around it in the aliases file. If I had named the queue rt-admin instead, I wouldn't need the quotes. Ticket CreationAt this point, RT was installed, configured, and set up with a new user, group, and queue. I was ready to create a few test tickets just to make sure everything was working ok. First, I made a new ticket via the web interface.
This created the ticket in the rt admin queue and brought up the ticket display page. On the left hand menu bar, there were a number of other choices under the ticket number. When I clicked Home again, it showed a ticket listed under 10 highest priority tickets I own... and 10 highest priority tickets I requested.... It also showed a ticket under the New column of the rt admin queue off to the right. With the web interface working fine, I tested the email interface by sending an email to rt-admin@rt.your.domain. When I refreshed the Home view, I saw another ticket waiting in the rt admin queue, just as expected. My install was completely functional. Pre-Installation PlanningNow that I've covered installing and configuring RT, I'll offer a few words about pre-configuration preparation. Before configuring RT, invest some care and forethought in planning the layout and deciding how RT will work for a site. The organization of groups, queues, and permissions often determines the effectiveness of a ticketing system. A haphazard installation that operates against the work flow of the organization ends up causing problems. When creating queues and groups, consider how people and systems work together.If one queue exists for mail systems and one exists for backups, where does a ticket about backups causing load and failure on the mail systems belong? Who should be dealing with the problem? Is the site small enough that these two queues should actually be one, or do two different teams of people handle backups and general system health? If two different teams exist, were they granted permission to view each other's queues? If the teams don't communicate well, sometimes two tickets about the same issue are opened in different queues. Also carefully consider which users should have rights on which queues. While sysadmins might need full rights on various queues, helpdesk staff or frontline support people might only need minimal access, i.e., to see but not modify tickets. When creating groups and watchers, determine whether it makes sense to copy the entire staff on each ticket update, or to copy only the owner and requestor. Custom scrips and templates can help streamline the automation such that the necessary people see all or only selected ticket actions. Having Trouble?Be sure to read through the README, HOWTO, and doc files that come with the RT tar ball. Some documentation and the current list of known bugs is available on the RT web site. There's also a hacker's guide that deals primarily with RT 2 that may be of some use.Additionally, there are four mailing lists about RT and their archives. Direct questions about installing or configuring RT belong to the rt-users mailing list, while any RT development questions and discussions belong on the rt-devel mailing list. For those sites that need or prefer to pay for a support contract, Best Practical Solutions, LLC offers four levels of service. In addition, the company also offers installation support and custom development services. Resources
Unless otherwise licensed, code in all technical manuals herein (including articles, FAQs, samples) is provided under this License. |
BigAdmin SubscriptionsBigAdmin Areas
BigAdmin Sun Center
BigAdmin Topics |