App Connect

 View Only
Expand all | Collapse all

Creating bar using docker file

  • 1.  Creating bar using docker file

    IBM Champion
    Posted 11 days ago
    Edited by Santhosh Ramanathan 11 days ago
    Hi,

    I am trying to create bar file using dockerfile with the image version 12.0.6.0-r1, but getting error as mqsicreatebar command not found. How to build a bar file using docker file?

    My current docker file:

    ARG FROMIMAGE=cp.icr.io/cp/appc/ace:12.0.6.0-r1
    ARG APPNAME=defaultapplication
    FROM ${FROMIMAGE}

    USER root

    COPY ${APPNAME} /tmp/${APPNAME}
    RUN export LICENSE=accept \
    && . /opt/ibm/ace-12/server/bin/mqsiprofile \
    && mqsicreatebar -data /tmp/${APPNAME} -b /tmp/${APPNAME}.bar -a ${APPNAME} 2>&1 > /tmp/deploys \
    && chmod -R ugo+rwx /home/aceuser/
    USER 1001

    ------------------------------
    Thanks,
    Santhosh Ramanathan
    ------------------------------


  • 2.  RE: Creating bar using docker file

    Posted 10 days ago
    I think you can copy files into initial-config directory.  e.g. COPY Bars/*.bar /home/aceuser/initial-config/bars  

    HTH

    ------------------------------
    SALIH SIPAHI
    ------------------------------



  • 3.  RE: Creating bar using docker file

    IBM Champion
    Posted 10 days ago
    Hi Salih,

    As part of my CI pipeline, I first want to build the bar using Docker command and then deploy it through the pipeline. I dont want to the build the bar file manually, as soon as I check in the code I would like to execute the scripts to build the bar and bake it with ACE base image and deploy into CP4I.

    But mqsicreatebar command inside docker is not working as expected and throwing error as command not found.

    Hence wanted to know whether ACE docker script supports 'mqsicreatebar' command to build the bar file.

    ------------------------------
    Thanks,
    Santhosh Ramanathan
    ------------------------------



  • 4.  RE: Creating bar using docker file

    Posted 10 days ago
    Hi Salih 
    I'm not sure mqsicreatebar is in the docker built, but the ibmint command should definetly be in there, have you tried using that to build a bar file?
    I wrote a comparison between ibmint and mqsicreatebar
    https://integrationdesigners.com/blog/comparing-mqsipackagebar-mqsicreatebar-ibmint/

    ------------------------------
    Regards
    Matthias Blomme
    ------------------------------



  • 5.  RE: Creating bar using docker file

    IBM Champion
    Posted 9 days ago
    Hi Matthias,

    Thanks for the reference. It saved my day. ibmint package command is the one i was looking for. On further digging, the mqsicreatebar command is not available as part of docker build. I tried with ibmint package command as mentioned in your reference and it worked.

    ------------------------------
    Thanks,
    Santhosh Ramanathan
    ------------------------------



  • 6.  RE: Creating bar using docker file

    Posted 10 days ago
    Hi Santhosh,

    You are supposed to run a BUILD machine with the full development toolset. You create the bar files automatically on the build machine from the source code repository and you create on the build machine the deployables (bar files). The bar file overrides need then to be defined by environment before you deploy...

    Hope that helps...

    ------------------------------
    Francois Brandelik
    ------------------------------



  • 7.  RE: Creating bar using docker file

    IBM Champion
    Posted 9 days ago
    Hi Franc,

    I was looking for creating the pipeline which will run using only docker command and oc commands without installing ACE on any intermediate build machine.
    The ibmint command satisfies the requirement (with reference from @Matthias Blomme 's blog), ​

    ------------------------------
    Thanks,
    Santhosh Ramanathan
    ------------------------------



  • 8.  RE: Creating bar using docker file

    Posted 9 days ago
    Hello Santhosh,

     Glad to hear it's working with ibmint - that command was put into v12 for exactly this sort of scenario.

     Not sure if you've played with the unit test support in v12 yet, but that also works in standard containers (CP4i and others). ibmint can build and deploy the test projects, and then IntegrationServer can run them in the pipeline. The simplest example out there is probably https://github.com/tdolby-at-uk-ibm-com/ace-demo-sap-unittest/blob/main/build-and-ut.sh (which can be run in a codespace these days) but plenty of Tekton, Maven, etc examples exist too.

     Hope this helps!

    ------------------------------
    Trevor Dolby
    IBM Expert Labs
    ------------------------------



  • 9.  RE: Creating bar using docker file

    IBM Champion
    Posted 8 days ago
    Hi Trevor,

    thanks for the reference. I have tried the unit test support but haven't integrated with pipeline yet, but the reference is really useful , will integrate to the pipeline. This will definitely help the client to unlock the true potential of ACE as a container deployment and quickly automate their integration workload.

    ------------------------------
    Thanks,
    Santhosh Ramanathan
    ------------------------------



  • 10.  RE: Creating bar using docker file

    Posted 9 days ago
    We have a few scripts that do some of this (automation / docker,
    building and deploying bars) that might be useful for getting automation
    up and running.

    Ant scripts

    https://github.com/richardh65/bct-ace-ant-action

    https://github.com/richardh65/bct_public_code/tree/main/ant-samples/ace-unittest-covreage/ws1


    Building docker images

    https://gitlab.com/richardh65/bctdocker

    https://gitlab.com/better-coding-tools/bct-ace-ant-gitlab


    You might find something useful in there.



    Cheers

    Richard



    --
    Richard Huegill
    Better Coding Tools
    IT Delivery Manager

    e:richard@bettercodingtools.com
    w:bettercodingtools.com




  • 11.  RE: Creating bar using docker file

    IBM Champion
    Posted 8 days ago
    thanks Richard. I follow your articles in LinkedIn and you are doing a great job sharing your knowledge. Thanks for the references.

    ------------------------------
    Thanks,
    Santhosh Ramanathan
    ------------------------------