Pragma Edge — Powering your connected enterpriseLet's connect ↗
PRAGMA EDGE / BLOG

Installing the Sterling B2B Integrator Docker container

Installing Sterling B2B Integrator Docker container - If you are creating adapter containers, you must install IBM MQ before you create the adapter containers

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

Before you begin

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

If you are creating adapter containers, you mustinstall IBM MQbefore 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>.

  • The downloaded Sterling B2B Integrator Docker image.
  • The database driver jar file.
  • The setup.cfg file.
  • JCE Policy(Optional)
  • IBM MQ keys(Optional)
  • Liberty keys(Optional)

For information about Docker deployment parameters, seeDocker deployment parameters.

Procedure to install with a non-root user

You can add a non-root user to theSterling B2B IntegratorDocker image.

TheSterling B2B IntegratorDocker image comes with a default non-root user with name/uidas b2biuser/1010respectively.

By default, the Docker container starts theSterling B2B Integratorapplication 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 theSterling B2B IntegratorDocker 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 ] &amp;&amp; [ ${GROUP_ID:-0} -ne 0 ]; then \ userdel -f b2biuser &amp;&amp; \ if getent group b2bigroup ; then groupdel b2bigroup ; fi &amp;&amp; \ groupadd -g ${GROUP_ID} b2bigroup &amp;&amp; \ useradd -r -u ${USER_ID} -m -s /sbin/nologin -c "B2BI user" -g b2bigroup b2biuser &amp;&amp; \ install -d -m 0755 -o b2biuser -g b2bigroup /home/b2biuser &amp;&amp; \ chown --silent --no-dereference --recursive \ --from=1010:1010 ${USER_ID}:${GROUP_ID} \ /home/b2biuser \ /ibm/ &amp;&amp; \ chown -R ${USER_ID}:${GROUP_ID} /ibm/trace \ ;fi USER b2biuser  

2.Edit the Dockerfileto 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=&lt;key&gt; -e TZ=&lt;Time Zone&gt; -d --name=&lt;container name&gt; --net=host -v &lt;local dir&gt;:/ibm/resources &lt;image-id&gt; b2bi_run all 1  

For more information about parameters, seeDocker 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=&lt;key&gt; -e TZ=&lt;Time Zone&gt; -d --name=&lt;container name&gt; --net=host -v &lt;local dir&gt;:/ibm/resources &lt;image-id&gt; b2bi_run all &lt;nodenumber&gt;  

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=&lt;key&gt; -e TZ=&lt;Time Zone&gt; -d --name=&lt;container name&gt; --net=&lt;name of the overlay network&gt; --ip=&lt;IP address&gt; --hostname="&lt;hostname&gt;" -p &lt;port range&gt; -v &lt;path to setup.cfg&gt;:/ibm/resources &lt;image-id&gt; b2bi_run all 1  
  • The port range starts with the initial port number that is specified in setup.cfg for this node. The suggested port range is for a range of 200 port numbers but can change based on application requirements. For example, if the INITIAL_PORT is set to 40000, the port range will be 40000-40200:40000-40200.
  • It is recommended that you provide the IP address during the overlay network container creation. This assigns the IP address from the overlay network range to the container that is created and maintains the same IP each time you stop and start the container. If the IP address is not provided when the container is created, a new IP is assigned to the container each time you stop and start the container.
  • It is recommended that you provide the hostname when you create the container. If the hostname is not provided, the containerID is added as the hostname.

For more information about other parameters, seeDocker deployment parameters.

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

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.

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

Procedure if you are using Vertical Clusters with Host Network

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

Viewing logs

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

docker logs &lt;container ID&gt;  

To view incremental logs, use:

docker logs -f &lt;container ID&gt;  
TURN IDEAS INTO ACTION

Make the next step specific.

Bring your operating context, priorities and questions. We’ll help identify the relevant next step.

Start a conversation ↗
Services and Accelerators →Technologies We Support →More perspectives →
Pragma Edge / Let’s Connect

Start a conversation.

Tell us what you’re working on. We’ll help shape the next step.

Your inquiry goes directly to the Pragma Edge sales team.

Or email sales directly