Step-by-Step: How to Configure Codebeamer as Active-Active Cluster #10410741/HEAD / v210 |
How to Configure Codebeamer as Active-Active ClusterTable of Contents
PrerequisiteLoad BalancerUser requests should be distributed among running Codebeamer, both hardware or software load balancer could work. Using "non-sticky session" setting is recommended. NFSAttachments, temp files, etc. must be visible for all running Codebeamer instances in order to support that these files must be stored on a network storage solution.
The general performance of Codebeamer does not depend on the network speed between NFS and Codebeamer. However, performance degradation of SCM, file upload and download are expected.
For detailed information about the cluster architecture, see: Cluster architecture.
Recommended Configuration Options<NFS server>:/repository /<codeBeamer installation>/repository nfs defaults,noresvport,noatime,lookupcache=positive 0 2 <NFS server>:/logs /<codeBeamer installation>/logs nfs defaults,noresvport,noatime,lookupcache=positive 0 2 On on-premise servers, also add the following: <NFS server>:/tomcat_tmp /<codeBeamer installation>/tomcat/tmp nfs defaults,noresvport,noatime,lookupcache=positive 0 2
Environment Configuration
CacheCodebeamer servers share frequently used data via EhCache implementation. AutomaticAutomatic solution uses a multicast address to find Codebeamer instances.
IP multicasting provides a method to send information to a group of hosts at the same time, which is different from the normal IP unicast routing that sends information only to one specific host at a time. IP multicast relies on a data distribution tree built by a multicast routing protocol to deliver packets from the source to the receivers when they are connected to different networks. The most common issue in a multicast network is packets transmitted by the source not reaching receivers. Other issues could be related to the formation of the distribution tree itself, and unwanted flooding in LAN environments that use switches.
Environment Variables
ManualManual solution knows host name of all servers in the cluster. Environment Variables
DynamicDynamic peer discovery can be configured with the following environment variables, similarly to manual and automatic RMI. With this configuration, peers are discovered automatically if peer-discovery is enabled and configured properly. Cache is synchronized and boot is loaded at Codebeamer startup. Environment VariablesDefault values:
How to Test Cache Network ConfigurationsEhCache is used for sharing frequently used data among Codebeamer instances. Steps for Testing
JGroupsFileFor technical details, see page http://www.jgroups.org/manual4/#FILE_PING. Environment Variables
AutomaticFor technical details, see page http://www.jgroups.org/manual4/#MPING. Environment Variables
ManualFor technical details, see page http://www.jgroups.org/manual4/#TCPPING_Prot. Environment Variables
How to Test JGroups Network ConfigurationsJGroups is only used for distributing WebSocket message among running nodes.
JGroup has been removed from the Codebeamer project since Codebeamer release 21.09-SP6.
Steps for Testing - Since Codebeamer Release 10.0
Steps for Testing - Since Codebeamer Release 10.1
Running an Active-Active Codebeamer Cluster with Docker-ComposeAll the software required to run a Codebeamer cluster is also available as public docker images. With these resources, it is easy to spin up an instance in an isolated, safe manner with minimal dependencies. As multiple containers are required to run for a cluster to operate, some coordination is needed. There are several tools available for container orchestration. In the provided example, a Docker Compose file is given. The script can be easily adapted for other tools as well. Dependencies
Usage
docker-compose.ymlThis is an example configuration, not a production ready setup. Use this only for understand the clustering itself.# 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-db: image: intland/mysql:debian-8.0.32-utf8mb4 environment: - MYSQL_USER=user - MYSQL_PASSWORD=pass - MYSQL_ROOT_PASSWORD=pass - MYSQL_DATABASE=codebeamer - MYSQL_MAX_ALLOWED_PACKET=1024M - MYSQL_INNODB_BUFFER_POOL_SIZE=1G - MYSQL_INNODB_LOG_FILE_SIZE=256M - MYSQL_INNODB_LOG_BUFFER_SIZE=256M - TZ=Europe/Berlin ports: - 8081:3306 volumes: - codebeamer-db-data:/var/lib/mysql networks: - cluster codebeamer-app-server1: image: intland/codebeamer-git:2.0.0.0 depends_on: codebeamer-db: condition: service_healthy environment: - CB_MAXHEAPSIZE=1500 - TZ=Europe/Berlin - WAIT_HOSTS=codebeamer-db:3306 - WAIT_HOSTS_TIMEOUT=120 - CB_CLUSTER_ENABLED=true - CB_ping_testingEnabled=true - CB_RMI_CACHE_HOSTNAME=codebeamer-app-server1 - CB_RMI_CACHE_INSTANCES=codebeamer-app-server1, codebeamer-app-server2 - 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 - CB_JGROUPS_CHANNEL_TCP_PING_ADDRESSES=codebeamer-app-server1, codebeamer-app-server2 - CB_JGROUPS_CHANNEL_TCP_PING_PORT=9998 - CB_JGROUPS_TEST_CHANNEL_TCP_PING_PORT=8998 - CB_SCHEDULER_FACTORY_THREAD_COUNT_INSTANCE=3 - CB_SCHEDULER_FACTORY_THREAD_COUNT_CONCURRENT=3 - CB_SCHEDULER_FACTORY_THREAD_COUNT_REPORT=3 - CB_SCHEDULER_FACTORY_THREAD_COUNT_REMOTE_JIRA_SYNC=3 - CB_SCHEDULER_FACTORY_THREAD_COUNT_REMOTE_DOORS_SYNC=3 - CB_database_JDBC_Username=user - CB_database_JDBC_Password=pass - CB_database_JDBC_Driver=com.mysql.jdbc.Driver - CB_database_JDBC_ConnectionURL=jdbc:mysql://codebeamer-db:3306/codebeamer?autoReconnect=true&zeroDateTimeBehavior=convertToNull&emulateLocators=true&characterEncoding=UTF-8&useSSL=false ports: - 9080:8080 networks: - cluster volumes: - codebeamer-app-server-tmp:/home/appuser/codebeamer/repository/tmp - codebeamer-app-server-repository-docs:/home/appuser/codebeamer/repository/docs - codebeamer-app-server-repository-search:/home/appuser/codebeamer/repository/search - codebeamer-app-server-repository-svn:/home/appuser/codebeamer/repository/svn - codebeamer-app-server-repository-git:/home/appuser/codebeamer/repository/git - codebeamer-app-server-repository-reports:/home/appuser/codebeamer/repository/reports - codebeamer-app-server-logs:/home/appuser/codebeamer/logs codebeamer-app-server2: image: intland/codebeamer-git:2.0.0.0 depends_on: codebeamer-db: condition: service_healthy healthcheck: timeout: 10s retries: 3 environment: - CB_MAXHEAPSIZE=1500 - TZ=Europe/Berlin - WAIT_HOSTS=codebeamer-db:3306 - WAIT_HOSTS_TIMEOUT=120 - CB_CLUSTER_ENABLED=true - CB_ping_testingEnabled=true - CB_RMI_CACHE_HOSTNAME=codebeamer-app-server2 - CB_RMI_CACHE_INSTANCES=codebeamer-app-server1, codebeamer-app-server2 - 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 - CB_JGROUPS_CHANNEL_TCP_PING_ADDRESSES=codebeamer-app-server1, codebeamer-app-server2 - CB_JGROUPS_CHANNEL_TCP_PING_PORT=9998 - CB_JGROUPS_TEST_CHANNEL_TCP_PING_PORT=8998 - CB_SCHEDULER_FACTORY_THREAD_COUNT_INSTANCE=3 - CB_SCHEDULER_FACTORY_THREAD_COUNT_CONCURRENT=3 - CB_SCHEDULER_FACTORY_THREAD_COUNT_REPORT=3 - CB_SCHEDULER_FACTORY_THREAD_COUNT_REMOTE_JIRA_SYNC=3 - CB_SCHEDULER_FACTORY_THREAD_COUNT_REMOTE_DOORS_SYNC=3 - CB_database_JDBC_Username=user - CB_database_JDBC_Password=pass - CB_database_JDBC_Driver=com.mysql.jdbc.Driver - CB_database_JDBC_ConnectionURL=jdbc:mysql://codebeamer-db:3306/codebeamer?autoReconnect=true&zeroDateTimeBehavior=convertToNull&emulateLocators=true&characterEncoding=UTF-8&useSSL=false ports: - 9090:8080 networks: - cluster volumes: - codebeamer-app-server-tmp:/home/appuser/codebeamer/repository/tmp - codebeamer-app-server-repository-docs:/home/appuser/codebeamer/repository/docs - codebeamer-app-server-repository-search:/home/appuser/codebeamer/repository/search - codebeamer-app-server-repository-svn:/home/appuser/codebeamer/repository/svn - codebeamer-app-server-repository-git:/home/appuser/codebeamer/repository/git - codebeamer-app-server-repository-reports:/home/appuser/codebeamer/repository/reports - codebeamer-app-server-logs:/home/appuser/codebeamer/logs load-balancer: image: intland/loadbalancer:latest depends_on: codebeamer-app-server1: condition: service_healthy codebeamer-app-server2: condition: service_healthy environment: - SERVERS=http://codebeamer-app-server1:8080 http://codebeamer-app-server2:8080 - HOSTNAME=localhost - TIMEOUT=600 - MAX_NUMBER_OF_CONNECTIONS=100 - MIN_NUMBER_OF_CONNECTION_POOL_ENTRIES=0 - ACQUIRE=3000 - KEEPALIVE=On - RETRY_TIMEOUT=1 - IOBUFFERSIZE=8192 ports: - 8080:8080 networks: - cluster volumes: codebeamer-db-data: codebeamer-app-server-tmp: codebeamer-app-server-repository-docs: codebeamer-app-server-repository-search: codebeamer-app-server-repository-svn: codebeamer-app-server-repository-git: codebeamer-app-server-repository-reports: codebeamer-app-server-logs: networks: cluster: |
Fast Links
codebeamer Overview codebeamer Knowledge Base Services by Intland Software |
This website stores cookies on your computer. These cookies are used to improve your browsing experience, constantly optimize the functionality and content of our website, furthermore helps us to understand your interests and provide more personalized services to you, both on this website and through other media. With your permission we and our partners may use precise geolocation data and identification through device scanning. You may click accept to consent to our and our partners’ processing as described above. Please be aware that some processing of your personal data may not require your consent, but you have a right to object to such processing. By using our website, you acknowledge this notice of our cookie practices. By accepting and continuing to browse this site, you agree to this use. For more information about the cookies we use, please visit our Privacy Policy.Your preferences will apply to this website only.