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

codebeamer Application Lifecycle Management (ALM)

Search In Project

Search inClear

Tags:  not added yet

How to setup Excel Import server

This functionality requires additional licensing, to claim it contact your Intland Sales representative!

Prerequisite

  • Locate the cb-msoffice-integration-<version>.jar file in <CB install directory>/msoffice/ folder
  • Installed Java version, check the java version of codebeamer
  • Certificate files in case HTTPS is needed

How to setup a server on Linux

Create an excelimport.service file in /etc/systemd/system/ directory, with the following content:

[Unit]
Description=Excel Import application
After=syslog.target network.target


[Service]
SuccessExitStatus=143


Type=simple


ExecStart=java -jar <CB install dir>/msoffice/cb-excel-import.jar --rest.import.maxRequests=<NUMBER OF PARALLEL REQUESTS> --server.ssl.key-store-type=PKCS12 --server.ssl.key-store=<Path of your keystore>/keystore.p12 --server.ssl.key-store-password=<PASSWORD> --server.ssl.key-alias=<ALIAS> --security.require-ssl=true --server.port=443
ExecStop=/bin/kill -15 $MAINPID


[Install]
WantedBy=multi-user.target

How to start excelimport.service

Run the following commands in the terminal:

  1. sudo systemctl daemon-reload
  2. sudo systemctl start excelimport
  3. sudo systemctl status excelimport

Excel Import service should be up and running, see the returned status message in the terminal:

excelimport.service - Excel Import application
     Loaded: loaded (/etc/systemd/system/excelimport.service; disabled; vendor preset: enabled)
     Active: active (running) since Fri 2022-02-04 14:17:19 CET; 6s ago

Healthcheck URL

https://<your domain>/actuator/health

How to create a docker image

Create a dockerfile with the following content:

FROM adoptopenjdk/openjdk8:ubi # 21.09 and below
FROM adoptopenjdk/openjdk11:ubi # after 21.09


# Create user - End
RUN groupadd -g 1001 appuser && \
    useradd -m -r -u 1001 -g appuser appuser
# Create user - End


# Setup user directory - Start
COPY rootfs /home/appuser/
# Setup user directory - End


RUN echo '\
jarFile=$(find /home/appuser/ -name \*.jar | head -n 1); \
echo "Run: java $JAVA_OPTS -jar $jarFile"; \
java $JAVA_OPTS \
    -jar $jarFile \
    --rest.import.maxRequests=<NUMBER OF PARALLEL REQUESTS>
    --server.ssl.key-store-type=PKCS12 \
    --server.ssl.key-store=/home/appuser/keystore.p12 \
    --server.ssl.key-store-password=${PASSWORD} \
    --server.ssl.key-alias=${ALIAS} \
    --security.require-ssl=true \
    --server.port=8443; \
' > /home/appuser/run.sh


RUN chmod +x /home/appuser/run.sh


HEALTHCHECK --interval=30s --timeout=3s --start-period=1m --retries=10 \
  CMD curl -f --insecure https://localhost:8443/actuator/health || exit 1


WORKDIR /home/appuser
ENTRYPOINT [ "bash", "-c", "/home/appuser/run.sh" ]
  1. Create a rootfs directory.
  2. Copy the keystore.p12 file into rootfs directory.
  3. Copy the cb-msoffice-integration-<version>.jar into rootfs directory.
  4. Run docker build -t excelimport.
  5. Push it into the docker registry.

Docker compose

Create a docker-compose.yml file with the following content:

version: '2.1'


services:


  excelimport:
    image: <YOUR IMAGE>
    environment:
    - "JAVA_OPTS=-XX:+HeapDumpOnOutOfMemoryError -XX:InitialCodeCacheSize=128m -XX:ReservedCodeCacheSize=128m -XX:+UseCodeCacheFlushing -Xss1m -Xms2500m -Xmx2500m"
    - LOG4J_FORMAT_MSG_NO_LOOKUPS=true
    ports:
      - "443:8081"
    volumes:
      - /tmp:/tmp

Run docker-compose -f docker-compose.yml up -d to start Excel Import server.

How to setup a server on Windows

Download Windows Service Wrapper

Download the latest version of https://github.com/winsw/winsw, use the WinSW.NETCore31.x64.exe.

Set up a service

  1. Rename the WinSW.NETCore31.x64.exe to excelimport.exe.
  2. Create an excelimport.xmlfile with the following content:
    <service>
      <id>excelimport</id>
      <name>Word Export</name>
      <description>This service runs Excel Import application.</description>
      <executable>java</executable>
      <arguments>-Xms6G -Xmx6G -jar "%BASE%\cb-excel-import-<VERSION>.jar" --server.port=443 --server.ssl.key-store-type=PKCS12 --server.ssl.key-store=%BASE%\keystore.p12 --server.ssl.key-store-password=<PASSWORD> --server.ssl.key-alias=<ALIAS> --security.require-ssl=true</arguments>
      <log mode="roll"></log>
      <logpath>%BASE%\logs</logpath>
      <onfailure action="restart" />
    </service>
  3. Create a keystore.p12 file with certificates.
  4. Open the 443 port on the Windows Firewall.
  5. Open the 443 port on the Security Group on AWS.
  6. Install service by running: excelimport.exe install.
  7. Start service by running: excelimport.exe start.
  8. Check status by running: excelimport.exe status.
  9. Check healthcheck URL: https://localhost/actuator/health.