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-mgmt-lite-datapower

v1.1.10

Published

Using docker-compose start DataPower and some minimal API Connect Management server functions to aid in the test and development of APIs using the toolkit and DataPower specific policies

Downloads

96

Readme

Running DataPower via apic start

Using docker-compose start DataPower and some minimal API Connect Management server functions to aid in the test and development of APIs using the toolkit and DataPower

Learn more about the developer toolkit here

Install Docker and Docker Compose

Mac Install

Windows Install

Linux Install

Install the API Connect Toolkit

npm install apiconnect -g

Note: When installing as part of apiconnect from the pre-staging registry for development testing, be sure to include the --no-shrinkwrap flag.

Create a new project

mkdir ~/demo; cd ~/demo
apic loopback # pick the defaults
<edit definitions/demo.yaml and add gateway: datapower-gateway as shown below>
apic start 
<after sometime>
apic services
curl -k https://127.0.0.1:4002/api/Messages/greet -H "X-IBM-Client-Id: default" -H "X-IBM-Client-Secret: SECRET"

Add gateway: to definitions/demo.yaml, should look like this:

assembly:
  execute:
    - invoke:
        target-url: $(runtime-url)$(request.path)$(request.search)
gateway: datapower-gateway

Connect to the DataPower GUI

Use docker ps to determine the WebUI port

tonyf-mbp-ibm:apiconnect-mgmt-lite-datapower tonyf$ docker ps
CONTAINER ID        IMAGE                                                     COMMAND                CREATED             STATUS              PORTS                                                                                            NAMES
348cc421ba0d        ibm-apiconnect-toolkit/datapower-api-gateway:1.0.0        "/bin/drouter"         33 minutes ago      Up 5 minutes        0.0.0.0:32770->80/tcp, 0.0.0.0:4002->443/tcp, 0.0.0.0:32769->5554/tcp, 0.0.0.0:32768->9090/tcp   demo_datapower-api-gateway_1
000f9841f325        ibm-apiconnect-toolkit/datapower-mgmt-server-lite:1.0.0   "node lib/server.js"   33 minutes ago      Up 5 minutes                                                                                                         demo_datapower-mgmt-server-lite_1

In this case... https://0.0.0.0:32768

Running with API Connect v6 DataPower Gateway (experimental)

Login to Artifactory with Docker

In order to download the experimental v6 DataPower Gateway, you must sign-in to our Artifactoy repository on Docker:

$ docker login datapower-docker-local.artifactory.swg-devops.com
Username: [email protected]
Password: (your ibm intranet password) 
Login Succeeded

Configure and run your project

In your API Connect project, run the following command to configure the toolkit to use the v6 DataPower Gateway:

apic config:set datapower-api-gateway-experimental=true

Then start the gateway normally, with apic start or through the API Designer.

NOTE: You may need to set the environment variable IBM_APICONNECT_APIC2DP_BAIL_ON_COMPILE_ERROR=false when starting your project if you are testing APIs that use unsupported assembly actions:

IBM_APICONNECT_APIC2DP_BAIL_ON_COMPILE_ERROR=false apic start

Export your project from the API Gateway to deploy on another appliance

While your gateway is still running, run docker ps to determine the WebUI port

$ docker ps
CONTAINER ID        IMAGE                                                     COMMAND                  CREATED             STATUS              PORTS                                                                                            NAMES
cf027b41e7a3        ibm-apiconnect-toolkit/datapower-api-gateway-v6:1.0.5     "/bin/drouter"           17 seconds ago      Up 16 seconds       0.0.0.0:32823->80/tcp, 0.0.0.0:4002->443/tcp, 0.0.0.0:32822->5554/tcp, 0.0.0.0:32821->9090/tcp   myapp_datapower-api-gateway_1
b6946378a75a        ibm-apiconnect-toolkit/datapower-gateway-director:1.0.5   "node lib/gateway-..."   18 seconds ago      Up 17 seconds       0.0.0.0:32820->2443/tcp                                                                          myapp_datapower-gateway-director_1

Now point your browser to the WebUI path, in this case https://0.0.0.0:32821

After logging in as admin, follow these steps:

  1. Find and select Export Configuration
  2. Under Backup and export options, select "Create a backup of one or more domains" and press Next
  3. Under Domains to export, on the Export package screen, select apiconnect and press Download

After your exported configuration has been downloaded, it can be imported into another API Gateway

More Information

For more information about testing API Connect policies locally with the IBM DataPower Gateway, please see our official documentation here.