Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,459,219
Community Members
 
Community Events
176
Community Groups

Deploy 2 data center nodes of Jira in docker

Hello!

In this article I will show you how you can deploy 2 data center nodes of Jira Software in your local environments using the docker image provided by Atlassian.

This deployment will not include the load balancer because I need these nodes for app development to check if my app works properly in Data Center environment. That is why I always connect to a certain node.

First, you need to create this docker-compose.yml file:

version: '3'

services:
jira_node_1:
depends_on:
- postgresql
image: atlassian/jira-software:latest
networks:
- jiranet
volumes:
- /Users/alexm/projects/prometheus/shared:/var/atlassian/application-data/jira/shared
ports:
- '8080:8080'
- '8000:8000'
environment:
- 'ATL_JDBC_URL=jdbc:postgresql://postgresql:5432/jiradb'
- 'ATL_JDBC_USER=jira'
- 'ATL_JDBC_PASSWORD=jellyfish'
- 'ATL_DB_DRIVER=org.postgresql.Driver'
- 'ATL_DB_TYPE=postgres72'
- 'JVM_MINIMUM_MEMORY=2048m'
- 'JVM_MAXIMUM_MEMORY=4096m'
- 'JVM_SUPPORT_RECOMMENDED_ARGS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000"'
- 'CLUSTERED=true'
- 'JIRA_NODE_ID=node_1'
logging:
# limit logs retained on host to 25MB
driver: "json-file"
options:
max-size: "500k"
max-file: "50"

jira_node_2:
depends_on:
- postgresql
image: atlassian/jira-software:latest
networks:
- jiranet
volumes:
- /Users/alexm/projects/prometheus/shared:/var/atlassian/application-data/jira/shared
ports:
- '8081:8080'
- '8001:8000'
environment:
- 'ATL_JDBC_URL=jdbc:postgresql://postgresql:5432/jiradb'
- 'ATL_JDBC_USER=jira'
- 'ATL_JDBC_PASSWORD=jellyfish'
- 'ATL_DB_DRIVER=org.postgresql.Driver'
- 'ATL_DB_TYPE=postgres72'
- 'JVM_MINIMUM_MEMORY=2048m'
- 'JVM_MAXIMUM_MEMORY=4096m'
- 'JVM_SUPPORT_RECOMMENDED_ARGS="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:8000"'
- 'CLUSTERED=true'
- 'JIRA_NODE_ID=node_2'
logging:
# limit logs retained on host to 25MB
driver: "json-file"
options:
max-size: "500k"
max-file: "50"

postgresql:
image: postgres:9.5-alpine
networks:
- jiranet
volumes:
- postgresqldata:/var/lib/postgresql/data
ports:
- '5432:5432'
environment:
- 'POSTGRES_USER=jira'
# CHANGE THE PASSWORD!
- 'POSTGRES_PASSWORD=jellyfish'
- 'POSTGRES_DB=jiradb'
- 'POSTGRES_ENCODING=UNICODE'
- 'POSTGRES_COLLATE=C'
- 'POSTGRES_COLLATE_TYPE=C'
logging:
# limit logs retained on host to 25MB
driver: "json-file"
options:
max-size: "500k"
max-file: "50"

volumes:
postgresqldata:
external: false

networks:
jiranet:
driver: bridge

Change '/Users/alexm/projects/prometheus/shared' to the folder path where all shared data for your nodes should be placed.

Move to the folder where you created the file and run it with this command:

docker-compose up

As a result you will have two Jira Software nodes up. Node_1 will be running on port 8080 and Node_2 will be running on port 8081.

Also you will be able to connect with a debug session to the nodes using ports 8000 for node_1 and 8001 for node_2.

If you have problem with including the second node to the cluster just restart the container with the second node.

4 comments

Vikrant Yadav Community Leader Jan 13, 2022

Thanks a lot! for sharing such useful information. 

Pramodh M Community Leader Jan 13, 2022

Fun with Docker!!

Going to bookmark this one for sure 😃

Thanks @Alexey Matveev _Appfire_  for sharing this in Community 🙂

Hi, in this way we'll have 2 nodes on the same server anyhow.

What about 2 instances on docker but on separate servers? Is that possible?

Thanks for the wonderful peace of knowledge share @Alexey Matveev _Appfire_
This is really helpful.

Comment

Log in or Sign up to comment
TAGS

Atlassian Community Events