Skip to content

Configuration Directory & Tasks

Requirments

Windows

  • Eclipse Temuring OpenJDK v11
    • Setup with PATH and JAVA_HOME environment set correctly
  • Just *optional
    • just is a handy way to save and run project-specific commands.
    • see provided justfile for available commands and possibilities
    • must be available in PATH

Container

  • Access required to rodias.azurecr.io/insight-gradle-util:<version> image
    • available by using the provided credentials for other Insight related images

Directories

Build & Tools

Directory Explanation
build Artefacts of build steps
buildSrc, gradle, .gradle-user, .gradle-repo Gradle environment incl. libraries for external build
Jenkinsfile, jenkins Example for CI/CD integration, optional depending on environment
justfile Example for just usage (not availabe in image!)

Configurations

Directory Explanation
backends Definition of available backends, their endpoints and their nodes for fetching data
client-config/config.json Client configuration file
i18n Directory containing customer localizations
library Libraries for business logic of various backends/adapters
schedules Schedule definitions for scripts executions
static-content Static-Content to customize and extend the client
trees Base of use-case configurations, template support available
trees/mapping Definition of mappings between the ui and the configured node of a backend
trees/templates
trees/ui Definition of ui representation of a use-case
trees/maximo Use-Cases for Maximo v2 backend, will be uploaded to treeConfigurations folder
v2 Folder to configure v2 based Maximo backend, must exist

Setup

Gradle & gradle.properties

Gradles main configuration and cache management is controlled through the GRADLE_USER_HOME environment variable. The default value for this is the .gradle folder in the users home directory, independend of the folder/project Gradle is executed. To get a project dependent setup GRADLE_USER_HOME must be defined.

If a relative path is configured, this path is relative to Gradles main project folder.

Examples for gradle.properties in GRADLE_USER_HOME:

file-based Justfile (Windows/Linux)

export ORG_GRADLE_PROJECT_insightRepo := ".gradle-repository"

export ORG_GRADLE_PROJECT_s3Url = http://localhost:9001
export ORG_GRADLE_PROJECT_s3AccessKey = s3_access_key
export ORG_GRADLE_PROJECT_s3Secret = s3_secret
export ORG_GRADLE_PROJECT_s3BucketPrefix = insight-dev
export ORG_GRADLE_PROJECT_mwUrl = http://localhost:8080

file-based properties (Windows)

insightRepo := ".gradle-repository"

s3Url = http://localhost:9001
s3AccessKey = 8nbOhwqd5qklRMDh0QmC
s3Secret = xWWoxZOLzzVZTceqk72LXq5MwvCVVz6Eutoyu8n5
s3BucketPrefix = insdev
mwUrl = http://localhost:8080 - cloud-vm Beispiel:
Optional Maven Repository

by default we use Maven Central for external dependencies. If you want to use an internal Maven proxy you can do so by setting externalRepo.

externalRepo = 'https://nexus.internal.domain.tld/repository/maven-public'

env-based properties (Container, CI/CD)

ORG_GRADLE_PROJECT_s3Url = http://localhost:9001
ORG_GRADLE_PROJECT_s3AccessKey = s3_access_key
ORG_GRADLE_PROJECT_s3Secret = s3_secret
ORG_GRADLE_PROJECT_s3BucketPrefix = insight-dev
ORG_GRADLE_PROJECT_mwUrl = http://localhost:8080
Optional Maven Repository

by default we use Maven Central for external dependencies. If you want to use an internal Maven proxy you can do so by setting ORG_GRADLE_PROJECT_externalRepo.

ORG_GRADLE_PROJECT_externalRepo = 'https://nexus.internal.domain.tld/repository/maven-public'

Tasks

Gradle-Wrapper

Gradle tasks supposed to be run by calling gradlew

Gradle-Tasks

Task Description
tasks List all available Gradle tasks
storageInit create all necessary buckets in the S3 storageInit

must be execute once during setup the environment
uploadClientConfig Generate & Upload client config and static-content
uploadLanguages Upload language translations
uploadLibrary* Build, Upload and Notify adapters for business logic libraries
uploadMaximoConfigurations Upload Maximo UseCases into Maximo treeConfigurations folder
uploadSuiteConfigurations Upload Insight UseCases to middleware
  • * wrapper task configured in build.gradle.kts

S3 storage upload

Most upload tasks put files into S3 buckets:

  • insight-backend
  • insight-config

These names can be prefixed with an installation-specific prefix by setting s3BucketPrefix in the projects gradle.properties file

  • insdev--insight-backend
  • insdev--insight-config

If an S3BucketPrefix is defined here, the corresponding services must be configured by using the env INSIGHT_S3_BUCKET_PREFIX as well.

Library upload

Insight provides the possibilty to implement specific backend routines. The compilation and handling must be done with gradle as well and must happen in the library subfolder. As these library implementations are very specific to a specific project they must be properly configured and can't be prepared for all circumstances.

An example for this is the uploadLibrary task, which is supposed to compile and upload all library code to the corresponding adapters. As the amount and type of adapter vary per customer project this task has to be modified in the build.gradle.kts, so it contains all required dependcies to all sub-tasks in the library folder.

The library projects responsible for uploading must have the same name as their corresponding service running the adapter. As best practice we use the suffix -suite for those names, like business-suite, hxgn-suite, bim-suite, ...

Library Dependencies

Please make sure the corresponding versions in gradle/lib.versions.toml match your Insight version.

Check the release-notes for required version adjustments of plugins provided.

Migration Hints:

Folders:

  • templates/ui => trees/templates
  • raw/ui => trees/ui

Example, structure of template project