Interface Tm1EngineSource
- All Known Implementing Classes:
Tm1EngineSource.Bundle, Tm1EngineSource.BundleUrl, Tm1EngineSource.InstallDir, Tm1EngineSource.InstallVolume, Tm1EngineSource.PrivateImage
public sealed interface Tm1EngineSource
permits Tm1EngineSource.PrivateImage, Tm1EngineSource.InstallDir, Tm1EngineSource.InstallVolume, Tm1EngineSource.Bundle, Tm1EngineSource.BundleUrl
Where a
Tm1EngineContainer gets TM1 v12 from.
The tm1-engine image contains no IBM software, so every container needs one of
these. They mirror the image's own sources (see the image's README), and
Tm1Source, which does the same for TM1 11.
discover() finds one from the environment, so tests don't hard-code paths.
Each setting is read first as a system property and then as an environment variable,
under the same name. The first source found wins, in this order:
TM1_ENGINE_PRIVATE_IMAGE: an image with TM1 built in (Tm1EngineSource.PrivateImage)TM1_ENGINE_HOME_DIR: an install the image made, as a folder (Tm1EngineSource.InstallDir)TM1_ENGINE_INSTALL_VOLUME: a Docker volume holding such an install (Tm1EngineSource.InstallVolume)TM1_ENGINE_BUNDLE_DIR, optionally withTM1_ENGINE_BUNDLE: a folder holding IBM's package, and the file name to use from it (Tm1EngineSource.Bundle)TM1_ENGINE_BUNDLE_URL, optionally withTM1_ENGINE_BUNDLE_SHA256: a download link for the package (Tm1EngineSource.BundleUrl)TM1_BUNDLE_DIR, TM1 11's downloads folder, when it holds a TM1 v12 package too: one folder then serves both versions
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA folder holding IBM'stm1-v<version>-standalone-linux.tgz, mounted read-only.static final recordA download link for IBM's package, such as a pre-signed S3, R2 or GCS URL.static final recordA TM1 v12 install thetm1-engineimage made (installas its command), as a folder: the one containingbin/tm1sd.exe.static final recordA named Docker volume holding an install thetm1-engineimage made.static final recordAn image built ontm1-enginewith TM1 inside, from a private registry. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe package's file name withinBUNDLE_DIR; the newest one if unset.static final StringA folder holding IBM's package, forTm1EngineSource.Bundle.static final StringThe SHA-256 to check theBUNDLE_URLdownload against; optional.static final StringA download link for IBM's package, forTm1EngineSource.BundleUrl.static final StringAn install the image made, as a folder, forTm1EngineSource.InstallDir.static final StringA Docker volume holding an install, forTm1EngineSource.InstallVolume.static final StringSettings read bydiscover(), in the order they're tried. -
Method Summary
Modifier and TypeMethodDescriptiondescribe()A short description for logs and messages.static Optional<Tm1EngineSource> discover()Finds a source from system properties and environment variables.static Optional<Tm1EngineSource> Finds a source usinglookupto read each setting.
-
Field Details
-
PRIVATE_IMAGE
Settings read bydiscover(), in the order they're tried.- See Also:
-
HOME_DIR
An install the image made, as a folder, forTm1EngineSource.InstallDir.- See Also:
-
INSTALL_VOLUME
A Docker volume holding an install, forTm1EngineSource.InstallVolume.- See Also:
-
BUNDLE_DIR
A folder holding IBM's package, forTm1EngineSource.Bundle.- See Also:
-
BUNDLE
The package's file name withinBUNDLE_DIR; the newest one if unset.- See Also:
-
BUNDLE_URL
A download link for IBM's package, forTm1EngineSource.BundleUrl.- See Also:
-
BUNDLE_SHA256
The SHA-256 to check theBUNDLE_URLdownload against; optional.- See Also:
-
-
Method Details
-
describe
String describe()A short description for logs and messages. Never includes a URL's query string.- Returns:
- the description
-
discover
Finds a source from system properties and environment variables. See the class docs.- Returns:
- the source, or empty if none is configured
- Throws:
IllegalArgumentException- if a setting is present but invalid
-
discover
Finds a source usinglookupto read each setting. Blank values count as unset.- Parameters:
lookup- reads a setting by name, returningnullif it's unset- Returns:
- the first source found, or empty if none is configured
- Throws:
IllegalArgumentException- if a setting is present but invalid, such as a folder that doesn't exist. A wrong setting fails rather than silently skipping the tests.
-