Installing the Sterling B2B Integrator Docker container

You can use the docker run command to install the Sterling B2B Integrator Docker container.

Before you begin

You must complete all the prerequisite tasks specified. For more information, see Prerequisites for installing Sterling B2B Integrator Docker container.

If you are creating adapter containers, you must install IBM MQ before you create the adapter containers. You must also configure the properties for IBM MQ in the setup.cfg file. For more information, see Configuring the B2Bi container.

Ensure that the following items are saved on each node.

Note: All items must be saved in the same folder <local dir>.

For information about Docker deployment parameters, see Docker deployment parameters.

Procedure to install with a non-root user

You can add a non-root user to the Sterling B2B Integrator Docker image.

The Sterling B2B Integrator Docker image comes with a default non-root user with name/uid as b2biuser/1010 respectively.

By default, the Docker container starts the Sterling B2B Integrator application services with the b2biuser. This user also owns the mapped trace folder.

Note: For the default user in the Docker container to be able to access the configurations and resources from the host folder path mapped to /ibm/resources, all the folders in that path should have an execute ‘x’ permission and all the files should have a read ‘r’ permission for others.

Follow these steps to install the Sterling B2B Integrator Docker container with the currently logged in user or any other user on the host:

1. Copy the contents shown below to a file named as Dockerfile and place it on a host that has Docker installed.

 

				
					FROM b2bi:latest

ARG USER_ID
ARG GROUP_ID
USER root
RUN if [ ${USER_ID:-0} -ne 0 ] && [ ${GROUP_ID:-0} -ne 0 ]; then \
    userdel -f b2biuser && \
    if getent group b2bigroup ; then groupdel b2bigroup ; fi && \
    groupadd -g ${GROUP_ID} b2bigroup && \
    useradd -r -u ${USER_ID} -m -s /sbin/nologin -c "B2BI user" -g b2bigroup b2biuser && \
    install -d -m 0755 -o b2biuser -g b2bigroup /home/b2biuser && \
    chown --silent --no-dereference --recursive \
          --from=1010:1010 ${USER_ID}:${GROUP_ID} \
        /home/b2biuser \
        /ibm/ && \
    chown -R ${USER_ID}:${GROUP_ID} /ibm/trace \
;fi
        
USER b2biuser
				
			

2. Edit the Dockerfile to change the repository and tag name from b2bi:latest to the appropriate repository and tag name for the Sterling B2B Integrator image you downloaded.

3. Run the following command to extend the Sterling B2B Integrator Docker image to include the host user:

 

				
					docker build -t ${desired tag}:${product version} --build-arg USER_ID=${host user id} --build-arg GROUP_ID=${host user group id} ${path/to/dockerfile}

				
			

Note: The build arguments host_user_id and host_user_group_id should be the uids for the selected host user and group.

4. Use the new Docker image id/tag as the <image-id> in all the subsequent Docker installation commands.

Procedure if you are using Host Network

1. If you are installing the first node of a cluster or if you are installing in a non-clustered environment, run the following command to set up Sterling B2B Integrator1. :

				
					For Host network:
docker run -e LICENSE="accept" -e KEY=<key> -e TZ=<Time Zone> -d --name=<container name> --net=host 
-v <local dir>:/ibm/resources <image-id> b2bi_run all 1
				
			

For more information about parameters, see Docker deployment parameters.

2. If you are installing the additional nodes of a cluster, run the following command to set up Sterling B2B Integrator:

				
					For Host network:
docker run -e LICENSE="accept" -e KEY=<key> -e TZ=<Time Zone> -d --name=<container name> --net=host 
-v <local dir>:/ibm/resources <image-id> b2bi_run all <nodenumber>
				
			

Procedure if you are using Overlay Network

1. If you are installing the first node of a cluster, run the following command to set up Sterling B2B Integrator:

				
					For Overlay network:
docker run -e LICENSE="accept" -e KEY=<key> -e TZ=<Time Zone> -d --name=<container name>
--net=<name of the overlay network> --ip=<IP address> --hostname="<hostname>" 
-p <port range> -v <path to setup.cfg>:/ibm/resources <image-id> b2bi_run all 1
				
			

For more information about other parameters, see Docker deployment parameters.

2. If you are installing the additional nodes of a cluster, run the following command to set up Sterling B2B Integrator:

				
					For Overlay network:
docker run -e LICENSE="accept" -e KEY=<key> -e TZ=<Time Zone> -d --name=<container name>
--net=<name of the overlay network> --ip=<IP address> --hostname="<hostname>" 
-p <port range> -v <path to setup.cfg>:/ibm/resources <image-id> b2bi_run all <nodenumber>
				
			

Procedure if you are using Vertical Clusters with bridge network

If you are using vertical clusters, ensure that all nodes have separate ports and they are added to the setup.cfg file for each node.

1. If you are installing the first node of a cluster, run the following command to set up Sterling B2B Integrator:

				
					For vertical clusters with port mapping:
docker run -e LICENSE="accept" -e KEY=<key> -e TZ=<Time Zone> -d --name=<container name> 
--net=<network name> -p <port range 1> -v <path to setup.cfg for node 1>:/ibm/resources
<image-id> b2bi_run all 1
				
			

For more information about other parameters, see Docker deployment parameters.

2. If you are installing the additional nodes of a cluster, run the following command to set up Sterling B2B Integrator:

				
					For vertical clusters with port mapping:
docker run -e LICENSE="accept" -e KEY=<key> -e TZ=<Time Zone> -d --name=<container name> 
--net=<network name> -p <port range n> -v <path to setup.cfg for node n>:/ibm/resources
<image-id> b2bi_run all <nodenumber>
				
			

Procedure if you are using Vertical Clusters with Host Network

If you are using vertical clusters, ensure that all nodes have separate ports and they are added to the setup.cfg file for each node.

1. If you are installing the first node of a cluster, run the following command to set up Sterling B2B Integrator:

				
					For vertical clusters with Host Network:
docker run -e LICENSE="accept" -e KEY=<key> -e TZ=<Time Zone> -d --name=<container name> 
--net=host -v <path to setup.cfg for node 1>:/ibm/resources
<image-id> b2bi_run all 1
				
			

For more information about other parameters, see Docker deployment parameters.

2. If you are installing the additional nodes of a cluster, run the following command to set up Sterling B2B Integrator:

				
					For vertical clusters with Host Network:
docker run -e LICENSE="accept" -e KEY=<key> -e TZ=<Time Zone> -d --name=<container name> 
--net=host -v <path to setup.cfg for node 2>:/ibm/resources
<image-id> b2bi_run all <nodenumber>
				
			

Viewing logs

1. To view the logs, use the following commands:

				
					docker logs <container ID>
				
			

To view incremental logs, use:

				
					docker logs -f <container ID>
				
			
Share Blog Post
Share on linkedin
Share on twitter
Share on facebook
Share on email
Pragmaede
4.5/5
Published on: 03-19-21
Pragma Edge, IBM Gold Partner, IBM, Pragmaedge

Processor Value Units (PVUs)

A Processor Value Unit (PVU) is a unit of measure used to differentiate licensing of software on distributed processor technologies (defined by Processor Vendor, Brand, Type and Model Number).

Read More »

Please Join us
On April 21 2021, 11 AM CT

Pragma edge, Sterling integrator, Webinar,