Setting up Cluster Environment
|
|
This page provides a guide for setting up a cluster environment. Note that this is not a production-ready setup and should only be used for understanding the basics of clustering. You have to build your own image with the docker image builder script to be able to use the example compose files below. The image builder script can be downloaded from the Building a Docker Image for Codebeamer 2.2 and Later Versions.
|
Infrastructure diagram
For information related to the components in a cluster, see
Cluster Components.
Prerequisite
Following are the prerequisites required to set up cluster environment:
Load Balancer
User requests should be distributed among running
Codebeamer, both hardware or software load balancer could work. For more information, see
Load Balancer Configurations.
NFS
Attachments, 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. For more information, see
Sharing Directories Using NFS.
Cache
Codebeamer servers share frequently used data using
Ehcache
Peer Discovery Solutions
For more information on Cache Peer Discovery, see
Cache
Replication in Ehcache.
Environment Variables for Codebeamer
• CB_RMI_CACHE_HOSTNAME=codebeamer-app-server1 – Required for the network communication between the Cdebeamer nodes in the cluster.
• CB_CLUSTER_ENABLED=true - Must be set to the same value on all Codebeamer instances.
• CB_ping_testingEnabled=true - Must be true for cache test.
The following settings are required.
• CB_database_JDBC_Username=user - Database username
• CB_database_JDBC_Password=pass - Database password
• CB_database_JDBC_Driver=org.postgresql.Driver - Database driver
• CB_database_JDBC_ConnectionURL=jdbc:postgresql://codebeamer-db:5432/codebeamer - Database connection URL
The following settings must be configured properly for callbacks to function correctly.
|
|
The variables serverScheme, serverPort, and localname are utilized in other URLs as well, so they need to be configured correctly.
|
• CB_mail_localname=localhost - Host name of the URL that will be used in sent emails. For example, example.com
• CB_mail_serverScheme=https - Protocol of the URL that will be used in sent emails. For example, http / https
• CB_mail_serverPort=8443 - Port of the URL that will be used in sent emails. For example, 8443
The following setting is optional and depends on your specific needs.
CB_mail_host=example-host.com - Host name of your email server. For example, smtp.googlemail.com
|
|
Note: When the CB_CONTEXT_PATH parameter is applied, the instance is accessible exclusively via the context path.
|
• CB_CONTEXT_PATH=cb - Codebeamer context path
• CB_REDIRECT_TO=localhost:8080/cb - Codebeamer redirect URL
• TZ=Europe/Berlin - Timezone
• WAIT_HOSTS=codebeamer-db:5432 - Database to wait
• WAIT_HOSTS_TIMEOUT=120 - Seconds to wait for database startup
The following settings are not used in the above example.
• CB_MAXHEAPSIZE - Xmx value of the JVM. For example, 2000
• JVM_MEMORY_RATIO - Jvm memory ratio value. For example, 0.6
• CB_MIN_AVAILABLE_MEMORY_PERCENTAGE - Minimum available memory percentage. For example, 90
• CB_MIN_AVAILABLE_PHYSICAL_MEMORY_PERCENTAGE - Minimum available physical memory percentage. For example, 0
• JVM_OPTIONS_OVERRIDE - You can override the default configuration of Codebeamer. Default values are logged during start up.
• JVM_OPTIONS - You can extend the default configuration of Codebeamer. Default values are logged during start up.
• RESERVED_CODE_CACHE_SIZE_OVERRIDE - You can override the default configuration of Codebeamer. Default values are logged during start up.
• RESERVED_CODE_CACHE_SIZE - You can extend the default configuration of Codebeamer. Default values are logged during start up
• HEAPSIZE_OVERRIDE - You can override the default configuration of Codebeamer. Default values are logged during start up.
• HEAPSIZE - You can extend the default configuration of Codebeamer. Default values are logged during start up.
• GC_OPT - You can extend the default configuration of Codebeamer. Default values are logged during start up.
Environment Variables for the Load balancer Used in the Example
Default values for load balancer:
• TIMEOUT=600 - Request timeout in seconds
• MAX_NUMBER_OF_CONNECTIONS=100 - Maximum number of connections
• MIN_NUMBER_OF_CONNECTION_POOL_ENTRIES=0 - Minimum number of connections kept open in connection pool
• ACQUIRE=3000 - Timeout for acquiring connection form the pool in milliseconds
• KEEPALIVE=On - Keep TCP connection open
• RETRY_TIMEOUT=1 - Request retry if failed in seconds
• IOBUFFERSIZE=8192 - Buffer size for I/O
|
|
The load balancer used in the example is not production ready.
|
Volumes and Shared Folders for Codebeamer
To ensure seamless operation and data consistency in a clustered environment, the container paths of the volumes must be shared between all
Codebeamer nodes. To see the list of directories and container paths, see
Sharing Directories Using NFS.