B2B Integration

 View Only
Expand all | Collapse all

Docker - B2Bi Installation

  • 1.  Docker - B2Bi Installation

    Posted Sun June 28, 2020 01:31 PM
    Hello All,

    Does anyone try installing B2Bi using a docker image? I'm seeing below error, I appreciate it if you share your experiences.

    No matter how I specify DB_VENDOR and INITIAL_PORT info on configuration file, it keeps complaining about it saying - specify valid values for these parameters. Also, says that it can't copy jdbc.jar file - cp: cannot stat '/ibm/resources/ojdbc7.jar\r': No such file or directory.

    ------------------------------
    Rajasekhar Muthamsetty
    ------------------------------

    #SupplyChain
    #B2BIntegration


  • 2.  RE: Docker - B2Bi Installation

    Posted Mon June 29, 2020 02:24 AM
    Hi Rajasekhar,

    How are you specifying the resource folder path? Are you using any persistence volume or providing path directly?

    Can you share the configuration parameter and your local ptah for jar files.

    If its normal doecker then you have to specify path as below:
    -v <path to setup.cfg>:/ibm/resources

    ------------------------------
    Shreekant Prasad
    ------------------------------



  • 3.  RE: Docker - B2Bi Installation

    Posted Mon June 29, 2020 07:20 AM
    Please do share the setup.cfg and in the DB deployment command are you passing the your db.jar file location :/ibm/resources?
    -v <local dir>:/ibm/resources

    ------------------------------
    Peer Ahmed Shaik
    ------------------------------



  • 4.  RE: Docker - B2Bi Installation

    Posted Mon June 29, 2020 09:48 AM
    Two mistakes I made that stumped me for a while which resulted in similar errors.

    One was that for Docker the tarball must be at the lowest before doing a docker image import e.g.

    docker image import {This is your folder}\STER_B2B_INT_CERT_CONT_V6.0.3_ML.tar b2bi:603

    what I mean often it's the Docker Image in a tar in a tar. All seems to work fine in the main but you get .. cannot find /ibm/resources.... which sent me down a whole rabbit hole of searching ... seems a strange mistake to make but difficult to spot ... this may be your problem.

    Second is to make sure the volume is correct and all lower case in the docker command

    docker run -e LICENSE="accept" -e TZ="GB" -d --name=CoreB2B --net=host -v {This is your folder no ending slash}:/ibm/resources {your B2Bi Image ID} b2bi_setup deploy_db

    This may help with your issue.




    ------------------------------
    Chris Thorpe
    ------------------------------



  • 5.  RE: Docker - B2Bi Installation

    Posted Mon June 29, 2020 01:40 PM
    Thank you all,

    Here is the commands I ran,
    To load image - docker load -i STR_B2BI_6.0.3_CONTAINER_MP_ML.tar
    To initialize DB - docker run -e LICENSE="accept" -e KEY=4254514F6C6C2B594650496373422B764D66584E54673D3D -e TZ="Asia/Kolkata" -d --name=b2bi --net=host -v /home/centuser/Downloads:/ibm/resources 945978e8d387 b2bi_setup deploy_db 1
    All files jar, setup.cfg and jce files are placed in - /home/centuser/Downloads

    SYSTEM_PASSPHRASE=ENCRYPTED:JzcFFyVKLOlBLKNcWGQgDw==SYSTEM_PASSPHRASE=ENCRYPTED:JzcFFyVKLOlBLKNcWGQgDw==
    DB_USER=system
    DB_PASSWORD=ENCRYPTED:tn1irj+MWjehzxXzLhk7aw==
    DB_HOST=localhost
    DB_PORT=1521
    DB_DATA=xe
    DB_CREATE_SCHEMA=true
    ORACLE_USE_SERVICE_NAME=true
    ADMIN_EMAIL_ADDRESS=none@nohost.com
    SMTP_HOST=nohost
    UPDATE_JCE_POLICY_FILE=false
    JCE_POLICY_FILE=unrestrictedpolicyfiles.zip
    INITIAL_PORT=6535
    DB_VENDOR=Oracle
    DB_DRIVERS=ojdbc7.jar

    And the error

    Accepted license terms and conditions...
    Please specify INITIAL_PORT between the valid port range 0-65535 in the configuration file.
    Please specify DB_VENDOR as one of these supported databases - DB2 | Oracle | MSSQL
    Failed to setup configurations for docker instance due to missing or invalid configurations. Please correct.
    cp: cannot stat '/ibm/resources/ojdbc7.jar\r': No such file or directory
    Failed to setup docker instance with exit code 1. Exiting...

    ------------------------------
    Rajasekhar Muthamsetty
    ------------------------------



  • 6.  RE: Docker - B2Bi Installation

    Posted Tue June 30, 2020 07:58 AM
    @Chris Thorpe I don't see another tar file inside tar, Please see below screen and let me know if I'm still missing something.



    ------------------------------
    Rajasekhar Muthamsetty
    ------------------------------



  • 7.  RE: Docker - B2Bi Installation

    Posted Tue June 30, 2020 08:49 AM

    No that looks good as far as I can see.

    I looked at my original notes and I had to do this (apologies I mentioned the docker image import from the wrong notes.)

    tar -xvf STER_B2B_INT_CERT_CONT_V6.0.3_ML.tar

    docker load -i b2bi-603.tar

    But I had several tars in my downloaded tarball ... 

    To check if correct

    docker images
    docker image rm {image id}
    and then import again you should see the 4 sections "Downloading" so you can confirm this part.

    Regarding your parms I used DB2 (Which is a free option if you want me to send the details) but compare and see if there is anything you can spot.

    ***
    Note I used unencrypted passwords for simplicity but that should not make any difference.
    Also as I was using a DB2 Container then I used a docker network to use container network names.
    docker network create demo-network
    hence the DNS for DB and B2B can be used.

    ***

    # Start of Configuration
    # Upgrade
    UPGRADE=false
    #License - Specify values as true/false
    LICENSE_ACCEPT_ENABLE_SFG=false
    LICENSE_ACCEPT_ENABLE_EBICS=false
    LICENSE_ACCEPT_ENABLE_FINANCIAL_SERVICES=false
    # Security configurations
    SYSTEM_PASSPHRASE=mydockerpassword
    #FIPS compliance mode. Specify values as true/false 
    ENABLE_FIPS_MODE=false
    # NIST 800-131a compliance mode. Enter one of these values - strict/transition/off
    NIST_COMPLIANCE_MODE=off
    #Initial or base port
    basePort=12000
    INITIAL_PORT=12000
    NODE_IP=b2bi
    # DB attributes
    DB_VENDOR=DB2
    DB_USER=DB2INST1
    DB_PASSWORD=..password..
    DB_HOST=db261
    DB_PORT=50000
    DB_DATA=B2Bi610
    DB_DRIVERS=db2jcc4.jar
    DB_CREATE_SCHEMA=true
    ORACLE_USE_SERVICE_NAME=false
    #Email
    ADMIN_EMAIL_ADDRESS={...email ...}
    SMTP_HOST= {... SMTP HOST ...}
    #Miscellaneous
    SOFT_STOP_TIMEOUT=10
    #jvm options
    LIBERTY_JVM_OPTIONS=-Xms256m;-Xmx512m;
    UPDATE_JCE_POLICY_FILE=true
    #Name of JCE file. This file should be present in mapped folder
    JCE_POLICY_FILE=unrestrictedpolicyfiles.zip
    #Liberty Profile SSL Config
    LIBERTY_KEYSTORE_PASSWORD=
    LIBERTY_KEYSTORE_LOCATION=
    LIBERTY_PROTOCOL=TLSv1.2
    #End of Configuration



    ------------------------------
    Chris Thorpe
    ------------------------------



  • 8.  RE: Docker - B2Bi Installation

    Posted Tue June 30, 2020 12:58 PM
    I did try with a plain password, but it didn't help.

    When I try loading tar file - it shows as below, guess that's expected.

    2cab4440f907: Loading layer [==================================================>] 215.1MB/215.1MB
    64f2bd9f473b: Loading layer [==================================================>] 20.48kB/20.48kB
    e895dea07706: Loading layer [==================================================>] 15.36MB/15.36MB
    abe75048747b: Loading layer [==================================================>] 3.56GB/3.56GB
    c95666aee143: Loading layer [==================================================>] 2.048kB/2.048kB
    Loaded image: b2bi:6.0.3
    =================================
    I don't understand how you are getting b2bi-603.tar after untar.

    tar -xvf STER_B2B_INT_CERT_CONT_V6.0.3_ML.tar

    docker load -i b2bi-603.tar

    ========================


    ------------------------------
    Rajasekhar Muthamsetty
    ------------------------------



  • 9.  RE: Docker - B2Bi Installation

    Posted Tue June 30, 2020 01:53 PM
    Hi Rajesekhar,
     
    yes, that was expected for loading the image !!!
     
     
    Thanks & Regards,
    Shreekant Prasad
    Solution Architect (B2B Integration | Payments-FTM)
    Expert Labs - IBM Sterling
    Phone: +91-80-494-90651
    Mob: +91-98803-98337
     
    Certifications: Acclaim
     
    Vacation Plan:
        Holidays: 11th Aug, 2nd Oct, 26th Oct, 16th Nov, 25th Dec
     






  • 10.  RE: Docker - B2Bi Installation

    Posted Wed July 01, 2020 02:26 AM
    Sorry, it was a while back when I did the install ... my .tar had two files in b2bi-603.tar and ibm-b2bi-prod-1.0.0.tgz
    but as Shreekant said that does look good on your image, I must have had mine from a different source or been re-packaged at some point.

    The only other thing I can see is this

    basePort=12000
    INITIAL_PORT=12000

    Other than that I can't see anything obvious although I am sure those errors still suggest you are somehow not using the image correctly like I was doing initially. I don't know how experienced you are with containers to suggest what else to try.

    Check you are using the correct image.

    docker images

    then use reference 

    b2bi:6.0.3
    instead of the image id perhaps.

    Also, make sure all the permissions are correct. in centos you may have to be root for docker to work correctly and all the files owned by root. This is a docker restriction so unique to your install.

    good luck with it.



    ------------------------------
    Chris Thorpe
    ------------------------------



  • 11.  RE: Docker - B2Bi Installation

    Posted Wed July 01, 2020 02:26 AM
    Sorry, it was a while back when I did the install ... my .tar had two files in b2bi-603.tar and ibm-b2bi-prod-1.0.0.tgz
    but as Shreekant said that does look good on your image, I must have had mine from a different source or been re-packaged at some point.

    The only other thing I can see is this

    basePort=12000
    INITIAL_PORT=12000

    Other than that I can't see anything obvious although I am sure those errors still suggest you are somehow not using the image correctly like I was doing initially. I don't know how experienced you are with containers to suggest what else to try.

    Check you are using the correct image.

    docker images

    then use reference 

    b2bi:6.0.3
    instead of the image id perhaps.

    Also, make sure all the permissions are correct. in centos you may have to be root for docker to work correctly and all the files owned by root. This is a docker restriction so unique to your install.

    good luck with it.



    ------------------------------
    Chris Thorpe
    ------------------------------