How to Setup Word Export 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/ directory.
Since Codebeamer release 22.10 (GINA), the files in the <CB install directory>/msoffice/ directory have been renamed to cb-word-export-impl-<version>.jar and cb-word-import-impl-22.10-SP8.jar .
- Installed Java version, check the java version of Codebeamer.
- Certificate files in case HTTPS is needed.
How to Setup a Server on Linux
Create a wordexport.service file in /etc/systemd/system/ directory, with the following content:
[Unit]
Description=Word Export application
After=syslog.target network.target
[Service]
SuccessExitStatus=143
Type=simple
ExecStart=java -jar <CB install dir>/msoffice/cb-word-export.jar --rest.export.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 wordimport.service
Run the following commands in the terminal:
- sudo systemctl daemon-reload
- sudo systemctl start wordexport
- sudo systemctl status wordexport
Word Import service should be up and running, see the returned status message in the terminal:
wordexport.service - Word Export application
Loaded: loaded (/etc/systemd/system/wordexport.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 --rest.export.maxRequests=${MAX_REQUESTS:-3}"; \
java $JAVA_OPTS \
-jar $jarFile \
--rest.export.maxRequests=${MAX_REQUESTS:-3} \
--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" ]
- Create a rootfs directory.
- Copy the keystore.p12 file into rootfs directory.
- Copy the cb-msoffice-integration-<version>.jar file into rootfs directory.
- Run docker build -t wordexport.
- Push it into the docker registry.
Docker Compose
Creater a docker-compose.yml file, with the following content:
version: '2.1'
services:
wordexport:
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 Word Export server.
How to Setup a Server on Windows
Download Windows Service Wrapper
Download the latest version of https://github.com/winsw/winsw, please use the WinSW.NETCore31.x64.exe.
Set Up a Service
- Rename the WinSW.NETCore31.x64.exe to wordexport.exe.
- Create a wordexport.xmlfile with the following content:
<service>
<id>wordexport</id>
<name>Word Export</name>
<description>This service runs Word Export application.</description>
<executable>java</executable>
<arguments>-Xms6G -Xmx6G -jar "%BASE%\cb-msoffice-integration-<VERSION>.jar" --server.port=443 --rest.export.maxRequests=<NUMBER OF PARALLEL REQUESTS> --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>
- Create a keystore.p12 file with certificates.
- Open the 443 port on the Windows Firewall.
- Open the 443 port on the Security Group on AWS.
- Install service by running in CLI: wordexport.exe install.
- Start service by running in CLI: wordexport.exe start.
- Check status by running in CLI: wordexport.exe status.
- Check healthcheck URL: https://localhost/actuator/health.