0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

DockerでJiraとConfluenceを立てる

Last updated at Posted at 2019-10-28

概要

  • JiraとConfluenceを自前サーバで立てる
  • Install & 環境構築を楽する為にDockerを使う

環境

  • 自前サーバは何でも良いが、とりあえず今回はMacOS上のVirtualBox/Vagrantで用意
  • VMのOSはUbuntu18.04を使用(dockerのinstall部分は、他OSの場合、手順が異なるので注意)

手順

Vagrantfileを作成する

bash
# vagrantfileを置くdirectoryを作成
iguchi@igc-mbp:~$ mkdir -p my-vagrant/jira-confluence-study

# vagrantfileを生成
iguchi@igc-mbp:~/my-vagrant/jira-confluence-study$ vagrant init bento/ubuntu-18.04

VMのNetworkとMemoryを設定する(Vagrantfileに書く)

bash
iguchi@igc-mbp:~/my-vagrant/jira-confluence-study$ vi Vagrantfile
...(omit)...
# 以下をコメントイン。IP addressは適宜変える。今回はdefaultのまま
  config.vm.network "private_network", ip: "192.168.33.10"
...(omit)...
# 以下のあたりをコメントイン。Vagrantfileでvmに割当てるmemory sizeを増やしておく
# 理由:jiraとconfluenceを一つのVM内で動かすにはdefaultの1024はmemory不足
  config.vm.provider "virtualbox" do |vb|
    # Display the VirtualBox GUI when booting the machine
    # vb.gui = true

    # Customize the amount of memory on the VM:
    vb.memory = "2048"
  end
...(omit)...

VMを起動する

bash
iguchi@igc-mbp:~/my-vagrant/jira-confluence-study$ vagrant up

起動したVMにssh接続する

bash
iguchi@igc-mbp:~/my-vagrant/jira-confluence-study$ vagrant ssh

VMにDockerをinstallする

bash

vagrant@vagrant:~$ sudo apt update
vagrant@vagrant:~$ sudo apt-get remove docker docker-engine docker.io containerd runc
vagrant@vagrant:~$ sudo apt update
vagrant@vagrant:~$ sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg-agent \
    software-properties-common
vagrant@vagrant:~$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
vagrant@vagrant:~$ sudo add-apt-repository \
   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
   $(lsb_release -cs) \
   stable"
vagrant@vagrant:~$ sudo apt update
vagrant@vagrant:~$ sudo apt-get install docker-ce docker-ce-cli containerd.io
vagrant@vagrant:~$ sudo groupadd docker
groupadd: group 'docker' already exists
vagrant@vagrant:~$ sudo usermod -aG docker $USER
vagrant@vagrant:~$ newgrp docker

Dockerを使ってJIRAをinstallする

bash
# jiraの永続データを保存するvolumeを作成
vagrant@vagrant:~$ docker volume create --name jiraVolume
# jiraのコンテナを起動
vagrant@vagrant:~$ docker run -v jiraVolume:/var/atlassian/application-data/jira --name="jira" -d -p 8080:8080 atlassian/jira-software

httpでJiraにアクセスし、GUIの指示に従って設定

Dockerを使ってConfluenceをinstallする

bash
# confluenceの永続データを保存するvolumeを作成
vagrant@vagrant:~$ docker volume create --name confluenceVolume
# confluenceのコンテナを起動
vagrant@vagrant:~$ docker run -v confluenceVolume:/var/atlassian/application-data/confluence --name="confluence" -d -p 8090:8090 -p 8091:8091 atlassian/confluence-server

httpでConfluenceにアクセスし、GUIの指示に従って設定

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?