Developer's Guide > Developer's Guide > Codebeamer Architecture > Cluster Architecture > How to Setup Cluster with Docker Compose
How to Setup Cluster with Docker Compose
Infrastructure Diagram
Hostname of the EC2s are:
ip-172-31-6-71.eu-central-1.compute.internal - Codebeamer.
ip-172-31-0-235.eu-central-1.compute.internal - Codebeamer.
ip-172-31-14-188.eu-central-1.compute.internal - MySQL.
Docker config
docker-compose.yml
# Copyright by Intland Software, https://www.intland.com

#

# All rights reserved.

#

# Please note that if you change this docker file, we do not take any responsibility and we are not liable for

# any damage caused through use of this image, be it indirect, special, incidental

# or consequential damages (including but not limited to damages for loss of business, loss of profits, interruption or the like).





version: '2.1'





services:

codebeamer-app:

image: intland/codebeamer-git:21.09-SP6

ports:

- 8080:8080

- 4001:4001

- 4002:4002

- 9000:9000

hostname: ip-172-31-6-71.eu-central-1.compute.internal

environment:

- DEBUG=false

- CB_CLUSTER_ENABLED=true

- CB_ping_testingEnabled=true



# RMI - Common

- CB_RMI_CACHE_HOSTNAME=<HOSTNAME>

- CB_RMI_REPLICATION_CACHE_PORT=4001

- CB_RMI_INVALIDATION_CACHE_PORT=4002

- CB_RMI_CACHE_SOCKET_TIMEOUT_MILLIS=12000

- CB_RMI_CACHE_REMOTE_OBJECT_PORT=9000



# RMI - Manual

- CB_RMI_CACHE_INSTANCES=<CLUSTER_HOSTNAMES>



# RMI - Discovery

## New configuration - TTL of living RMI cache node, if no update from the node after 10 seconds, codebeamer will remove this node from the cache synchronization

- CB_RMI_CACHE_TIME_TO_LIVE=10s

## New configuration - Frequently of RMI node's hearth beat

- CB_RMI_HEARTH_BEAT_INTERVAL=1s



- CB_notification_enableWebsocket=true

- CB_DOCKER_LOGGING=true

- TZ=Europe/Berlin

- WAIT_HOSTS=ip-172-31-14-188.eu-central-1.compute.internal:3306

- WAIT_HOSTS_TIMEOUT=120

- CB_DOCS_SIZE_CALCULATION=false

- "JVM_OPTIONS=-Djava.rmi.server.hostname=ip-172-31-6-71.eu-central-1.compute.internal -Djava.net.preferIPv4Stack=true"

- "CB_database_JDBC_Username=user"

- "CB_database_JDBC_Password=pass"

- "CB_database_JDBC_Driver=com.mysql.jdbc.Driver"

- "CB_database_JDBC_ConnectionURL=jdbc:mysql://ip-172-31-14-188.eu-central-1.compute.internal:3306/codebeamer?autoReconnect=true&zeroDateTimeBehavior=convertToNull&emulateLocators=true&characterEncoding=UTF-8&useSSL=false"

volumes:

- /vol/access:/home/appuser/codebeamer/repository/access

- /vol/git:/home/appuser/codebeamer/repository/git

- /vol/svn:/home/appuser/codebeamer/repository/svn

- /vol/hg:/home/appuser/codebeamer/repository/hg

- /vol/docs:/home/appuser/codebeamer/repository/docs

- /vol/docs:/home/appuser/codebeamer/repository/reports

- /vol/search:/home/appuser/codebeamer/repository/search

- /vol/logs:/home/appuser/codebeamer/logs

- /vol/lucene:/home/appuser/codebeamer/repository/lucene

- /vol/tmp:/home/appuser/codebeamer/repository/tmp

# Only if RMI - Discovery is configured

- /vol//home/appuser/codebeamer/repository/config/cache/peerDiscovery
For a complete list of the folders to share in a Codebeamer clustered installation, refer to the Volumes and Shared Folders for Codebeamer section.
To set up the RMI cache synchronization make sure the following attributes are set properly:
hostname
It is required because the RMI will bond the RMI stub to this domain name.
CB_RMI_CACHE_HOSTNAME / CB_RMI_CACHE_INSTANCES
Codebeamer will use these names to set up RMI communication.
JVM_OPTIONS
Java Virtual Machine should be set to use IPv4 instead of IPv6, also RMI should know the hostname.
Was this helpful?