Interface CognosSource
- All Known Implementing Classes:
CognosSource.InstallVolume, CognosSource.PrivateImage, CognosSource.Zip, CognosSource.ZipUrl
public sealed interface CognosSource
permits CognosSource.PrivateImage, CognosSource.InstallVolume, CognosSource.Zip, CognosSource.ZipUrl
Where a
CognosContainer gets IBM Cognos Analytics from.
The cognos-server image contains no IBM software, so every container needs one
of these. Cognos writes into its install while it runs, so unlike TM1 an install can't
be mounted read-only and shared: a CognosSource.PrivateImage is the fastest source, and safe
for containers in parallel, because Docker gives each container its own copy-on-write
copy. The zip sources install Cognos into every new container (about a minute, and 10
GB).
discover() finds one from the environment. Each setting is read first as a
system property and then as an environment variable, under the same name. The names
match the cognos-server image's settings. The first source found wins, in this
order:
COGNOS_PRIVATE_IMAGE: an image with Cognos built in (CognosSource.PrivateImage)COGNOS_INSTALL_VOLUME: a Docker volume holding an install (CognosSource.InstallVolume)COGNOS_ZIP_DIR, optionally withCOGNOS_ZIP: a folder holding IBM's repository zip, and the file name to use from it (CognosSource.Zip)COGNOS_ZIP_URL, optionally withCOGNOS_ZIP_SHA256: a download link for the zip (CognosSource.ZipUrl)TM1_BUNDLE_DIR, if it also holds a Cognos zip (orCOGNOS_ZIPnames one in it): the same downloads folder as TM1
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final recordA named Docker volume holding a Cognos install made by the image'sinstallcommand.static final recordAn image built oncognos-serverwith Cognos inside (see the image'sexamples/private-image), from a private registry or only on your machine.static final recordA folder holding IBM'scasrv-*-linuxi38664h.zip, mounted read-only.static final recordA download link for IBM's Cognos repository zip, such as a pre-signed S3 URL. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA Docker volume holding an install, forCognosSource.InstallVolume.static final StringAn image with Cognos built in, forCognosSource.PrivateImage.static final StringThe zip's file name within the zip folder; the newest one if unset.static final StringA folder holding IBM's Cognos repository zip, forCognosSource.Zip.static final StringThe SHA-256 to check theZIP_URLdownload against; optional.static final StringA download link for IBM's Cognos repository zip, forCognosSource.ZipUrl. -
Method Summary
Modifier and TypeMethodDescriptiondescribe()A short description for logs and messages.static Optional<CognosSource> discover()Finds a source from system properties and environment variables.static Optional<CognosSource> Finds a source usinglookupto read each setting.
-
Field Details
-
PRIVATE_IMAGE
An image with Cognos built in, forCognosSource.PrivateImage.- See Also:
-
INSTALL_VOLUME
A Docker volume holding an install, forCognosSource.InstallVolume.- See Also:
-
ZIP_DIR
A folder holding IBM's Cognos repository zip, forCognosSource.Zip.- See Also:
-
ZIP
The zip's file name within the zip folder; the newest one if unset.- See Also:
-
ZIP_URL
A download link for IBM's Cognos repository zip, forCognosSource.ZipUrl.- See Also:
-
ZIP_SHA256
-
-
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.
-