Generate deployment patterns
The generateImages.sh script allows you to build independent images for
each application.
The --WAR_FILES argument of generateImages.sh supports comma
(,) for the separated list of applications. For grouping the applications, it supports colon
(:).
For example, consider
--WAR_FILES=smcfs,sbc:wsc,sma:isccs that results in the
following images:om-appimage that containssmcfsandsbcWAR filesom-app-sma_wscimage that containswscandsmaWAR filesom-app-isccsimage that containsisccsWAR files
Image naming convention
With reference to the example provided in the previous sections, the following naming convention
is used for the generated images:
- The name for images that contain
smcfsWAR file is alwaysom-app, irrespective of how many WAR files are combined with it so that the images generated are backward compatible in terms of the image name. - The name for images that contain WAR files other than
smcfsWAR is computed by combining alphabetically sorted WAR file names with an underscore (_) and appended to the nameom-appwith a hyphen (-). For example, the groupwsc,sma,isccsresults in an image namedom-app-isccs_sma_wsc.
Optimizing om-app image layers
The image build process has been optimized to build images with a specific structure, such that
the overall image size is reduced even though multiple om-app images are built.
An intermediate image is built that contains all the common content for the
om-app images. This intermediate image is used to build the final
om-app images that results in reduced overall image download size.
The
om-app image layer optimizations offer the following benefits:- Saves the build time by pulling the Liberty image only once.
- Saves space by combining Liberty dependencies along with the application libraries (JARs) into a single intermediate image.
- Improves the application deployment time as the libraries are present in their own image layer and shared across different application images.