IBM Sterling B2B: Install on Docker for Development

From Wiki

Follow this documentation to install Sterling B2B on Docker.

This setup is for development/proof-of-concept and was tested on my MacOs. I will not provide how to install docker on your O.S.

Procedure:

Install DB2 on Docker

Install DB2 on a Docker Container

Create my volumes

mkdir -p ˜/DockerVolumes/mydb2

Run this command

docker pull ibmcom/db2

docker run -d --name mydb2 --privileged=true -p 50000:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=db2inst1 -v ˜/DockerVolumes/mydb2:/database ibmcom/db2

you can check install

docker logs -f mydb2

Create B2B database on DB2

Create a file create_db_b2b62.sql with the following data:

-- *****************************************************************
--
--
--
-- *****************************************************************
-- CODESET UTF-8 is mandatory for B2B
!db2set DB2_SKIPDELETED=ON@
!db2set DB2_SKIPINSERTED=ON@
CREATE DATABASE B2B62 AUTOMATIC STORAGE YES USING CODESET UTF-8 TERRITORY DEFAULT COLLATE USING SYSTEM PAGESIZE 32768@

CONNECT TO B2B62@
CREATE BUFFERPOOL B2B62_04KBP IMMEDIATE SIZE AUTOMATIC PAGESIZE 4K@
CREATE BUFFERPOOL B2B62_08KBP IMMEDIATE SIZE AUTOMATIC PAGESIZE 8K@
CREATE BUFFERPOOL B2B62_16KBP IMMEDIATE SIZE AUTOMATIC PAGESIZE 16K@
CONNECT RESET@

CONNECT TO B2B62@
CREATE USER TEMPORARY TABLESPACE SCCUSERTMP PAGESIZE 32K BUFFERPOOL IBMDEFAULTBP@
CREATE REGULAR TABLESPACE TS_REG04_B2B62 PAGESIZE 4K BUFFERPOOL B2B62_04KBP PREFETCHSIZE AUTOMATIC@
CREATE REGULAR TABLESPACE TS_REG08_B2B62 PAGESIZE 8K BUFFERPOOL B2B62_08KBP PREFETCHSIZE AUTOMATIC@
CREATE REGULAR TABLESPACE TS_REG16_B2B62 PAGESIZE 16K BUFFERPOOL B2B62_16KBP PREFETCHSIZE AUTOMATIC@
CONNECT RESET@

Save file

Copy file to containter

docker cp create_db_b2b62.sql mydb2:/tmp

Connect to Docker container and run db2 commands

docker exec -it mydb2 bash -c "su - db2inst1"

cd /tmp

db2 -td@ -vf ./create_db_b2b62.sql -z ./create_db_b2b62.log

run exit to logoff from container.

Copy jdbc driver to host machine

docker cp mydb2:/opt/ibm/db2/V11.5/java/db2jcc4.jar .
docker cp mydb2:/opt/ibm/db2/V11.5/java/db2jcc_license_cu.jar .

Install Sterling B2B on Docker

Install

You must download container images from Password Advantage site. After you must load Sterling B2B container image to local registry using the following command:

docker load -i STR_B2BI_6.0.2_CONTAINER_MP_ML.tar

Ver também