ODD Platform
  • Overview
  • Architecture
  • ODDRN
  • Features
  • Use cases
    • Data compliance for Data Scientists
    • Deprecation for Data Engineer \ Analyst
    • Visibility for Data Quality Engineer
    • Data preparation for Visualization Engineer
    • Service Provider and Pre-Sales
  • Configuration and Deployment
    • Try locally
    • Deploy to Amazon Elastic Kubernetes Service (EKS)
    • Configure ODD Platform
    • Enable security
      • Authentication
        • Disabled authentication
        • Login form
        • OAUTH2/OIDC
        • LDAP
      • Authorization
        • Policies
        • Permissions
        • Roles
        • Owners
        • User-owner association
  • Developer Guides
    • API Reference
    • How to contribute
    • GitHub organization overview
    • Build and run
      • Build and run ODD Platform
      • Build and run ODD Collectors
Powered by GitBook
On this page
  • ODD Platform tech stack
  • Prerequisites
  • Build ODD Platform
  • Build ODD Platform into JAR file
  • Build ODD Platform into Docker container
  • Run ODD Platform locally
  • Run ODD Platform as a frontend engineer
  • Run ODD Platform test
Edit on GitHub
  1. Developer Guides
  2. Build and run

Build and run ODD Platform

Developer guide on how to build and run ODD Platform backend and frontend

PreviousBuild and runNextBuild and run ODD Collectors

Last updated 1 year ago

For instructions on how to run the ODD Platform and ODD Collectors locally in a Docker environment, please follow article.

ODD Platform tech stack

ODD Platform tech stack is:

  • Backend

    • Java

    • Gradle

    • for database migrations

    • for integration testing

  • Frontend

    • Typescript

    • React

ODD Platform's backend and frontend are packaged inside one JAR, which is packaged inside one Docker container using .

We believe in contract-first approach. That's why ODD Platform uses OpenAPI generators and jOOQ custom generator over database migrations to create models which are used further in the code.

Prerequisites

Build ODD Platform

git clone https://github.com/{username}/odd-platform.git

Go into the repository's root directory

cd odd-platform

Build ODD Platform into JAR file

Use gradle wrapper to build the platform

./gradlew clean build

Building a project is a good way to check if your code compiles, all tests pass, there's no code smells, etc.

Build ODD Platform into Docker container

Use gradle wrapper to build the platform and containerize it

./gradlew clean jibDockerBuild --image odd-platform:dev -PmultiArchContainerBuild=false

The above command will build a platform and create a local docker container called odd-platform:dev. If you want to change the image name, feel free to change an --image property to what you want.

Above commands will not only build ODD Platform into JAR or Docker container, but also run tests and checkstyle validations. If you want to remove this behaviour, add following properties to the end of a command:

  • -x test — for disabling test runs

  • -x checkstyleMain -x checkstyleTest — for disabling code checkstyle validations

Gradle's clean task deletes generated OpenAPI and jOOQ models and invalidates gradle's build cache, which causes slower builds. If you are not changing an odd-platform-specification OpenAPI and not developing database migrations, the best approach would be to not run this task. Just omit clean word in your commands

Run ODD Platform locally

All commands must be executed in the project's root directory

The easiest way to have ODD Platform at your disposal locally is to:

Launch a PostgreSQL docker container as a ODD Platform's database using docker-compose

docker-compose -f docker/demo.yaml up -d database

Start the application

./gradlew bootRun

Inject some demo metadata into your local ODD Platform.

You'd need to install Python 3.8+ in order to run this.

PLATFORM_HOST_URL=http://localhost:8080 APP_PATH=./docker/injector python docker/injector/inject.py

Run ODD Platform as a frontend engineer

We understand that frontend engineers might not want to install heavy prerequisites such as Java only for make changes in the UI. Here is one of the ways how to run fully functional ODD Platform in Docker:

Launch Docker container with ODD Platform, database and inject demo metadata using docker-compose:

docker-compose -f docker/demo.yaml up -d odd-platform-enricher
odd-platform:
  image: <Put your image here>
  restart: always
  environment:
    - SPRING_DATASOURCE_URL=jdbc:postgresql://database:5432/${POSTGRES_DATABASE}
    - SPRING_DATASOURCE_USERNAME=${POSTGRES_USER}
    - SPRING_DATASOURCE_PASSWORD=${POSTGRES_PASSWORD}
  depends_on:
    - database
  ports:
    - 8080:8080

Go into UI folder

cd odd-platform-ui

Run UI development server

VITE_DEV_PROXY=http://localhost:8080/ pnpm start

Now you should have UI development server at your disposal at http://localhost:3000

Run ODD Platform test

To run backend tests simply execute the following command:

./gradlew test

To run frontend tests execute the following command in odd-platform-ui folder:

pnpm test

preferably the latest

Java 17 (consider using for that)

and (consider using for that)

a repository if you haven't done it already.

Now you should have ODD Platform with demo metadata injected at your disposal at http://localhost:8080. If you want to reconfigure default settings, please take a look at page.

Or if you want to have the latest platform version from main or any branch, and replace odd-platform image with created one in docker/demo.yaml compose file and run it using command above:

Try locally
Spring WebFlux
jOOQ
Flyway
Testcontainers
JIB
Docker Engine 19.03.0+
docker-compose
SDKMAN
Node 18.16.0
pnpm 8.4.0
nvm
Configure ODD Platform
build it
Fork and clone