Check for new replies
Thread Rating:
  • 22 Vote(s) - 3.36 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IBM DataPower Gateway for Docker(developer version) in Windows 7
#1
Datapower initially was a firmware device and the only way somebody could practice or learn was by having access to an actual appliance.

Over time IBM has come up with Virtual appliance which could be deployed on a Virtual machine(VM).

And Now IBM has come up with "DataPower Gateway for Docker" and its really really easy to setup a development environment in your personal computer.

So you might wonder what is docker..?Smile

As per the official documentation this is what it says..

  "Docker containers wrap a piece of software in a complete file system that contains everything needed to run: code, runtime, system tools, system libraries – anything that can be installed on a server. This guarantees that the software will always run the same, regardless of its environment."

Apparently docker is lightweight and use less RAM as well. Anyways I don't know much on docker,  do post If you guys have more knowledge on docker..Smile It sounds exciting as well.

So you see what has IBM done here right..? Smile They have packaged the datapower as a docker image. 
So all you have to do is install docker , pull the docker image , run a few commands to accept the license , set the WebGUI port, set the path for datapower config, and the local folders and we are done. 

However I had a slight hiccup and most of you might have as well.

Docker runs directly if you have a Linux or MAC or Windows 10 version, Unfortunately I am still on windows 7.
To overcome this inconvenience you need Docker Toolbox!. Docker toolbox is a docker container which runs in Oracle VM virtual box.

So basically docker is run from a VM since it doesnt run directly in Windows 7. 

The setup is a follows.

Step 1) Go to https://www.docker.com/products/docker-toolbox. Install docker toolbox there(Do the default Next, Next thing in windows for any software installation) Big Grin .

Step 2) Open the docker quickstart terminal from start menu or desktop.(you should see this once the docker installation is complete).This will run some scripts and setup a new local subnet for the Docker network. You’ll be asked several times for permissions to allow the operations, just click Yes to all.

Step 3) Once completed, you’ll see the Docker Whale and take note of the IP address (in my case 192.168.99.100). (You don't have to worry if you don't remember the IP in future. You can find it by running a command which I will show later). 

[Image: img>.png]


Step 4)Pull the DataPower image from Github by executing “docker pull ibmcom/datapower”.

[Image: tmBn595.png.png]

Step 5)Datapower needs a minimum of 4GB RAM and 2 CPU processors. But the Oracle VM Virtual Box's default configuration doesn't satisfy this. So we will have to stop the docker image(Stopping is very important.If not changing the settings of VM will not be enabled).

Command to stop docker image :  “docker-machine stop”

[Image: iql6YnA.png]

Step 6)Launch Oracle VM Virtual box from your Start menu or Desktop. Make sure the default machine is “Powered off” and the right-click it and chose “Settings” from the menu and go to System on the left panel.

      [Image: pGcRZcm.png]

 a) Increase the memory to 4096 MB.

     [Image: VLcuHo1.png]

 b) Click on “Processor” and set it to 2

      [Image: fXaqsHX.png]

 c) Click on Ok to apply the settings.



Step 7) Open docker command window.  Start the docker image.

Command to start docker image :  “docker-machine start”
[Image: 3zuTOir.png]

Step 8) Now that docker image is running successfully, its time to start datapower container inside docker.

Run the below command.

docker run -it \
   -v $PWD/config:/drouter/config \
   -v $PWD/local:/drouter/local \
   -e DATAPOWER_ACCEPT_LICENSE=true \
   -e DATAPOWER_INTERACTIVE=true \
   -p 9090:9090 \
   -p 9022:22 \
   -p 5554:5554 \
   --name idg \
   ibmcom/datapower.

The DataPower config:/// and local:/// directories are in the image as /drouter/config and /drouter/local. When you write mem or Save Configuration, the resulting files will be written to the volumes. 

In this case $PWD points to C:\Users\vinyas. So the datapower config:/// and local:/// directories get saved in C:\Users\vinyas\config and C:\Users\vinyas\local folders. Every time datapower docker image starts, it picks up the configuration from this location. (IF you change XSLT's or any such files diretly here and then start your datapower image, it directly picks up the new files. You dont have to upload the files in datapower File management)

[Image: ZC37H2l.png]

Step 9) Once the command runs and the cursor doesnt move anymore , Hit in ENTER button. Smile This takes you to the datapower login.If you don’t hit enter you won’t see the login!

The login with credentials admin/admin.

Step 10)To start the Web management interface , hit the below commands in docker cmd.

Type “co” and hit Enter to enter configuration mode and then “web-mgmt 0 9090”

Note: Sorry , forgot to take screenshot while doing this.

Step 11) Now you need your Docker IP which was visible by the Whale initially. If you have forgotten or didn’t see it, just start another Docker CMD window and hit command “docker-machine ip”.

Now open your browser and go to https://[your-docker-machine-IP]:9090/

[Image: euOk2qI.png]

Login with admin/admin again! 

Aaaand we are good to go. Thank you IBM for making this happen.


Note: The next time you need to stop or start datapower image. Hit the below commands.

Use “docker ps -a” to list all existing container.
[Image: WBribSm.png]

Use “docker start 5a82cd5176d6" to start the container 5a82cd5176d6.
[Image: 3zuTOir.png]

Use “docker stop 5a82cd5176d6" to start the container 5a82cd5176d6.

[Image: p2ANIXi.png]

Cheers,
Vinyas
Reply

Check for new replies

Forum Jump:


Users browsing this thread: 1 Guest(s)