Skip to content

Queky/docker-jira-for-testing

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Docker-jira-for-testing (WIP)


Script that provides a one-off command to locally run any Atlassian Jira version using an Oracle JRE on a Docker container.

It's purpose is just for quickly spin up any standalone version of Jira to perform tests on it.

⚠️Important! This is not intended to be used in a production system.

Requirements

The only requirement is to have Docker installed.

Adjusting the available RAM for the Docker engine to at least 4GB is also required. You can find the settings in Docker -> Preferences -> Advanced.

Usage

./scripts/run-jira-container.sh [x.y.z]

x.y.z is an optional parameter with the Jira version number you want to run.

Otherwise the default version that appears on the .env file will be used.

Jira instance will be listening on http://localhost:9080/jira

Additional settings

./scripts/run-jira-container.sh [x.y.z] [ENV=VALUE ENV2=VALUE]

JAVA Jdk-Version

You can choose with version of java is going to be installed in container. To use this feature, you need to set JAVA_VERSION variable when runing the container.

Java version should be in the format vendor@version, as used in JABBA. If no JAVA_VERSION is set, by default, version to be installed is: sjre@1.8 (Oracle 1.8)

For example , to run a container with confluece 5.4.4 (which need java 7) and the zulu 1.7.95 version (wigch is supportorted by JABBA):

./scripts/run-jira-container.sh 5.4.4 JAVA_VERSION=zulu@1.7.95

You can check available vendor/version

https://github.com/shyiko/jabba/blob/master/index.json

Debugging port

By default debugging port from host is 5006 but you can customise

DEBUG_PORT=5006

Change container localization and timezone

TZ=America/Los_Angeles
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
LANGUAGE=en_US.UTF-8

Runtime Environment Setup

Several other services are started up along with the Jira instance to customize your setup:

Database

Instead of using the embedded H2 DB, you can configure your Jira instance to use a proper DB engine. In fact this is really advisable if you want to run a Jira version >= 6.x and use collaborative editing.

At the moment only PostgreSQL is available but we plan to support other DB engines in the future.

PostgreSQL

By default a container named "postgres" is up using version 9.6, which seems to be the minimum version to run collaborative editing service "Synchrony" without issues.

Details

  • Container name and hostname: postgres
  • DB name: jira
  • DB username: postgres
  • DB password: postgres
  • JDBC connection URL: jdbc:postgresql://postgres:5432/jira

Changing version

You can change the default PostgreSQL version (9.6) by adding the environment variable POSTGRESQL_VERSION. Eg:

./scripts/run-jira-container.sh 6.15.1 POSTGRESQL_VERSION=10.2

You can use any of the versions available in the official PostgreSQL Docker repository

⚠️Important! Versions earlier that 9.6 present problems with Collaborative Editing feature.

DB recommended version

Jira Version PostgreSQL version
5.8.x - 5.10.x 9.5
6.0.x - ... 9.6

External user directory

Most companies use an external directory services to manage users authentication and authorization. To test that scenario I have forked and customized a Docker image with OpenLDAP in this repository, so it can be used out of the box for that purpose.

A container using this image will be run along with Jira and available if needed.

That repo contains also the setting to configure it inside Jira.

Troubleshooting

After setting up Jira everything is slow

This might be due to the synchrony server (collaborative editing) failing to start up correctly. You can disable synchrony via REST API using the following GET request:

http://localhost:9080/jira/rest/synchrony-interop/disable?os_username=admin&os_password=admin

Also makes sure that in the Advanced Docker preferences the amount of RAM available for the Docker engine is at least 4GB.

About

Script to run any Atlassian Jira version using Docker

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 52.3%
  • Dockerfile 47.7%