Applies to
- Liquibase Secure v5.0+
- Liquibase License Tracking v1.0.0-beta+
Summary
Liquibase Secure v5.0+ ships with the public beta preview of the Liquibase License Tracking (LLT) utility v1.0.0-beta. The current implementation ships with a Docker PostgreSQL database, but it can be set-up to utilize an external backing database.
Environment Conditions
- PostgreSQL or SQLite database
Configuring LLT
The configuration can occur either on the command line or through Docker.
Command Line Configuration
- In the LLT install directory, create a configuration file called "application.properties". This file should be in the same directory as the other LLT files start.sh/start.bat and report.sh/report.bat.
- Edit application.properties to include the connection URL, username, and password for the target database:
spring.datasource.url=jdbc:postgresql://<url>:<port>/<database> spring.datasource.username=<postgres> spring.datasource.password=<secret>- Note: the values of the username and password can be securely passed in via environment variables at runtime.
- On the command line, navigate to the LLT installation directory and start the service with the following command:
./start.sh
- Confirm the service connects successfully to the external database instance.
- Note that the value for
--license-tracking-urlto be used for Liquibase commands will still be based on the installation location of the LLT process itself, not the backing database location.
- Note that the value for
Docker Configuration
If you are utilizing containers, the configuration can be done differently.
- First, start the database in a container:
export POSTGRES_PORT=5430 docker run \ --name postgres-llt \ -p ${POSTGRES_PORT}:5432 \ -e POSTGRES_PASSWORD=secret \ -d postgres
- Then, start and run the LLT container with settings to point to the database container started:
export SERVER_PORT=8123 docker run -d \ -v $PWD:/db \ -p ${SERVER_PORT}:${SERVER_PORT} \ --env SERVER_PORT=${SERVER_PORT} \ --name llt-container \ -e SPRING_DATASOURCE_URL="jdbc:postgresql://host.docker.internal:${POSTGRES_PORT}/postgres" \ -e SPRING_DATASOURCE_USERNAME="postgres" \ -e SPRING_DATASOURCE_PASSWORD="secret" \ liquibase/liquibase-license-tracking:latest
- The current usage report can then be accessed at the following link, based on the accessible location of the container:
http://<url>:<port>/v1/report
Related Article(s)
Enable Liquibase License Tracking
Comments
0 comments
Article is closed for comments.