请选择 进入手机版 | 继续访问电脑版
  • 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

jira: Atlassian Software in Kubernetes (ASK) - Jira

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称:

jira

开源软件地址:

https://gitee.com/zxy/jira

开源软件介绍:

Atlassian Software in Kubernetes (ASK) - Jira

This respository is a component of ASK Atlassian Software in Kubernetes ; and holds program-code to create Docker image for Jira Software (not Jira Core).

Although the title says "Atlassian Software in Kubernetes", the container image can be run on plain Docker/Docker-Compose/Docker-Swarm, etc.

This image can be used to run a single / stand-alone instance of Jira Software or a clustered setup known as Jira DataCenter. You simply need to enable certain environment variables to get that done.

The source-code in this repository is released under MIT License, but the actual docker container images (binaries) built by it are not. You are free to use this source-code to build your own Jira docker images and host them whereever you want. Please remember to consider various Atlassian and Oracle related lincense limitations when doing so.

Main features

  • Uses Fedora 29 as base image.
  • Uses Atlassian Confluence binary installer, which comes with built-in Oracle JDK - Adopt JDK/JRE in the newer installers.
  • Exposes port 8080
  • Supports data center mode and self signed certs.
  • Can be setup behind a reverse proxy by setting up certain proxy related environment variables as mentioned below.

Usage

Build:

First, you need to build the container image

docker build -t local/jira:version-tag .

Usage:

In it's simplest form, this image can be used by executing:

$ docker run -p 8080:8080 -d local/jira:version-tagdocker psCONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS              PORTS                    NAMES2585785edf49        local/jira          "/opt/atlassian/jira/"   3 seconds ago       Up 2 seconds        0.0.0.0:8080->8080/tcp   stupefied_wing

If you want to set it up behind a reverse proxy, use the following command:

$ docker run  \  -e X_PROXY_NAME=<<YOUR_PROXY_NAME>> \  -e X_PROXY_PORT=<<YOUR_PROXY_PORT>> \  -e X_PROXY_SCHEME=<<YOUR_PROXY_SCHEME>> \  -e X_CONTEXT_PATH=<<YOUR_X_CONTEXT_PATH>> \  -e .... other variables ... \  -p 8080:8080  \  -d local/jira:version-tag

Note: When setting up Jira behind a (GCE/AWS/other) proxy/load balancer, make sure to setup proxy/load-balancer timeouts to large values such as 300 secs or more. (The default is set to 60 secs). It is very important to setup these timeouts, as Jira (and other atlassian software) can take significant time setting up initial database. Smaller timeouts will panic Jira setup process and it will terminate.

If you run without providing any exisiting database, JIRA will run and will present you with the web-setup wizard:

docker run \  -p 8080:8080  \  -d local/jira:version-tag

If you want to use a different JIRA version, then simply change the version number in the Dockerfile, and rebuild the image.

Certificates

Supply additional certificates from a single mounted directory.

docker run \    --detach \    --name container-name \    --publish 8080:8080 \    --volume /path/to/certificates:/var/atlassian/ssl \    --volume /path/to/jira-plugins.list:/tmp/jira-plugins.list \    local/image:tag

See SSL_CERTS_PATH ENV variable in Dockerfile.

Similar output should be shown by docker logs container-name.

Importing certificate: /var/atlassian/ssl/eastwind.crt ...Certificate was added to keystoreImporting certificate: /var/atlassian/ssl/northwind.crt ...Certificate was added to keystoreImporting certificate: /var/atlassian/ssl/southwind.pem ...Certificate was added to keystoreImporting certificate: /var/atlassian/ssl/westwind.pem ...Certificate was added to keystore

User provided plugins:

If you want to add plugins of your choice, you can list their IDs in jira-plugins.list file , one plugin at each line. You can volume-mount this file inside JIRA_INSTALL - as JIRA_INSTALL/jira-plugins.list . The docker-entrypoint.sh script will process this file and install the plugins. You can customize the location of this file in Dockerfile by setting the PLUGINS_FILE environment var to that location.

docker run \  -p 8080:8080  \  -v ${PWD}/jira-plugins.list:/tmp/jira-plugins.list \  -d local/jira:version-tag

Environment variables

The following environment variables can be set when building your docker image.

Env nameDescriptionDefaults
JIRA_VERSIONThe version number which is part of the name of the jira software bin/tarball/zip.8.1.0
DATACENTER_MODEThis needs to be set to 'true' if you want to setup Jira in a data-center mode. Need different lincense for thisfalse
JIRA_DATACENTER_SHAREIt needs to be a shared location, which multiple jira instances can write to. This location will most probably be an NFS share, and should exist on the file system. If it does not exist, then it will be created and chown to the jira OS user. NB: For this to work, DATACENTER_MODE should be set to true./var/atlassian/jira-datacenter
TZ_FILETimezone. Set the path of the correct zone you want to use for your container. Can be set at runtime as well/usr/share/zoneinfo/Europe/Oslo
OS_USERNAMEJira bin-installer automatically creates a 'jira' user and a 'jira' group. Just specify what it's name is.jira
OS_GROUPNAMEJira bin-installer automatically creates a 'jira' user and a 'jira' group. Just specify what it's name is.jira
JIRA_HOMEThis is where run-time data will be saved. It needs persistent storage. This can be mounted on mount-point inside container. It needs to be owned by the same UID as of user jira, normally UID 1000. The value if this variable should be same as 'app.jiraHome' in the jira-response.varfile file./var/atlassian/application-data/jira
JIRA_INSTALLThis is where Jira software will be installed. Persistent storage is NOT needed. The value if this variable should be same as 'sys.installationDir' in the jira-response.varfile file./opt/atlassian/jira
JAVA_OPTSOptional values you want to pass as JAVA_OPTS. You can pass Java memory parameters to this variable, but in newer versionso of Atlassian software, memory settings are done in CATALINA_OPTS.
CATLINA_OPTSCATALINA_OPTS will be used by CONFLUENCE_INSTALL/bin/setenv.sh script . You can use this to setup internationalization options, and also any Java memory settings. It is a good idea to use same value for -Xms and -Xmx to avoid frequence shrinking and expanding of Java memory. e.g. CATALINA_OPTS "-Dfile.encoding=UTF-8 -Xms1024m -Xmx1024m" . The memory values should always be half (or less) of physical RAM of the server/node/pod/container.CATALINA_OPTS "-Dfile.encoding=UTF-8 -Xms1024m -Xmx1024m"
X_PROXY_NAMEThe FQDN used by anyone accessing jira from outside (i.e. The FQDN of the proxy server/ingress controller)jira.example.com
X_PROXY_PORTThe public facing port, not the jira container port443
X_PROXY_SCHEMEThe scheme used by the public facing proxy - normally https.https
X_CONTEXT_PATHThe context path, if any. Best to leave blank. (This was formerly X_PATH. )

Linter

You can use a linter that analyze source code to flag programming errors, bugs, stylistic errors, and suspicious constructs. There is dockerlinter , which does this quite easily.

Installation

$ sudo npm install -g dockerlint

Usage:

dockerlint Dockerfile

Above command will parse the file and notify you about any actual errors (such an omitted tag when : is set), and warn you about common pitfalls or bad idiom such as the common use case of ADD. In order to treat warnings as errors, use the -p flag.


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap