You are not logged in. Click here to log in.

codebeamer Application Lifecycle Management (ALM)

Search In Project

Search inClear

Tags:  not added yet

codeBeamer Active / Passive solution

Starting from codeBeamer 10.0.0 codeBeamer will support onlyActive - Active Clustering.

Starting from codeBeamer 9.3.0 codeBeamer will support Master / Slave server architecture.


Infrastructure

In order to run a Master / Backup solution (a.k.a Active / Passive high availability cluster), we need 2 running application servers and one load balancer, these server must be hosted on physically separate servers. Application servers use a shared files system to keep share all application related data. In case load balance is not a physical device, it also must be hosted on physically separate server.



Setup

Load balancer

Load balancer should be configured to know the IP address / Domain name of the application servers, and the ping URL of them.


Apache configuration

Recommended version Apache 2.4.21 and later

ServerName 127.0.0.1
Listen 0.0.0.0:8889

<VirtualHost *:8889>

   ProxyHCExpr ok234 {%{REQUEST_STATUS} =~ /^[234]/}

   <Proxy balancer://codebeamercluster>
      BalancerMember http://localhost:8080 hcmethod=GET hcuri=/cb/hc/cluster/ping.spr hcexpr=ok234 hcinterval=10 hcpasses=2 hcfails=2
      BalancerMember http://localhost:8081 hcmethod=GET hcuri=/cb/hc/cluster/ping.spr hcexpr=ok234 hcinterval=10 hcpasses=2 hcfails=2
      ProxySet lbmethod=byrequests
   </Proxy>

   <Location /balancer-manager>
        SetHandler balancer-manager
        Order allow,deny
        allow from localhost
   </Location>

   ProxyPass /balancer-manager !

   ProxyPass / balancer://codebeamercluster/
   ProxyPassReverse / balancer://codebeamercluster/


</VirtualHost>

Name of the cluster could be any valid string, same value must be used in the ProxyPass and ProxyPassReverse configurations

hcuri must set to /cb/hc/cluster/ping.spr

hcinterval must be lower value than the checkServerStatusInterval (see below), recommended value is half of the checkServerStatusInterval

Required plugins
  • lbmethod_byrequests
  • proxy
  • proxy_balancer
  • proxy_hcheck
  • proxy_http
Docker image

You can build a docker image from the following docker project LoadBalancer.zip.


How to build

Extract the LoadBalancer.zip, and go to the directoy, you should see a Dockerfile

docker build --tag <imageName>:latest .

imageName could be any valid docker image name, e.g cbLoadBalancer


How to run

docker run -p 80:8888 -e ACTIVE=http://codeBeamerActiveServer.com -e PASSIVE=http://codeBeamerPassiveServer.com <imageName>

Visit the http://localhost/cb, load balancer information can be found here: http://localhost/balancer-manager

Recommendation

  • Balancer-manager is useful for debugging, it is recommended to strengthen the authentication of it, or remove it from the configuration
  • Use domain names instead of IPs, it is much flexible solution

Shared file system

TODO


Setup a new codeBeamer with Active / Passive configuration

  1. Download an installer from https://intland.com/download-codebeamer/
  2. Install codeBeamer
    1. Please note that database and SMTP servers must be visible for both active and passive server
  3. Visit the /cb/sysadmin/configConfiguration.spr page
  4. Add the following cluster configuration to the application config
    "cluster" : {
        "checkServerStatusInterval" : <Check Interval>,
        "serverStateChangeNotificationEmail" : "<Email>"
    }
    
    Check Interval defines how often the status of the current server is checked. Default value is 30 seconds. Same value must be used for active and passive servers.
    Email defines who is notified in case the master server is down. In case the value of the field is empty or the attribute is missing, system administrators of the application are notified
  5. Stop codeBeamer with <CB-HOME>/bin/stop
  6. Move <CB-HOME>/repository directory to the shared file system
  7. Create a copy of <CB-HOME> and move it to the host of passive server
  8. Configure and start your load balancer
  9. Configure and start active server, see below
  10. Configure and start passive server, see below

Upgrade codeBeamer

  1. Upgrade codeBeamer to the latest version, see Upgrading from Older Versions - Simple - Before 21.09 (EMMA)
    1. Backing up codebeamer installation
    2. Please note that the Active / Passive feature is only available from 9.3 version
  2. Visit the /cb/sysadmin/configConfiguration.spr page
  3. Add the following cluster configuration to the application config
    "cluster" : {
        "checkServerStatusInterval" : <Check Interval>,
        "serverStateChangeNotificationEmail" : "<Email>"
    }
    
    Check Interval defines how often the status of the current server is checked. Default value is 30 seconds. Same value must be used for active and passive servers.
    Email defines who is notified in case the master server is down. In case the value of the field is empty or the attribute is missing, system administrators of the application are notified
  4. Stop codeBeamer with <CB-HOME>/bin/stop
  5. Move <CB-HOME>/repository directory to the shared file system
  6. Create a copy of <CB-HOME> and move it to the host of passive server
  7. Configure and start your load balancer
  8. Configure and start active server, see below
  9. Configure and start passive server, see below

How to start an Active Server

In order to start a active server you need to change the configuration of the <ACTIVE-CB-HOME>/bin/cb file (<ACTIVE-CB-HOME>/bin/cbservice.bat on Windows), Please extend the parameters of start script with the following:

-Dcodebeamer.server.mode=ACTIVE
-Dcodebeamer.server.id=master
-Dcodebeamer.home=<Path of the shared directory>

How to start a Passive Server

In order to start a passive server you need to change the configuration of the <PASSIVE-CB-HOME>/bin/cb file (<PASSIVE-CB-HOME>/bin/cbservice.bat on Windows), Please extend the parameters of start script with the following:

-Dcodebeamer.server.mode=PASSIVE
-Dcodebeamer.server.id=passive
-Dcodebeamer.home=<Path of the shared directory>