CFE_18 takes advantage of relational-database standardization and MariaDB system-versioning through creating database schema according to integration data needs.
The project uses the Flyway migration strategy to ensure fault-free deployment and presents data through Swagger UI via RESTful endpoints. CFE_18 does have Spring Boot framework built-in which utilizes the framework only through endpoints. MyBatis works as a mapper between Spring boot and MariaDB database and creates queries specified within said mappers.
-
CFE_18 can be used to manage integrations
-
Schema structure can be modified to accommodate user needs
See the official documentation on docs.teragrep.com.
-
Setup database according to end-user needs
-
Can be deployed using tomcat/JBoss
Note
|
Files are stored under quadlet/docker directory. They are viable for containerized deployment without Quadlet.
|
The project requires an external database to use. CFE_18 image uses multi-stage to build Rocky Linux 9 during the first stage as base image and installs Apache Tomcat on top of the previous stage. CFE_18.war is deployed via using Apache Tomcat.
Expected files are:
-
/etc/tomcat/Catalina/localhost/cfe-18/application.properties
-
/etc/tomcat/Catalina/localhost/cfe-18/log4j2.xml
Example files for configuration are:
-
/quadlet/docker/application.properties
-
/quadlet/docker/log4j2.xml
/quadlet/docker/application.properties requires configuring:
-
spring.datasource.url = jdbc:mariadb://127.0.0.1:3306/cfe_18
-
spring.datasource.username = username
-
spring.datasource.password = password
-
spring.datasource.driver-class-name = org.mariadb.jdbc.Driver
MariaDB must be used as the database solution for CFE_18 containerized deployment, when using CFE_18 image. It is required since CFE_18 takes advantage of MariaDB’s system-versioned tables.
$ docker run -ti -v /quadlet/docker/application.properties:/etc/tomcat/Catalina/localhost/cfe-18/application.properties:ro -v /quadlet/docker/log4j2.xml:/etc/tomcat/Catalina/localhost/cfe-18/log4j2.xml:ro -p 8080:8080 ghcr.io/teragrep/cfe_18:latest
Please notice that in the example command above:
-
application.properties
andlog4j2.xml
are mounted accordingly. -
8080:8080 are for external and internal ports.
-
ghcr.io/teragrep/cfe_18:latest image from Githubs image repository
Important
|
This is the recommended deployment style for containerized deployment. Running Podman containers without Quadlets results them not starting independently after host reboots. |
Files inside the directory are required for Apache Tomcat to deploy CFE_18. They are explained in the section How to Run in a Container?
Files inside the directory are required for MariaDB to initialize with the correct databases intact. See also MariaDB initialization script documentation for initializing the database contents.
The following Quadlet file is required to deploy CFE_18 Podman container as a system service. The example below is from quadlet/cfe18.container
.
The following Quadlet file is inserted under /etc/containers/systemd
on the host machine. See more on Podman Quadlet docs.
[Unit] Description=CFE_18 container Requires=cfe18mariadb.service [Container] Image=ghcr.io/teragrep/cfe_18:latest Volume=/opt/teragrep/cfe_18/app:/etc/tomcat/Catalina/localhost/cfe_18:Z PublishPort=8080:8080 # Static IP for cfe_18 IP=10.88.0.3 [Install] # Start by default on boot WantedBy=multi-user.target default.target
Keywords explained
-
Requires — Needs to have MariaDB service running before starting cfe18 container
-
Image — Pulls image from gchr.io to be used for container deployment
-
Volume — Mounts contents of
quadlet/docker
under Tomcat configuration (application.properties
andlog4j2.xml
) -
PublishPort — Opens an internal and an external port for accessing CFE_18
-
IP — Declare IP in Podman subnet
The following Quadlet file is required to deploy MariaDB Podman container as system service. Example below is from quadlet/cfe18mariadb.container
.
The following Quadlet file is inserted under /etc/containers/systemd
on the host machine. See more on Podman Quadlet docs.
[Unit] Description=Database container for CFE_18 [Container] Image=docker.io/mariadb:11.5 SecurityLabelDisable=true # Should be stored as a secret when actually using to deploy. Environment=MARIADB_ROOT_PASSWORD=password # Static IP for cfe_18 to connect to IP=10.88.0.2 # DB initialization script Volume=/opt/teragrep/cfe_18/database/init:/docker-entrypoint-initdb.d # Persistent Storage Volume=/opt/teragrep/cfe_18/database/data:/var/lib/mysql [Install] WantedBy=multi-user.target default.target
Keywords explained
-
Image — Pulls image from gchr.io to be used for container deployment
-
SecurityLabelDisable — Turns off SELinux labeling
-
Environment — Env variable which is required by MariaDB image to install MariaDB inside the container
-
IP — Declare IP in Podman subnet
-
Volume(1) — Mounts contents of
quadlet/docker-entrypoint-inidb.d
into the container for MariaDB to start database initialization -
Volume(2) — Creates persistent storage which is saved on host under
/opt/teragrep/cfe_18/database/data
You can involve yourself with our project by opening an issue or submitting a pull request.
Contribution requirements:
-
All changes must be accompanied by a new or changed test. If you think testing is not required in your pull request, include a sufficient explanation as why you think so.
-
Security checks must pass
-
Pull requests must align with the principles and values of extreme programming.
-
Pull requests must follow the principles of Object Thinking and Elegant Objects (EO).
Read more in our Contributing Guideline.
Contributors must sign Teragrep Contributor License Agreement before a pull request is accepted to organization’s repositories.
You need to submit the CLA only once. After submitting the CLA you can contribute to all Teragrep’s repositories.