You are on page 1of 8

12.1.

JIRA
JIRA is a bug tracking, issue tracking, and project management application.

12.1.1. Resources

Download JIRA and plugins. Upgrade checklist: o Related products: -. o References: -. o Integration configuration changes: HTTP Binding, MySQL - Connector/J DataSource, Properties - JIRA Home, Global Settings - Look and Feel, Apache Configuration - Context - AJP Connectorand Windows Service - Catalina Home. JIRA Documentation, Important Directories and Files and User's Guide. FishEye integration with the FishEye plugin to view Issue and Project changesets.

12.1.2. JIRA installation guide


Download the archive: atlassian-jira-4.3.4.zip [version 4.3.4]. Extract this .zip file to P:\dev\apps\issue.

Important
As of JIRA 4.3 'in-place database upgrades' is officially supported.

12.1.2.1. HTTP Binding


Change the listening ports and and restricted to localhost by editing the configuration file P:\dev\apps\issue\atlassian-jira-4.3.4-standalone\conf\server.xml:

<Server port="80058062 " address="127.0.0.1" ... <Service name="Catalina"> <Connector port="80808063

shutdown="SHUTDOWN">

" address="127.0.0.1"

12.1.2.2. Database settings


Create a MySQL user called jira-user and database called jira with the following commands:

mysql -u root -p mysql> create database jira character set utf8; mysql> grant select, insert, update, delete, create, drop, alter, index on jira.* -> to 'jira-user'@'localhost' identified by 'password'; mysql> mysql> mysql> mysql> flush privileges; select host,user from mysql.user; select host,db,user from mysql.db; quit

Download the Connector/J and add the driver mysql-connector-java-5.1.16-bin.jar from the archive mysql-connector-java-5.1.16.zip to the JIRA classpath by copying it intoP:\dev\apps\issue\atlassian-jira-4.3.4-standalone\lib. Remove the one that is already there: mysql-connector-java-5.1.10.jar [version 5.1.16]. Configure the JIRA application server to connect to MySQL with url jdbc:mysql://localhost/jira? autoReconnect=true&amp;useUnicode=true&amp;characterEncoding=UTF8 by editing the configuration fileP:\dev\apps\issue\atlassian-jira-4.3.4-standalone\conf\server.xml:

<Engine name="Catalina" defaultHost="localhost"> <Host name="localhost" appBase="webapps" ...> <Context path="" docBase="${catalina.home}/atlassian-jira" ...> <Resource name="jdbc/JiraDS" auth="Container" type="javax.sql.DataSource" username="jira-user password="password " " " (see above)"

driverClassName="com.mysql.jdbc.Driver url="jdbc:mysql://localhost/jira?... minEvictableIdleTimeMillis="4000" timeBetweenEvictionRunsMillis="5000" maxActive="20" validationQuery="select 1"

/>

Configure the JIRA entity engine to use MySQL and remove the schema-name by editing the configuration file P:\dev\apps\issue\atlassian-jira-4.3.4-standalone\atlassian-jira\WEBINF\classes\entityengine.xml:

<datasource name="defaultDS" field-type-name="hsqlmysql schema-name="PUBLIC" helper-class="org.ofbiz.core.entity.GenericHelperDAO" check-on-start="true" ... </datasource> </entity-config>

"

12.1.3. JIRA configuration


Edit the data directory by changing the following property in the P:\dev\apps\issue\atlassian-jira4.3.4-standalone\atlassian-jira\WEB-INF\classes\jira-application.properties file:

# The jira.home configuration must be set and specifies the directory in which JIRA will store its data files. # This must be set to an absolute path. Relative paths are not allowed. # Ensure that only one JIRA instance uses the selected JIRA Home. # jira.home = P:/dev/data/issue/jira

Note
It is possible to overwrite this value with JIRA_HOME (see also Section 12.1.5, Windows service).

Verify the installation by changing to cd P:\dev\apps\issue\atlassian-jira-4.3.4-standalone and running bin\startup.bat. Verify that the server is running in your browser at http://localhost:8063. This SID is required to retrieve a new license from my.atlassian.com.

12.1.3.1. Required settings


You should see the JIRA setup wizard:

1.

Application properties: o Application Title: dev.net JIRA.

2.

o o o o

Mode: Private. Base URL: http://dev.net/jira. Automated Backups: Disable Automated Backups. License Key: ... and click Next.

Administrator account: o Username: admin. o Password: password.

3.

o o o

Confirm: password. Fullname: JIRA Administrator. Email: jira.admin@company.org and click Next.

Email Notification: o Name: JIRA SMTP Server.

o o o o o o

From address: jira.noreply@company.org. Email prefix: [JIRA]. Host Name: mail.dev.net. SMTP Port: 25. Username: leave empty. Password: leave empty and click Finish.

You should now be required to login at http://localhost:8063 and do some Administration.

12.1.3.2. System
System menu:

Indexing. License Details. Plugins. 12.1.3.3. User, groups & roles


User, Groups & Roles menu:

Group Browser in Add Group form: o Name: jira-system-administrators and click Add Group.

For jira-system-administrators select Edit Members:

o o

Under Add members to selected group(s) select user for group by clicking Check admin and click Select.

o Next click << Join. In User Browser select Add User: o Username: jjasper. o Password: password. o Confirm: password. o Full Name: Jene Jasper. o Email: jjasper@company.org and click Create and Edit Groups: In Available Groups select jira-system-administrators / jiraadministrators / jira-developers and click Join >> and << Return to viewing user 'Jene Jasper'.

12.1.3.4. Global settings


Global Settings menu:

Global permissions in Add Permission form: o Permission: JIRA System Administrators.

Group: jira-system-administrators and click Add.

In JIRA Permissions form: For JIRA System Administrators select delete the jira-administrators and confirm Delete. Edit General configuration: o Allow unassigned issues: On. o Accept remote API calls: On (for Eclipse Mylyn plugin support) and click Update.

Note
When using Mylyn and Submit failed in Eclipse with following error message JIRA could not complete this action due to a missing form token. disable Form Token Checking by changing the following property
# # # # # # # # #

in the P:\dev\apps\issue\atlassianjira-4.3.4-standalone\atlassian-jira\WEB-INF\classes\jira-application.properties file:


These settings control how JIRA applies XSRF security token protection. See http://en.wikipedia.org/wiki/Cross-site_request_forgery This controls whether the XSRF protection is enabled at all. It is ON by default in JIRA and only here as an example. We do not recommend that you every turn this off.

jira.xsrf.enabled=false

Edit Configuration of Attachments: o Attachment Path: Use Default Directory and click Update. Edit default values in User Defaults: o Default outgoing email format: html. o Notify users of their own changes: No and click Update. And Apply the email format setting. Activate Issue Linking. Enable Sub-Tasks.

Activate Time Tracking.

Edit Configuration of Look and Feel: o Time Format: HH:mm. o Day Format: EEEE HH:mm.

o o

Complete Date/Time Format: yyyy-MM-dd HH:mm. Day/Month/Year Format: yyyy-MM-dd and click Update.

Edit the Date Picker Format by changing the following properties in the P:\dev\apps\issue\atlassian-jira-4.3.4-standalone\atlassian-jira\WEB-INF\classes\jiraapplication.properties file:

# # # # # ...

These two properties need to match for the datepicker to perform correctly The first date is in Java format (http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html). The second in unix format (see the FORMAT section of http://unixhelp.ed.ac.uk/CGI/man-cgi?date)

jira.date.picker.java.format = d/MMM/yyyyyy-MM-dd jira.date.picker.javascript.format = %e/%b/%y%Y-%m-%d ... jira.date.time.picker.java.format = dd/MMM/yy hh:mm ayyyy-MM-dd HH:mm jira.date.time.picker.javascript.format = %e/%b/%y %I:%M %p%Y-%m-%d %H:%M ... jira.date.time.picker.use.iso8061 = falsetrue

Restart JIRA for these property changes to take effect. In System Dashboard select Add Gadget such as FishEye Charts: o FishEye URL: http://dev.net/fisheye/. o Repository: svn. o Path: /. o Chart Type: Line. o Stack Type: File Extension. o Refresh Interval: Every 1 Hour.

12.1.3.5. Project
Project menu:

In Projects select Add Project: o Name: Development Production Line. o Key: DPL. o Project Lead: jjasper. o Default Assignee: Unassigned. o Description: DocBook about setting up a Production Development Line.. o Notification Scheme: None. o Permission Scheme: Default Permission Scheme. o Issue Security Scheme: None and click Add. After that add a new component:

Name: manual with Description: The Short Story. and Component Lead: jjasper.

And Manage versions with for example: 1.0.0.RC1, ..., 1.0.0.RC10, 1.0.0, 1.0.1.RC1, 1.0.1 as required affects versions. These will also be used as fix versions for milestone versions.

12.1.3.6. FishEye integration


In System FishEye Configuration select Setup FishEye:

FishEye URL: http://dev.net/fisheye/. API URL: leave empty. FishEye Username: leave empty. FishEye Password: leave empty. HTTP Auth Username: jira (see also Section 7.1.4.1, Authentication, authorization and access

control).
HTTP Auth Password: password. Character Set: UTF-8. Enable Crucible Integration: Yes.

Wiki Rendering: On and click Update. 12.1.3.6.1. FishEye plugin upgrade

Optionally download a higher version of the FishEye plugin and add the archive jira-fisheye-plugin3.1.5.jar to JIRA by copying it into P:\dev\data\issue\jira\plugins\installed-plugins. Remove the older prepackage version P:\dev\data\issue\jira\plugins\.bundled-plugins\jira-fisheyeplugin-3.1.5.jar.

12.1.4. Apache configuration


Configure the JIRA application server to accept an ajp connection on web context /jira by editing the configuration file P:\dev\apps\issue\atlassian-jira-4.3.4-standalone\conf\server.xml:

<Server port="8062" address="127.0.0.1" shutdown="SHUTDOWN"> <Service name="Catalina"> ... <Engine name="Catalina" defaultHost="localhost"> <Host name="localhost" appBase="webapps" ...> <Context path="/jira " docBase="${catalina.home}/atlassian-jira" ...> ... <!-- To connect to an external web server (typically Apache) --> <!-- Define an AJP 1.3 Connector on port 8009 --> <!-<Connector port="80098064 " address="127.0.0.1" enableLookups="false" redirectPort="8443" protocol="AJP/1.3" /> --> </Service> ... </Server>

Instruct Apache to proxy all URLs whose path portions begin with /jira/ using the following P:\dev\apps\httpserver\apache-conf\httpd-vhosts.conf include :

<VirtualHost *:80> ... <IfModule proxy_module> <IfModule proxy_http_module> ... <Proxy *> ... </Proxy> # JIRA Include ../apache-conf/httpd-jira.conf </IfModule> </IfModule> </VirtualHost>

with the following content in P:\dev\apps\httpserver\apache-conf\httpd-jira.conf:

<IfModule proxy_module> <IfModule proxy_http_module> #<IfModule proxy_ajp_module> <Location /jira> Include ../apache-conf/httpd-realm.conf </Location> ProxyPass /jira http://localhost:8063/jira ProxyPassReverse /jira http://localhost:8063/jira # ProxyPass /jira ajp://localhost:8064/jira # ProxyPassReverse /jira ajp://localhost:8064/jira #</IfModule> </IfModule> </IfModule>

When JIRA and the Apache HTTP Server are restarted you should be able to browse JIRA at http://dev.net/jira.

Tip
If the browser displays a 401 HTTP error then the Apache HTTP Server logged-in user doesn't exist in JIRA or the password doesn't match.

12.1.5. Windows service


To restart automatically on Microsoft Windows create a service configuration file jiraService.xml in P:\dev\apps\windows\services:

<service> <id>jira</id> <name>dev.net JIRA</name> <description>JIRA - Issue tracking and project management.</description> <env name="JIRA_HOME" value="P:\dev\data\issue\jira" /> <env name="CATALINA_HOME" value="P:\dev\apps\issue\atlassian-jira-4.3.4-standalone" /> <env name="CATALINA_OPTS" value="-Xrs" /> <executable>%CATALINA_HOME%\bin\catalina.bat</executable> <logpath>P:\dev\logs\windows\services</logpath> <logmode>roll</logmode> <startargument>run</startargument> <stopargument>stop</stopargument> <!--beeponshutdown/--> <!--waithint>20000</waithint--> <!--sleeptime>1000</sleeptime--> </service>

Get a copy of the latest binary of winsw, rename it to jiraService.exe and place it next to the jiraService.xml in P:\dev\apps\windows\services. Install the service with jiraService install. Start it with jiraService start or sc start jira (for more information see Section 1.1.11.2, Service Wrapper and optionally create the environment variableSERVICES_HOME).

Important
Add -Xrs to prevent JVM termination on CTRL_LOGOFF_EVENT. Otherwise JIRA will terminate on logoff.

PreviousChapter 11. Database Top of page Front page NextChapter 13. Repository Manager

You might also like