DataPower Journey part 2 — Containerize

Arthur Magalhaes Fonseca
4 min readJan 30, 2017

--

This is a serie about my experiences with DataPower. You can find the previous posts here:

In the previous post, I wrote how I enter in a DataPower project. I was waiting for permission to use DataPower in my company however as far as I had never seen DataPower I decided to be familiar with its workflow, designer, and structure.

I searched then DataPower on YouTube and I found 2 great Indian channels:

I watched almost all videos and learned a lot, however I needed more… it is complicated be just a spectator. Although those guys are so happy, usually, it is not so fun just watching people do things.

My other problem was I did not want to be a specialist in DataPower installation, I just wanted to be a Developer.

The solution was containerization!

I discovered that DataPower has an Docker image.

If you had never install Docker I wrote a post about my Ubuntu installation.

After installation, you can follow simple steps to execute DataPower in your machine:

First, it is a good idea create a folder to execute the following commands. Two folders will be created in the next steps. So, execute mkdir DataPower and cd DataPower.

After that, you need to download a Docker image from DrockerHub. So, execute docker pull ibmcom/datapower:latest to download the latest DataPower image.

To verify the image you downloaded execute docker images -a.

Next we will create a container of the image we downloaded.

The default login and password are admin.

When we executed Docker we used -it parameters, because of that now we can execute some commands in our container.

Other important parameters and pieces of information that you can see are:

  • -v: Docker parameter to creation of volumes and binding them $PWD/config in our host to /drouter/config in the container and $PWD/local in our host to /drouter/local in the container. Those are the folders we talked early.
  • /drouter/config is the location where DataPower will persist the configuration using an easy to read and editable format.
  • /drouter/local is used to store source files such as JavaScript (GatewayScript), XSLT, key, certificates and so on.
  • -p: Docker parameter to binding machine ports and container ports. In this example, you can see that we are binding 9090 host port to 9090 container port, 9022 host port to 22 container port, 5554 host port to 5554 container port and the 8000–8010 host ports to 8000–8010 container ports.

To run DataPower by a web GUI interface we need to execute configure; web-mgmt 0 9090 9090;

Now, open your browser and execute https://localhost:9090/

In my case, I received an alert from Firefox

If it is your case, click on Advanced button, then on Add Exception button and Confirm Security Exception button… Voilà!

Enter with login and password credentials: admin/ admin.

Just a last tip to finish. DataPower videos and tutorials usually are shown in an old interface. I got lost when I was tried to follow some tutorial steps.

Now the tip that will change your life, after you are logged, enter again with URL https://localhost:9090/ in your browser, the old version of DataPower interface will show.

Now you can choose between the new version interface https://localhost:9090/dp/index.html or the old one https://localhost:9090/.

To be continue

Reference:

--

--

Responses (2)