Jira Manully Install

Launch Jira container

1
docker run --name jira1 -p 8181:8181 -it --entrypoint bash docker.example.com/jira:0.0.1-SNAPSHOT

Install MySQL

1
2
mkdir /var/lib/mysql
installMysql.sh

Start MySQL

1
/etc/init.d/mysql bootstrap-pxc

Test MySQL

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# mysql
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.6.26-74.0-56 Percona XtraDB Cluster (GPL), Release rel74.0, Revision 624ef81, WSREP version 25.12, wsrep_25.12

Copyright (c) 2009-2015 Percona LLC and/or its affiliates
Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

mysql>

Install MySQL driver

1
cp mysql-connector-java-5.1.36-bin.jar /opt/jira/lib

Install Jira in unattended mode

1
2
3
4
5
6
7
8
9
10
11
12
13
root@fa463adbc926:/opt/jira# cat .install4j/response.varfile
#install4j response file for JIRA 6.4.10
#Thu May 26 09:51:12 CST 2016
rmiPort$Long=8005
app.jiraHome=/var/atlassian/application-data/jira
app.install.service$Boolean=true
existingInstallationDir=/usr/local/JIRA
sys.confirmedUpdateInstallationString=false
sys.languageId=en
sys.installationDir=/opt/jira
executeLauncherAction$Boolean=true
httpPort$Long=8181
portChoice=custom

Attendtion, what jira.py does are:

  1. map local directory to container
  2. install mysql
  3. create database and other sql operation in mysql
1
2
3
4
5
6
7
8
9
Yaml file runs every time the container starts if using dockerStart.py as the entrypoint or cmd.

Jira.py runs before the container starts.

Jira.py can also run the container with a different command. This is how it can configure the database.

The container is run with a command to installmysql. This creates files that arw mapped to the host. That container exits and a new container runs jira.

Take a look at mysql.py. its doing similar things.

Note

Add backup.yaml to *.sh

docker save docker.example.com/jira:0.0.1-SNAPSHOT | ssh -C gavinwei@dind1.docker.example.com “docker load”

文章目录
  1. 1. Launch Jira container
  2. 2. Install MySQL
  3. 3. Start MySQL
  4. 4. Test MySQL
  5. 5. Install MySQL driver
  6. 6. Install Jira in unattended mode
  • Attendtion, what jira.py does are:
  • Note
    1. 1. Add backup.yaml to *.sh