npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

apiconnect-init-datapower-gateway

v1.0.3

Published

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 app

Downloads

127

Readme

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. Because apic start does 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-gateway

Usage

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 gateway

    For example:

    apic-init-dp v5
  • experimental -- Install and build the experimental preview of the API Connect reboot gateway

For example:

apic-init-dp experimental
  • all -- Install and build both the v5 and experimental gateways

    For example:

    apic-init-dp all

    This is equivalent to using both v5 and the experimental flags:

    # 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 v5

System 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-validation

Alternatively, 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-validation

A 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-validation takes precedence over --warn-validation. Thus,

    apic-init-dp all --no-validation --warn-validation

    is 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-gateway

Future 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.