App Connect

 View Only
Expand all | Collapse all

Creating bar using docker file

  • 1.  Creating bar using docker file

    IBM Champion
    Posted Thu November 24, 2022 12:04 AM
    Edited by Santhosh Ramanathan Thu November 24, 2022 12:51 AM
    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 Thu November 24, 2022 12:47 PM
    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 Thu November 24, 2022 11:22 PM
    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

    IBM Champion
    Posted Fri November 25, 2022 01:30 AM
    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 Fri November 25, 2022 03:26 AM
    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

    IBM Champion
    Posted Fri November 25, 2022 01:56 AM
    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 Fri November 25, 2022 03:29 AM
    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 Fri November 25, 2022 10:03 PM
    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 Sat November 26, 2022 06:30 AM
    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 Sat November 26, 2022 12:00 AM
    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 Sat November 26, 2022 06:31 AM
    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
    ------------------------------



  • 12.  RE: Creating bar using docker file

    Posted Thu April 13, 2023 08:17 PM
    


    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