apiconnect-init-datapower-gateway v1.0.3
apiconnect-init-datapower-gateway
This package automates the building of the ibm-apiconnect-toolkit/datapower-* Docker images. While, this can also be
accomplished by running apic start in an API Connect project that defines an API configured to run with datapower-gateway,
this approach has several advantages:
User experience: Because of the underlying implementation of
apic start, the initial build phase is not visible to the user. While it is usually preferable to not expose users to the interal machinations of a process, the build phase's duration in unreasonably long. Especially when downloading the DataPower Docker images. Becauseapic startdoes not provide any feedback to the user, it can give users the impression that it has frozen when, in reality, it is silently progressing.Less cryptic failures: Because we are not obscuring the output of the build operations, it is much easier to determine what is causing failures
Installation
npm install -g apiconnect-init-datapower-gatewayUsage
Build options
Once installation is complete, the package can be executed with the apic-init-dp command. There are three optional
build types:
v5-- Install and build the current API Connect v5 gatewayFor example:
apic-init-dp v5experimental-- Install and build the experimental preview of the API Connect reboot gatewayFor example:
apic-init-dp experimentalall-- Install and build both the v5 and experimental gatewaysFor example:
apic-init-dp allThis is equivalent to using both
v5and theexperimentalflags:# Same thing as `apic-init-dp all` apic-init-dp v5 experimental
The default behavior (i.e., running without any options) is equivalent to
apic-init-dp v5System validation
By default, apic-init-dp will perform a platform-specific system validation before attempting to download and build
any Docker images. This essentially amounts to checking that the correct versions of Docker and docker-compose are
installed and that Docker has enough resources to run the DataPower images.
If validation fails, apic-init-dp immediately halts, and an explanation is printed on the screen, along with
platform-specific instructions for resolving the issue.
If you wish to skip the validation step, run with the --no-validation flag. For example:
apic-init-dp all --no-validationAlternatively, if you wish to run with validation failures printed, but without halting the script, run with the
--warn-validation flag. For example:
apic-init-dp all --warn-validationA couple things to keep in mind:
If validation errors are ignored, the actual initialization steps may fail for the same reasons that validation failed, but with less helpful information.
--no-validationtakes precedence over--warn-validation. Thus,apic-init-dp all --no-validation --warn-validationis equivalent to
apic-init-dp all --no-validation
Uninstallation
Once you have installed the images, feel free to uninstall apic-init-dp:
npm uninstall -g apiconnect-init-datapower-gatewayFuture Work
- Container reachability network tests: We have observed, on Linux systems with marginally unconventional network settings, containers may not be able to establish connections with open ports on the host system. We would like to add several simple tests with network connections to and from containers, which would run before actually installing the DataPower images.
8 years ago