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 10.0 Docker Image

Docker Hub

https://hub.docker.com/r/intland/codebeamer

Supported docker variables

Application configuration via environment variables

See: Application configuration via environment variables

Wait service

Docker image contains 3rd party tool for waiting service like database. See: https://github.com/ufoscout/docker-compose-wait

Required parameters

  • CB_database_JDBC_Username
  • CB_database_JDBC_Password
  • CB_database_JDBC_Driver
  • CB_database_JDBC_ConnectionURL

Optional parameters

CB_SESSION_CLEANUP [true (default), false] - codeBeamer 10.x

Every session record has a version hash which is calculated from:

  • application version
  • build date
  • revision hash
  • branch name

Session cleanup feature removes every session record from the DB which has a different session version than the currently booting application.

Wait service

  • WAIT_HOSTS
    Host adress of the database server. e.g. example.mysql.com:3306
  • WAIT_HOSTS_TIMEOUT
    (int) Determines the maximum number of seconds to wait for all the hosts to be available before failure, default value: 30.

Application

  • CB_CONTEXT_PATH
    Context path of codeBeamer. e.g. cb

Initial database script during startup

CB_INIT_SQL_FILES=/path/to/your/sqlfile1,/path/to/your/sqlfile2


The given SQL files (coma or semicolon separated list) are executed during startup.


Please note that you need to attach the sql files as a volume.


The right side needs to match with the path that you defined in the environment variable.


with compose

volumes:
   - /path/to/folder/of/your/sql/files/on/host:/path/to/folder/of/your/sql/files/in/docker

without compose

docker run -v /path/to/folder/of/your/sql/files/on/host:/path/to/folder/of/your/sql/files/in/docker ...

Initial configuration

CB_initial_config can be used for starting the application with initial configuration.

CB_initial_config={ "search" : { "delay" : 90, "fuzzy-similarity-factor" : 0.6 } }

Time zone

TZ parameter can be used to set timezone of the container. Please use the name of the time zones from here: https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

TZ=Europe/Berlin 

Logging

Since 10.1-SP1 version, system and error logs are not sent to the docker, it can be turned on by the CB_DOCKER_LOGGING=true environment variable

Debug

Remote java debug can be turned on, it uses the 7896 port inside the container

DEBUG=TRUE

Tomcat parameters

  • TOMCAT_EXECUTOR_MAX_THREADS
    (int) The maximum number of active threads in the pool, default value: 250.
  • TOMCAT_EXECUTOR_PRESTARTMIN_SPARE_THREADS
    (boolean) Determines whether minSpareThreads should be started when starting the Executor, default value: true.
  • TOMCAT_EXECUTOR_MIN_SPARE_THREADS
    (int) The minimum number of threads (idle and active status) always kept alive, devault value: 40.
  • TOMCAT_EXECUTOR_MIN_SPARE_THREADS
    (int) The time in milliseconds before an idle thread is shutdown, unless the number of active threads are less than or equal to minSpareThreads, default value: 90000.

Security

Please note the 8080 port is set to insecure, in case you use the proxy server for HTTPS you need to use the 8090 port


Also see: How to Set Up SSL for codebeamer

Volumes

How to add (or override) files to the docker images

Bind your directory to the docker images

  codebeamer-app:
    image: cb-minimal-empty:latest
    env_file:
     - ./config/mail.env
     .....
    environment:
      - DEBUG=false
      ......
    volumes:
      - ~/update:/home/appuser/codebeamer/update
      - codebeamer-app-repository-docs:/home/appuser/codebeamer/repository/docs
      - codebeamer-app-repository-search:/home/appuser/codebeamer/repository/search
      - codebeamer-app-logs:/home/appuser/codebeamer/logs
    links:
      - codebeamer-db:container-mysql

"~/update" will be bound to the container and will be available under "/home/appuser/codebeamer/update"

On Windows docker hosts, the folder separator for update directory should be backslash - e.g.

- .\update:/home/appuser/codebeamer/update

Please also note that upon first startup docker guest will mount this folder as a windows share from host machine.

Update directory could contain the following files / directory

  • root.zip
    Content of root.zip will be extracted to the tomcat/webapps/ROOT directory, it can be used to override images, jsp files or add jars to the libs directory
  • root
    Content of root directory will be copied to the tomcat/webapps/ROOT directory, it can be used to override images, jsp files or add jars to the libs directory (Only from 9.4 version)
  • config.zip
    Content of config.zip will be extracted to the /codebeamer/config directory
  • config
    Content of config directory will be copied to the /codebeamer/config directory (Only from 9.4 version)
  • repository.zip
    Content of repository.zip will be extracted to /codebeamer/repository directory, it can be used for uploading logos
  • repository
    Content of repository directory will be copied to /codebeamer/repository directory, it can be used for uploading logos (Only from 9.4 version)

Use cases

How to change the logo of the application

Create a root.zip with a logo.png in "/config/logo" directory

User the following configuration for CB_initial_config

CB_initial_config={ "interactive" : { "logo" : { "selected" : "custom", "custom-logo-available" : true, "custom-url" : "/logo/logo.png" } } }

Please note if you use docker compose file value of CB_initial_config should be escaped:

codebeamer-app:
    image: cb-minimal-empty:latest
    depends_on:
      codebeamer-db:
        condition: service_healthy
    env_file:
     - ./config/mail.env
       ......
    environment:
      - "CB_initial_config={ \"interactive\" : { \"logo\" : { \"selected\" : \"custom\", \"custom-logo-available\" : true, \"custom-url\" : \"/logo/logo.png\" } } }"
      - DEBUG=false
      - TZ=Europe/Berlin
       ...... 
How to change the login page
  codebeamer-app:
    image: cb-minimal-empty:latest
    depends_on:
      codebeamer-db:
        condition: service_healthy
    env_file:
     - ./config/mail.env
    ....
    environment:
      - "CB_initial_config={\"interactive\":{\"slogan-text\":{\"format\":\"\",\"text\":\"meine Kopfzeile\"},\"welcome-text\":{\"format\":\"W\"},\"login-text\":{\"format\":\"W\",\"keep-style\":false,\"text\":\"[{Html\\r\\n\\r\\n\\t\\t\\t\\t<html>\\r\\n\\t\\t\\t\\t<head>\\r\\n\\t\\t\\t\\t\\t<style>\\r\\n\\t\\t\\t\\t\\tbody {\\r\\n\\t\\t\\t\\t\\t\\tbackground-image: url('gui/background.jpg') ;\\r\\n\\t\\t\\t\\t\\t\\tbackground-repeat: no-repeat;\\r\\n\\t\\t\\t\\t\\t\\tbackground-attachment: fixed;\\r\\n\\t\\t\\t\\t\\t\\tbackground-size: 100% auto;\\r\\n\\t\\t\\t\\t\\t\\tfont-family: Arial, sans-serif;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\t\\t.login {\\r\\n\\t\\t\\t\\t\\t  margin: 90px 90px;\\r\\n\\t\\t\\t\\t\\t  width: 300px;\\r\\n\\t\\t\\t\\t\\t  padding: 30px 25px;\\r\\n\\t\\t\\t\\t\\t  background: rgba(255,255,255,0.5);\\r\\n\\t\\t\\t\\t\\t  border: 1px solid #c4c4c4;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\t\\t.login-input {\\r\\n\\t\\t\\t\\t\\t  width: 100%;\\r\\n\\t\\t\\t\\t\\t  height: 40px;\\r\\n\\t\\t\\t\\t\\t  margin-bottom: 10px;\\r\\n\\t\\t\\t\\t\\t  padding-left:10px;\\r\\n\\t\\t\\t\\t\\t  font-size: 14px;\\r\\n\\t\\t\\t\\t\\t  background: #fff;\\r\\n\\t\\t\\t\\t\\t  border: 1px solid #ccc;\\r\\n\\t\\t\\t\\t\\t  border-radius: 3px;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\t\\t\\t\\t\\t.login-input:focus {\\r\\n\\t\\t\\t\\t\\t\\tborder-color:#6e8095;\\r\\n\\t\\t\\t\\t\\t\\toutline: none;\\r\\n\\t\\t\\t\\t\\t  }\\r\\n\\t\\t\\t\\t\\t.login-button {\\r\\n\\t\\t\\t\\t\\t  width: 100%;\\r\\n\\t\\t\\t\\t\\t  height: 40px;\\r\\n\\t\\t\\t\\t\\t  padding: 0;\\r\\n\\t\\t\\t\\t\\t  font-size: 14px;\\r\\n\\t\\t\\t\\t\\t  color: #fff;\\r\\n\\t\\t\\t\\t\\t  text-align: center;\\r\\n\\t\\t\\t\\t\\t  background: #000000;\\r\\n\\t\\t\\t\\t\\t  border: 0;\\r\\n\\t\\t\\t\\t\\t  border-radius: 3px;\\r\\n\\t\\t\\t\\t\\t  cursor: pointer; \\r\\n\\t\\t\\t\\t\\t  outline:0;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\t\\t.login-lost\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t  text-align:center;\\r\\n\\t\\t\\t\\t\\t  margin-bottom:0px;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\t\\t.login-lost a\\r\\n\\t\\t\\t\\t\\t{\\r\\n\\t\\t\\t\\t\\t  color:#666;\\r\\n\\t\\t\\t\\t\\t  text-decoration:none;\\r\\n\\t\\t\\t\\t\\t  font-size:11px;\\r\\n\\t\\t\\t\\t\\t}\\r\\n\\r\\n\\t\\t\\t\\t\\t</style>\\r\\n\\t\\t\\t\\t</head>\\r\\n\\t\\t\\t<body>\\r\\n\\t\\t\\t\\t<p>\\r\\n\\t\\t\\t\\t\\t<form class='login' id='loginForm' action='/cb/login.spr' method='post'>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t<input id='user' name='user' tabindex='0' type='text' class='login-input' placeholder='User' value=''/>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t<input id='password' name='password' type='password'  class='login-input' placeholder='Password' value='' autocomplete='off'/> \\r\\n\\t\\t\\t\\t\\t\\t\\t\\t<input class='login-button' title='Login' type='submit' value='Login'>\\r\\n\\t\\t\\t\\t\\t\\t\\t\\t<p class='login-lost'><a href='/cb/lostPassword.do'>Forgot Password?</a></p>\\r\\n\\t\\t\\t\\t\\t</form>\\r\\n\\t\\t\\t\\t</p>\\r\\n\\t\\t\\t</body>\\r\\n\\t\\t\\t</html>\\r\\n\\t\\t\\t}]\"} } }"
- DEBUG=false
.....

Please note that it is recommended to use apostrophe instead of double apostrophe in HTML, also \r, \n, and \t special characters should be escaped

MySQL docker image

Image extends the https://github.com/sclorg/mysql-container/tree/master/5.7 image, that is built for OpenShift, changes are

[mysqld]
character_set_server=utf8
character_set_filesystem=utf8
collation-server=utf8_general_ci
init-connect='SET NAMES utf8'
init_connect='SET collation_connection = utf8_general_ci'
skip-character-set-client-handshake