This repository contains different deployment templates for Driverless AI (DAI) scorers.
The structure is as follows:
common
: Code shared by multiple deployment templatesswagger
: The shared REST API definitions. Please don't duplicate.rest-{framework}-model/api
: Modules with Java classes autogenerated from the API Swagger definition.transform
: Shared transformers between mojo and API classes.
{target}-scorer
: One module per deployment target.
Note: Please look to each subproject for additional deployment information.
This is a Gradle multi-project repository. To get the resulting distribution archive, run:
$ ./gradlew distributionZip
The result of which is ./build/mlops-dai-runtimes-{CURRENT_VERSION}.zip
, which is in turn integrated in
the DAI build and deployment process.
Note that each of the templates is expected to inject its files in this archive in their respective gradle files. Please see and follow examples in the existing deployment templates.
The ci process for building the above artifacts also performs linting and styling checks, and will fail if there are any issues found. In order test this before pushing to the remote, these checks can be performed locally.
To test builds locally, with respect to linting and styling use the following steps:
- run
./gradlew applySpotless
- this will help clean the code base with proper linting/styling
- run
./gradlew check
- this will run the same check as in Jenkins, to check for styling/linting errors.
- will identify issues such as missing javadoc strings etc.
To upgrade the mojo2 runtime dependency version, just edit the corresponding line in the
gradle.properties
file a push a new version of the deployment templates out as described
above.