diff --git a/.travis.yml b/.travis.yml index 2884d76..893ebe4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,14 +1,19 @@ -sudo: required -dist: xenial -language: generic +os: linux +dist: bionic +language: shell services: - docker -# Make some fake binaries to spoof an ACE install for the Dockerbuild files to use. -before_install: - - mkdir -p deps/ace-install/server/bin/ - - echo -e "#!/bin/bash\nexport PATH=/opt/ibm/ace-11/server/bin/" > deps/ace-install/server/bin/mqsiprofile && chmod ugo+x deps/ace-install/server/bin/mqsiprofile - - echo -e "#!/bin/bash\nexit 0" > deps/ace-install/server/bin/mqsicreateworkdir && chmod ugo+x deps/ace-install/server/bin/mqsicreateworkdir - - echo -e "#!/bin/bash\ngroupadd mqbrkrs\ngroupadd mqm\nexit 0" > deps/ace-install/ace && chmod u+x deps/ace-install/ace - - cd deps && tar czf ace-install.tar.gz ace-install && cd .. +env: + global: + - DOWNLOAD_URL=https://na.artifactory.swg-devops.com/artifactory/appconnect-iiboc/prereqs/builds/12.0.10.0/xLinux/ace-12.0.10.0.tar.gz install: - - docker build --build-arg ACE_INSTALL=ace-install.tar.gz --file ubi/Dockerfile.aceonly . \ No newline at end of file + - docker system info + - touch git.commit + - docker build --no-cache -t testbuild --build-arg DOWNLOAD_URL=$DOWNLOAD_URL --build-arg USERNAME=$ARTIFACTORY_USER --build-arg PASSWORD=$ARTIFACTORY_ACCESS_TOKEN -f ./Dockerfile . + - cd samples/bars + - docker build -t aceapp --build-arg FROMIMAGE=testbuild --file Dockerfile . + - cd ../mqclient + - docker build -t aceappmqclient --build-arg FROMIMAGE=aceapp --build-arg MQ_URL=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/9.3.0.1-IBM-MQC-Redist-LinuxX64.tar.gz --file Dockerfile . + - docker run -d -p 7800:7800 --env LICENSE=accept --name aceapp aceappmqclient +script: + - ../bars/test.sh diff --git a/Dockerfile b/Dockerfile index 1f2f6da..68e96d5 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,17 +1,17 @@ # Build and run: # # docker build -t ace:12.0.4.0 -f Dockerfile . -# docker run -e LICENSE=accept -p 7600:7600 -p 7800:7800 --rm -ti ace:12.0.4.0 +# docker run -e LICENSE=accept -p 7600:7600 -p 7800:7800 --rm -ti ace:12.0.2.0 # # Can also mount a volume for the work directory: # -# docker run -e LICENSE=accept -v /what/ever/dir:/home/aceuser/ace-server -p 7600:7600 -p 7800:7800 --rm -ti ace:12.0.4.0 +# docker run -e LICENSE=accept -v /what/ever/dir:/home/aceuser/ace-server -p 7600:7600 -p 7800:7800 --rm -ti ace:12.0.2.0 # # This might require a local directory with the right permissions, or changing the userid further down . . . -FROM registry.access.redhat.com/ubi8/ubi-minimal as builder +FROM registry.access.redhat.com/ubi9/ubi-minimal as builder -RUN microdnf update -y && microdnf install util-linux curl tar +RUN microdnf update -y && microdnf install -y util-linux tar && microdnf clean all ARG USERNAME ARG PASSWORD @@ -29,12 +29,10 @@ RUN mkdir -p /opt/ibm/ace-12 \ --strip-components 1 \ --directory /opt/ibm/ace-12 -FROM registry.access.redhat.com/ubi8/ubi-minimal - -RUN microdnf update -y && microdnf install findutils util-linux && microdnf clean all +FROM registry.access.redhat.com/ubi9/ubi-minimal # Force reinstall tzdata package to get zoneinfo files -RUN microdnf reinstall tzdata -y +RUN microdnf update -y && microdnf install -y findutils util-linux which tar && microdnf reinstall -y tzdata && microdnf clean all # Install ACE v12.0.4.0 and accept the license COPY --from=builder /opt/ibm/ace-12 /opt/ibm/ace-12 @@ -52,5 +50,8 @@ USER 1001 # Expose ports. 7600, 7800, 7843 for ACE; EXPOSE 7600 7800 7843 +# Set default Integration Server name +ENV ACE_SERVER_NAME ace-server + # Set entrypoint to run the server -ENTRYPOINT ["bash", "-c", ". /opt/ibm/ace-12/server/bin/mqsiprofile && IntegrationServer -w /home/aceuser/ace-server"] +ENTRYPOINT ["bash", "-c", ". /opt/ibm/ace-12/server/bin/mqsiprofile && IntegrationServer --name ${ACE_SERVER_NAME} -w /home/aceuser/ace-server"] diff --git a/README.md b/README.md index 5074b54..45284ac 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,9 @@ Use this link as the DOWNLOAD_URL build parameter, adjusting the version numbers To run the image use a command such as -`docker run -d -p 7600:7600 -p 7800:7800 -e LICENSE=accept ace:latest` +`docker run -d -p 7600:7600 -p 7800:7800 -e LICENSE=accept -e ACE_SERVER_NAME=myserver ace:latest` + +where `ACE_SERVER_NAME` is the name of the Integration Server that will be running. ### Extending the image diff --git a/experimental/README.md b/experimental/README.md index 83c38c3..cf081ef 100644 --- a/experimental/README.md +++ b/experimental/README.md @@ -2,33 +2,54 @@ Simple docker images for ACE v12 on Linux (amd64 and s390x) and Windows -ace-full contains a Dockerfile for building an image that can run the full product, including mqsicreatebar with a virtual X server. +Dockefiles in the following directories are used for various purposes: -ace-basic contains a Dockerfile for building an image that can run the product server, including all files except the toolkit. +- ace-full can run the full product, including mqsicreatebar with a virtual X server. +- ace-basic can run the product server, including all files except the toolkit. +- ace-minimal can run simple servers with a non-root user. +- ace-sample contains a sample BAR file and Dockerfiles for building runnable images to serve HTTP clients. +- devcontainers is used with GitHub Codespaces to allow container-based development with VisualStudio Code in a web browser. -ace-minimal contains the Dockerfiles for building images that can run simple servers with a non-root user. +See build-all.sh for details on building the images; setting LICENSE=accept is required for all but the initial image builds. -ace-sample contains a sample BAR file and Dockerfiles for building runnable images to serve HTTP clients. +## Setting the correct product URL -See build-all.sh for details on building the images; setting LICENSE=accept is required for all but the initial image builds. +The Dockerfiles in the various directories take a `DOWNLOAD_URL` parameter that may +need to be specified to build a specific version of the product. This is provided on +the command line using the `--build-arg` parameter, and for the demo repos that use +Tekton to build the image, the URL is the `aceDownloadUrl` value in ace-minimal-image-pipeline-run.yaml. + +This value may need updating, either to another version in the same server directory +(if available) or else to an ACE developer edition URL from the IBM website. In the latter +case, start at https://www.ibm.com/docs/en/app-connect/12.0?topic=enterprise-download-ace-developer-edition-get-started +and proceed through the pages until the main download page with a link: + +![download page](ace-dev-edition-download.png) + +The link is likely to be of the form +``` +https://iwm.dhe.ibm.com/sdfdl/v2/regs2/mbford/Xa.2/Xb.WJL1cUPI9gANEhP8GuPD_qX1rj6x5R4yTUM7s_C2ue8/Xc.12.0.10.0-ACE-LINUX64-DEVELOPER.tar.gz/Xd./Xf.LpR.D1vk/Xg.12164875/Xi.swg-wmbfd/XY.regsrvs/XZ.pPVETUejcqPsVfDVKbdNu6IRpo4TkyKu/12.0.10.0-ACE-LINUX64-DEVELOPER.tar.gz +``` +Copy that link into the aceDownloadUrl parameter or use it as the DOWNLOAD_URL build +parameter, adjusting the version numbers in the other files and parameters as needed. + +## Running the sample To run the sample after building: ``` -docker run -e LICENSE=accept --rm -ti ace-sample:12.0.4.0-minimal-alpine +docker run -e LICENSE=accept --rm -ti ace-sample:12.0.10.0-alpine ``` -and then curl http://[container IP]:7800/test should return '{"data":"a string from ACE"}' +and then `curl http://[container IP]:7800/test` should return '{"data":"a string from ACE"}' ## Various sizes -Local on Debian 10 machine with defaults in Dockerfiles: +Local on Ubuntu with defaults in Dockerfiles: ``` -ace-minimal 12.0.4.0-alpine-openjdk16 2d02c13096c9 24 minutes ago 496MB -ace-minimal 12.0.4.0-alpine-openjdk14 5c1d593ee96f 25 minutes ago 506MB -ace-minimal 12.0.4.0-alpine 6775ce85b5fd 27 minutes ago 604MB -ace-minimal 12.0.4.0-ubuntu a351cfebbd4d 26 minutes ago 684MB -ace-basic 12.0.4.0-ubuntu 319227027474 19 minutes ago 1.48GB -ace-full 12.0.4.0-ubuntu 73978ff4c598 20 minutes ago 3.02GB +ace-basic 12.0.10.0-ubuntu 69f66523df16 About a minute ago 1.78GB +ace-full 12.0.10.0-ubuntu 2b77ec0f9a71 2 minutes ago 4.15GB +ace-minimal 12.0.10.0-ubuntu 0b662240db80 13 minutes ago 738MB +ace-minimal 12.0.10.0-alpine c5d126442f73 15 minutes ago 644MB ``` -Most of these will fit into the IBM Cloud container registry free tier due to compression, but ace-full and ace-basic are too big for that. +Some of these will fit into the IBM Cloud container registry free tier due to compression, but ace-full and ace-basic are too big for that. diff --git a/experimental/ace-basic/Dockerfile.mqclient b/experimental/ace-basic/Dockerfile.mqclient new file mode 100644 index 0000000..91aa936 --- /dev/null +++ b/experimental/ace-basic/Dockerfile.mqclient @@ -0,0 +1,46 @@ +FROM ubuntu:22.04 + +MAINTAINER Trevor Dolby (@trevor-dolby-at-ibm-com) + +# Build: +# +# docker build -t ace-basic-mqclient:12.0.10.0 -f Dockerfile.mqclient . + +# Later versions from the same site, or else via the Developer edition download site linked from +# https://www.ibm.com/docs/en/app-connect/12.0?topic=enterprise-download-ace-developer-edition-get-started +ARG DOWNLOAD_URL=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.10.0-ACE-LINUX64-DEVELOPER.tar.gz +ARG MQ_DOWNLOAD_URL=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/9.3.2.0-IBM-MQC-Redist-LinuxX64.tar.gz +# Can be set higher if needed +ARG DOWNLOAD_CONNECTION_COUNT=1 + +# Prevent errors about having no terminal when using apt-get +ENV DEBIAN_FRONTEND noninteractive + +# Install ACE v12 and accept the license +RUN apt-get update && apt-get install -y aria2 curl && \ + mkdir /opt/ibm && echo Downloading package ${DOWNLOAD_URL} && \ + cd /tmp && \ + echo Downloading package ${DOWNLOAD_URL} && \ + aria2c -s ${DOWNLOAD_CONNECTION_COUNT} -j ${DOWNLOAD_CONNECTION_COUNT} -x ${DOWNLOAD_CONNECTION_COUNT} "${DOWNLOAD_URL}" && \ + tar -zxf *12.0*tar.gz --exclude=tools --exclude server/bin/TADataCollector.sh --exclude server/nodejs_partial -exclude server/transformationAdvisor/ta-plugin-ace.jar --directory /opt/ibm && \ + rm -f *12.0*tar.gz && \ + mv /opt/ibm/ace-12* /opt/ibm/ace-12 && \ + /opt/ibm/ace-12/ace make registry global accept license deferred + +# Create a user to run as, create the ace workdir, and chmod script files +RUN useradd --uid 1001 --create-home --home-dir /home/aceuser --shell /bin/bash -G mqbrkrs,sudo aceuser \ + && su - aceuser -c "export LICENSE=accept && . /opt/ibm/ace-12/server/bin/mqsiprofile && mqsicreateworkdir /home/aceuser/ace-server" + +# Install MQ client libraries +RUN mkdir /opt/mqm && curl ${MQ_DOWNLOAD_URL} | tar zx --exclude=tools --directory /opt/mqm + +# Install Maven for development use. +# +# The standard Maven packages on most distros bring a lot of extra packages with +# them so we install Maven directly. +RUN cd /opt && \ + curl -k https://archive.apache.org/dist/maven/maven-3/3.8.4/binaries/apache-maven-3.8.4-bin.tar.gz | tar -xzf - && \ + ln -s /opt/apache-maven-3.8.4/bin/mvn /usr/local/bin/mvn + +# aceuser +USER 1001 diff --git a/experimental/ace-basic/Dockerfile.ubuntu b/experimental/ace-basic/Dockerfile.ubuntu index e6060e6..5d7d4b4 100644 --- a/experimental/ace-basic/Dockerfile.ubuntu +++ b/experimental/ace-basic/Dockerfile.ubuntu @@ -1,31 +1,35 @@ -FROM ubuntu:20.04 -MAINTAINER Trevor Dolby (@tdolby) +FROM ubuntu:22.04 +MAINTAINER Trevor Dolby (@trevor-dolby-at-ibm-com) # Build and run: # -# docker build -t ace-basic:12.0.4.0-ubuntu -f Dockerfile . -# docker run -e LICENSE=accept -p 7600:7600 -p 7800:7800 --rm -ti ace-basic:12.0.4.0-ubuntu +# docker build -t ace-basic:12.0.10.0-ubuntu -f Dockerfile . +# docker run -e LICENSE=accept -p 7600:7600 -p 7800:7800 --rm -ti ace-basic:12.0.10.0-ubuntu # # Can also mount a volume for the work directory: # -# docker run -e LICENSE=accept -v /what/ever/dir:/home/aceuser/ace-server -p 7600:7600 -p 7800:7800 --rm -ti ace-basic:12.0.4.0-ubuntu +# docker run -e LICENSE=accept -v /what/ever/dir:/home/aceuser/ace-server -p 7600:7600 -p 7800:7800 --rm -ti ace-basic:12.0.10.0-ubuntu # # This might require a local directory with the right permissions, or changing the userid further down . . . -ARG USERNAME -ARG PASSWORD -ARG DOWNLOAD_URL=http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.4.0-ACE-LINUX64-DEVELOPER.tar.gz -ARG PRODUCT_LABEL=ace-12.0.4.0 +# Later versions from the same site, or else via the Developer edition download site linked from +# https://www.ibm.com/docs/en/app-connect/12.0?topic=enterprise-download-ace-developer-edition-get-started +ARG DOWNLOAD_URL=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.10.0-ACE-LINUX64-DEVELOPER.tar.gz +# Can be set higher if needed +ARG DOWNLOAD_CONNECTION_COUNT=1 # Prevent errors about having no terminal when using apt-get ENV DEBIAN_FRONTEND noninteractive -# Install ACE v12.0.4.0 and accept the license -RUN apt-get update && apt-get install -y --no-install-recommends curl && \ +# Install ACE v12 and accept the license +RUN apt-get update && apt-get install -y aria2 && \ mkdir /opt/ibm && echo Downloading package ${DOWNLOAD_URL} && \ - if [ -z $USERNAME ]; then curl ${DOWNLOAD_URL}; else curl -u ${USERNAME}:{PASSWORD} ${DOWNLOAD_URL}; fi | \ - tar zx --exclude=tools --exclude server/bin/TADataCollector.sh --exclude server/transformationAdvisor/ta-plugin-ace.jar --directory /opt/ibm && \ - mv /opt/ibm/${PRODUCT_LABEL} /opt/ibm/ace-12 && \ + cd /tmp && \ + echo Downloading package ${DOWNLOAD_URL} && \ + aria2c -s ${DOWNLOAD_CONNECTION_COUNT} -j ${DOWNLOAD_CONNECTION_COUNT} -x ${DOWNLOAD_CONNECTION_COUNT} "${DOWNLOAD_URL}" && \ + tar -zxf *12.0*tar.gz --exclude=tools --exclude server/bin/TADataCollector.sh --exclude server/nodejs_partial --exclude server/transformationAdvisor/ta-plugin-ace.jar --directory /opt/ibm && \ + rm -f *12.0*tar.gz && \ + mv /opt/ibm/ace-12* /opt/ibm/ace-12 && \ /opt/ibm/ace-12/ace make registry global accept license deferred # Create a user to run as, create the ace workdir, and chmod script files diff --git a/experimental/ace-dev-edition-download.png b/experimental/ace-dev-edition-download.png new file mode 100755 index 0000000..14bed97 Binary files /dev/null and b/experimental/ace-dev-edition-download.png differ diff --git a/experimental/ace-full/Dockerfile.ubuntu b/experimental/ace-full/Dockerfile.ubuntu index 057814a..7352848 100644 --- a/experimental/ace-full/Dockerfile.ubuntu +++ b/experimental/ace-full/Dockerfile.ubuntu @@ -1,19 +1,27 @@ -FROM ubuntu:20.04 -MAINTAINER Trevor Dolby (@tdolby) +FROM ubuntu:22.04 +MAINTAINER Trevor Dolby (@trevor-dolby-at-ibm-com) -# docker build -t ace-full:12.0.4.0-ubuntu -f Dockerfile.ubuntu . +# docker build -t ace-full:12.0.10.0-ubuntu -f Dockerfile.ubuntu . -ARG DOWNLOAD_URL=http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.4.0-ACE-LINUX64-DEVELOPER.tar.gz -ARG PRODUCT_LABEL=ace-12.0.4.0 + +# Later versions from the same site, or else via the Developer edition download site linked from +# https://www.ibm.com/docs/en/app-connect/12.0?topic=enterprise-download-ace-developer-edition-get-started +ARG DOWNLOAD_URL=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.10.0-ACE-LINUX64-DEVELOPER.tar.gz +# Can be set higher if needed +ARG DOWNLOAD_CONNECTION_COUNT=1 # Prevent errors about having no terminal when using apt-get ENV DEBIAN_FRONTEND noninteractive -# Install ACE v12.0.4.0 and accept the license -RUN apt-get update && apt-get install -y --no-install-recommends curl && \ +# Install ACE v12 and accept the license +RUN apt-get update && apt-get install -y aria2 && \ mkdir /opt/ibm && echo Downloading package ${DOWNLOAD_URL} && \ - curl ${DOWNLOAD_URL} | tar zx --directory /opt/ibm && \ - mv /opt/ibm/${PRODUCT_LABEL} /opt/ibm/ace-12 && \ + cd /tmp && \ + echo Downloading package ${DOWNLOAD_URL} && \ + aria2c -s ${DOWNLOAD_CONNECTION_COUNT} -j ${DOWNLOAD_CONNECTION_COUNT} -x ${DOWNLOAD_CONNECTION_COUNT} "${DOWNLOAD_URL}" && \ + tar -zxf *12.0*tar.gz --directory /opt/ibm && \ + rm -f *12.0*tar.gz && \ + mv /opt/ibm/ace-12* /opt/ibm/ace-12 && \ /opt/ibm/ace-12/ace make registry global accept license deferred # Configure the system diff --git a/experimental/ace-full/README.md b/experimental/ace-full/README.md index 7eb14fe..f72d7a1 100644 --- a/experimental/ace-full/README.md +++ b/experimental/ace-full/README.md @@ -11,6 +11,11 @@ in this directory. Containers must be started with the LICENSE environment variable set to "accept" for the product to be usable (for example, "-e LICENSE=accept" on a docker run command). +See the [ace-non-application-flows](https://github.com/trevor-dolby-at-ibm-com/ace-non-application-flows) +demo repo for an example using this image to build non-application (top-level) resources. +The `ibmint` command is not intended to be used to build such resources, and so mqsicreatebar +(which requires a full image) is needed for the GitHub Action in that repo. + ## Build image with mqsicreatebar This container can be used as a base image for other build containers, or could be run with a diff --git a/experimental/ace-minimal/Dockerfile.alpine b/experimental/ace-minimal/Dockerfile.alpine index 0e9ba57..a846bf1 100644 --- a/experimental/ace-minimal/Dockerfile.alpine +++ b/experimental/ace-minimal/Dockerfile.alpine @@ -1,33 +1,38 @@ -FROM alpine:3.15 +FROM alpine:3.18 -# docker build -t ace-minimal:12.0.4.0-alpine -f Dockerfile.alpine . +# docker build -t ace-minimal:12.0.10.0-alpine -f Dockerfile.alpine . -MAINTAINER Trevor Dolby (@tdolby) +MAINTAINER Trevor Dolby (@trevor-dolby-at-ibm-com) -ARG DOWNLOAD_URL=http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.4.0-ACE-LINUX64-DEVELOPER.tar.gz -ARG PRODUCT_LABEL=ace-12.0.4.0 +# Later versions from the same site, or else via the Developer edition download site linked from +# https://www.ibm.com/docs/en/app-connect/12.0?topic=enterprise-download-ace-developer-edition-get-started +ARG DOWNLOAD_URL=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.10.0-ACE-LINUX64-DEVELOPER.tar.gz +# Can be set higher if needed +ARG DOWNLOAD_CONNECTION_COUNT=1 RUN apk --update add --no-cache --virtual .build-deps curl binutils zstd \ - && GLIBC_VER="2.31-r0" \ + && set -x \ + && GLIBC_VER="2.34-r0" \ && ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \ && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-10.1.0-2-x86_64.pkg.tar.zst" \ && GCC_LIBS_SHA256=f80320a03ff73e82271064e4f684cd58d7dbdb07aa06a2c4eea8e0f3c507c45c \ - && ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.11-4-x86_64.pkg.tar.xz" \ - && ZLIB_SHA256=43a17987d348e0b395cb6e28d2ece65fb3b5a0fe433714762780d18c0451c149 \ - && curl -Ls https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ - && curl -Ls ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/${GLIBC_VER}.apk \ - && apk add /tmp/${GLIBC_VER}.apk \ - && curl -Ls ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \ + && ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.13-2-x86_64.pkg.tar.zst" \ + && ZLIB_SHA256=c4f394724b20b84d7304b23bbb58442b6ef53e5cbac89eb51e39d7f0a46abafd \ + && curl -Lks https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ + && curl -Lks ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/${GLIBC_VER}.apk \ + && apk add --force-overwrite /tmp/${GLIBC_VER}.apk \ + && curl -Lks ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \ && echo "${GCC_LIBS_SHA256} /tmp/gcc-libs.tar.zst" | sha256sum -c - \ && mkdir /tmp/gcc \ && zstd -d /tmp/gcc-libs.tar.zst \ && tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \ && mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \ && strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \ - && curl -Ls ${ZLIB_URL} -o /tmp/libz.tar.xz \ - && echo "${ZLIB_SHA256} /tmp/libz.tar.xz" | sha256sum -c - \ + && curl -Lks ${ZLIB_URL} -o /tmp/libz.tar.zst \ + && echo "${ZLIB_SHA256} /tmp/libz.tar.zst" | sha256sum -c - \ && mkdir /tmp/libz \ - && tar -xf /tmp/libz.tar.xz -C /tmp/libz \ + && zstd -d /tmp/libz.tar.zst \ + && tar -xf /tmp/libz.tar -C /tmp/libz \ && mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib \ && apk del --purge .build-deps \ && rm -rf /tmp/${GLIBC_VER}.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar* /var/cache/apk/* \ @@ -53,12 +58,16 @@ RUN cat /tmp/excludes-base.txt >> /tmp/all-excludes.txt && \ cat /tmp/excludes-ims.txt >> /tmp/all-excludes.txt && \ # JDK provided by the product # cat /tmp/excludes-jdk.txt >> /tmp/all-excludes.txt && \ +# Java11 is not required + cat /tmp/excludes-java11.txt >> /tmp/all-excludes.txt && \ # node.js support is optional; use --no-nodejs on server start line cat /tmp/excludes-nodejs.txt >> /tmp/all-excludes.txt && \ # NPM install support is optional cat /tmp/excludes-npm.txt >> /tmp/all-excludes.txt && \ # ODBC drivers are optional cat /tmp/excludes-odbc.txt >> /tmp/all-excludes.txt && \ +# Telemetry is optional + cat /tmp/excludes-telemetry.txt >> /tmp/all-excludes.txt && \ # Toolkit is optional cat /tmp/excludes-tools.txt >> /tmp/all-excludes.txt && \ # Web UI support optional; use --admin-rest-api -1 on server start line @@ -68,17 +77,19 @@ RUN cat /tmp/excludes-base.txt >> /tmp/all-excludes.txt && \ # XSLT nodes are optional cat /tmp/excludes-xmlt.txt >> /tmp/all-excludes.txt -# Set the env vars mentioned above +# Set the environment correctly COPY profile-with-product-java-paths.sh /etc/profile.d/profile-with-product-java-paths.sh COPY product-java-paths.sh /etc/profile.d/product-java-paths.sh # Install ACE RUN mkdir -p /opt/ibm && \ - apk add mksh bash curl binutils zip && \ + apk add mksh bash aria2 binutils zip && \ + cd /tmp && \ echo Downloading package ${DOWNLOAD_URL} && \ - curl ${DOWNLOAD_URL} \ - | tar zx --exclude-from=/tmp/all-excludes.txt --directory /opt/ibm && \ - mv /opt/ibm/${PRODUCT_LABEL} /opt/ibm/ace-12 && \ + aria2c -s ${DOWNLOAD_CONNECTION_COUNT} -j ${DOWNLOAD_CONNECTION_COUNT} -x ${DOWNLOAD_CONNECTION_COUNT} "${DOWNLOAD_URL}" && \ + tar -zxf *12.0*tar.gz --exclude-from=/tmp/all-excludes.txt --directory /opt/ibm && \ + rm -f *12.0*tar.gz && \ + mv /opt/ibm/ace-12* /opt/ibm/ace-12 && \ find /opt/ibm -name "*.so*" -exec strip {} ";" && \ find /opt/ibm -name "*.wrk" -exec strip {} ";" && \ find /opt/ibm -name "*.lil" -exec strip {} ";" && \ @@ -105,6 +116,9 @@ RUN ( echo "Passw0rd" ; echo "Passw0rd" ) | adduser -u 1001 -h /home/aceuser -s su - aceuser -c "export LICENSE=accept && . /etc/profile.d/profile-with-product-java-paths.sh && /opt/ibm/ace-12/server/bin/mqsicreateworkdir /home/aceuser/ace-server" && \ echo ". /etc/profile.d/profile-with-product-java-paths.sh" >> /home/aceuser/.bashrc +# Switch off the components that aren't in the image +COPY minimal-image.components.yaml /opt/ibm/ace-12/image.components.yaml + # aceuser USER 1001 diff --git a/experimental/ace-minimal/Dockerfile.alpine-java11 b/experimental/ace-minimal/Dockerfile.alpine-java11 new file mode 100644 index 0000000..245b27e --- /dev/null +++ b/experimental/ace-minimal/Dockerfile.alpine-java11 @@ -0,0 +1,129 @@ +FROM alpine:3.18 + +# docker build -t ace-minimal:12.0.10.0-alpine-java11 -f Dockerfile.alpine-java11 . + +MAINTAINER Trevor Dolby (@trevor-dolby-at-ibm-com) + +# Later versions from the same site, or else via the Developer edition download site linked from +# https://www.ibm.com/docs/en/app-connect/12.0?topic=enterprise-download-ace-developer-edition-get-started +ARG DOWNLOAD_URL=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.10.0-ACE-LINUX64-DEVELOPER.tar.gz +# Can be set higher if needed +ARG DOWNLOAD_CONNECTION_COUNT=1 + +RUN apk --update add --no-cache --virtual .build-deps curl binutils zstd \ + && set -x \ + && GLIBC_VER="2.34-r0" \ + && ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \ + && GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-10.1.0-2-x86_64.pkg.tar.zst" \ + && GCC_LIBS_SHA256=f80320a03ff73e82271064e4f684cd58d7dbdb07aa06a2c4eea8e0f3c507c45c \ + && ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.13-2-x86_64.pkg.tar.zst" \ + && ZLIB_SHA256=c4f394724b20b84d7304b23bbb58442b6ef53e5cbac89eb51e39d7f0a46abafd \ + && curl -Lks https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \ + && curl -Lks ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/${GLIBC_VER}.apk \ + && apk add --force-overwrite /tmp/${GLIBC_VER}.apk \ + && curl -Lks ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \ + && echo "${GCC_LIBS_SHA256} /tmp/gcc-libs.tar.zst" | sha256sum -c - \ + && mkdir /tmp/gcc \ + && zstd -d /tmp/gcc-libs.tar.zst \ + && tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \ + && mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \ + && strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \ + && curl -Lks ${ZLIB_URL} -o /tmp/libz.tar.zst \ + && echo "${ZLIB_SHA256} /tmp/libz.tar.zst" | sha256sum -c - \ + && mkdir /tmp/libz \ + && zstd -d /tmp/libz.tar.zst \ + && tar -xf /tmp/libz.tar -C /tmp/libz \ + && mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib \ + && apk del --purge .build-deps \ + && rm -rf /tmp/${GLIBC_VER}.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar* /var/cache/apk/* \ + && mkdir /usr/glibc-compat/zlib-only \ + && ( cd /usr/glibc-compat/lib && tar -cf - libz* ) | ( cd /usr/glibc-compat/zlib-only && tar -xf - ) \ + && apk add 'apk-tools>2.12.5-r1' + +ENV TZ=Europe/London + +# Set up exclusions +COPY excludes*txt /tmp/ + +RUN cat /tmp/excludes-base.txt >> /tmp/all-excludes.txt && \ +# Adapters are optional + cat /tmp/excludes-adapters.txt >> /tmp/all-excludes.txt && \ +# CICS is optional + cat /tmp/excludes-cics.txt >> /tmp/all-excludes.txt && \ +# FTE is optional + cat /tmp/excludes-fte.txt >> /tmp/all-excludes.txt && \ +# GlobalCache is optional; set MQSI_NO_CACHE_SUPPORT=1 + cat /tmp/excludes-globalcache.txt >> /tmp/all-excludes.txt && \ +# IMS is optional + cat /tmp/excludes-ims.txt >> /tmp/all-excludes.txt && \ +# Use Java11 instead of default Java8 + cat /tmp/excludes-jdk.txt >> /tmp/all-excludes.txt && \ +# Java11 is provided by the product +# cat /tmp/excludes-java11.txt >> /tmp/all-excludes.txt && \ +# node.js support is optional; use --no-nodejs on server start line + cat /tmp/excludes-nodejs.txt >> /tmp/all-excludes.txt && \ +# NPM install support is optional + cat /tmp/excludes-npm.txt >> /tmp/all-excludes.txt && \ +# ODBC drivers are optional + cat /tmp/excludes-odbc.txt >> /tmp/all-excludes.txt && \ +# Telemetry is optional + cat /tmp/excludes-telemetry.txt >> /tmp/all-excludes.txt && \ +# Toolkit is optional + cat /tmp/excludes-tools.txt >> /tmp/all-excludes.txt && \ +# Web UI support optional; use --admin-rest-api -1 on server start line + cat /tmp/excludes-webui.txt >> /tmp/all-excludes.txt && \ +# WSRR nodes are optional + cat /tmp/excludes-wsrr.txt >> /tmp/all-excludes.txt && \ +# XSLT nodes are optional + cat /tmp/excludes-xmlt.txt >> /tmp/all-excludes.txt + +# Set the environment correctly +COPY profile-with-product-java11-paths.sh /etc/profile.d/profile-with-product-java11-paths.sh +COPY product-java11-paths.sh /etc/profile.d/product-java11-paths.sh + +# Install ACE +RUN mkdir -p /opt/ibm && \ + apk add mksh bash aria2 binutils zip && \ + cd /tmp && \ + echo Downloading package ${DOWNLOAD_URL} && \ + aria2c -s ${DOWNLOAD_CONNECTION_COUNT} -j ${DOWNLOAD_CONNECTION_COUNT} -x ${DOWNLOAD_CONNECTION_COUNT} "${DOWNLOAD_URL}" && \ + tar -zxf *12.0*tar.gz --exclude-from=/tmp/all-excludes.txt --directory /opt/ibm && \ + rm -f *12.0*tar.gz && \ + mv /opt/ibm/ace-12* /opt/ibm/ace-12 && \ + find /opt/ibm -name "*.so*" -exec strip {} ";" && \ + find /opt/ibm -name "*.wrk" -exec strip {} ";" && \ + find /opt/ibm -name "*.lil" -exec strip {} ";" && \ + ( strip /opt/ibm/ace-12/server/bin/* 2>/dev/null || /bin/true ) && \ + zip -d /opt/ibm/ace-12/common/classes/IntegrationAPI.jar BIPmsgs_de.properties BIPmsgs_es.properties BIPmsgs_fr.properties BIPmsgs_it.properties BIPmsgs_ja.properties BIPmsgs_ko.properties BIPmsgs_pl.properties BIPmsgs_pt_BR.properties BIPmsgs_ru.properties BIPmsgs_tr.properties BIPmsgs_zh.properties BIPmsgs_zh_HK.properties BIPmsgs_zh_TW.properties && \ + apk del --purge binutils zip && \ + addgroup mqbrkrs && \ + rm -rf /opt/ibm/ace-12/common/java11/jmods && \ + cat /etc/profile.d/product-java11-paths.sh >> /root/.bashrc && \ + ln -s /opt/ibm/ace-12/common/java11 /opt/ibm/ace-12/common/jdk && \ + ln -s . /opt/ibm/ace-12/common/java11/jre + +# Issues with 5.1.4(1)-release (x86_64-alpine-linux-musl) on alpine +RUN sed -i 's/\/bin\/bash/\/bin\/mksh/g' /opt/ibm/ace-12/ace /opt/ibm/ace-12/server/bin/mqsicreateworkdir /opt/ibm/ace-12/server/bin/mqsipackagebar + +RUN bash -c '. /etc/profile.d/product-java11-paths.sh && /opt/ibm/ace-12/ace make registry global accept license deferred' + +# Set BASH_ENV to source mqsiprofile when using docker exec bash -c +ENV BASH_ENV=/etc/profile.d/profile-with-product-java11-paths.sh + +# Create a user to run as, create the ace workdir, and chmod script files +RUN ( echo "Passw0rd" ; echo "Passw0rd" ) | adduser -u 1001 -h /home/aceuser -s /bin/bash aceuser mqbrkrs && \ + adduser aceuser mqbrkrs && \ + cat /etc/profile.d/product-java11-paths.sh >> /home/aceuser/.bashrc && \ + chown aceuser /home/aceuser/.bashrc && \ + chmod 664 /home/aceuser/.bashrc && \ + su - aceuser -c "export LICENSE=accept && . /etc/profile.d/profile-with-product-java11-paths.sh && /opt/ibm/ace-12/server/bin/mqsicreateworkdir /home/aceuser/ace-server" && \ + echo ". /etc/profile.d/profile-with-product-java11-paths.sh" >> /home/aceuser/.bashrc + +# Switch off the components that aren't in the image +COPY minimal-image.components.yaml /opt/ibm/ace-12/image.components.yaml + +# aceuser +USER 1001 + +# Leaving this blank to avoid issues with openshift +#ENTRYPOINT ["bash"] diff --git a/experimental/ace-minimal/Dockerfile.ubuntu b/experimental/ace-minimal/Dockerfile.ubuntu index 28e63ad..88ed548 100644 --- a/experimental/ace-minimal/Dockerfile.ubuntu +++ b/experimental/ace-minimal/Dockerfile.ubuntu @@ -1,11 +1,14 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 -# docker build -t ace-minimal:12.0.4.0-ubuntu -f Dockerfile.ubuntu . +# docker build -t ace-minimal:12.0.10.0-ubuntu -f Dockerfile.ubuntu . -MAINTAINER Trevor Dolby (@tdolby) +MAINTAINER Trevor Dolby (@trevor-dolby-at-ibm-com) -ARG DOWNLOAD_URL=http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.4.0-ACE-LINUX64-DEVELOPER.tar.gz -ARG PRODUCT_LABEL=ace-12.0.4.0 +# Later versions from the same site, or else via the Developer edition download site linked from +# https://www.ibm.com/docs/en/app-connect/12.0?topic=enterprise-download-ace-developer-edition-get-started +ARG DOWNLOAD_URL=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.10.0-ACE-LINUX64-DEVELOPER.tar.gz +# Can be set higher if needed +ARG DOWNLOAD_CONNECTION_COUNT=1 # Prevent errors about having no terminal when using apt-get ENV DEBIAN_FRONTEND noninteractive @@ -24,12 +27,16 @@ RUN cat /tmp/excludes-base.txt >> /tmp/all-excludes.txt && \ cat /tmp/excludes-globalcache.txt >> /tmp/all-excludes.txt && \ # IMS is optional cat /tmp/excludes-ims.txt >> /tmp/all-excludes.txt && \ +# Java11 is not required + cat /tmp/excludes-java11.txt >> /tmp/all-excludes.txt && \ # node.js support is optional; use --no-nodejs on server start line cat /tmp/excludes-nodejs.txt >> /tmp/all-excludes.txt && \ # NPM install support is optional cat /tmp/excludes-npm.txt >> /tmp/all-excludes.txt && \ # ODBC drivers are optional cat /tmp/excludes-odbc.txt >> /tmp/all-excludes.txt && \ +# Telemetry is optional + cat /tmp/excludes-telemetry.txt >> /tmp/all-excludes.txt && \ # Toolkit is optional cat /tmp/excludes-tools.txt >> /tmp/all-excludes.txt && \ # Web UI support optional; use --admin-rest-api -1 on server start line @@ -40,12 +47,14 @@ RUN cat /tmp/excludes-base.txt >> /tmp/all-excludes.txt && \ cat /tmp/excludes-xmlt.txt >> /tmp/all-excludes.txt # Install ACE and accept the license -RUN apt-get update && apt-get install -y --no-install-recommends curl zip binutils && \ +RUN apt-get update && apt-get install -y aria2 zip binutils && \ mkdir /opt/ibm && \ + cd /tmp && \ echo Downloading package ${DOWNLOAD_URL} && \ - curl ${DOWNLOAD_URL} \ - | tar zx --exclude-from=/tmp/all-excludes.txt --directory /opt/ibm && \ - mv /opt/ibm/${PRODUCT_LABEL} /opt/ibm/ace-12 && \ + aria2c -s ${DOWNLOAD_CONNECTION_COUNT} -j ${DOWNLOAD_CONNECTION_COUNT} -x ${DOWNLOAD_CONNECTION_COUNT} "${DOWNLOAD_URL}" && \ + tar -zxf *12.0*tar.gz --exclude-from=/tmp/all-excludes.txt --directory /opt/ibm && \ + rm -f *12.0*tar.gz && \ + mv /opt/ibm/ace-12* /opt/ibm/ace-12 && \ find /opt/ibm -name "*.so*" -exec strip {} ";" && \ find /opt/ibm -name "*.wrk" -exec strip {} ";" && \ find /opt/ibm -name "*.lil" -exec strip {} ";" && \ @@ -80,6 +89,9 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && apt-get -y dist-upgrade \ && rm -rf /var/lib/apt/lists/* +# Switch off the components that aren't in the image +COPY minimal-image.components.yaml /opt/ibm/ace-12/image.components.yaml + # aceuser USER 1001 diff --git a/experimental/ace-minimal/README.md b/experimental/ace-minimal/README.md new file mode 100644 index 0000000..b169844 --- /dev/null +++ b/experimental/ace-minimal/README.md @@ -0,0 +1,27 @@ +# ace-minimal docker image + +This directory contains files that allow small ACE container images to be +built for use in pipelines and cloud container runtimes. + +Main Dockerfiles: + +- Dockerfile.alpine builds the smallest image, using Alpine as a base with glibc added +- Dockerfile.ubuntu builds a slightly larger image + +## Building + +See the [README](../README.md) in the parent directory for download URL update +information (if needed) and then run one of the commands +``` +export DOWNLOAD_URL= +docker build --build-arg DOWNLOAD_URL -t ace-minimal:12.0.10.0-alpine -f Dockerfile.alpine . +``` +or +``` +export DOWNLOAD_URL= +docker build --build-arg DOWNLOAD_URL -t ace-minimal:12.0.10.0-ubuntu -f Dockerfile.ubuntu . +``` + +These images can then be used to build other images with build tools, deployed +ACE applications, etc. + diff --git a/experimental/ace-minimal/excludes-java11.txt b/experimental/ace-minimal/excludes-java11.txt new file mode 100644 index 0000000..54757ff --- /dev/null +++ b/experimental/ace-minimal/excludes-java11.txt @@ -0,0 +1 @@ +*/common/java11 diff --git a/experimental/ace-minimal/excludes-telemetry.txt b/experimental/ace-minimal/excludes-telemetry.txt new file mode 100644 index 0000000..c8ff4f2 --- /dev/null +++ b/experimental/ace-minimal/excludes-telemetry.txt @@ -0,0 +1,2 @@ +*/server/lib/libimbtelemetry.so +*/server/lil/imbopentelemetry.lil diff --git a/experimental/ace-minimal/minimal-image.components.yaml b/experimental/ace-minimal/minimal-image.components.yaml new file mode 100644 index 0000000..0c050c6 --- /dev/null +++ b/experimental/ace-minimal/minimal-image.components.yaml @@ -0,0 +1,37 @@ +--- +# ACE Integration Server components file +# +# Created at 12.0.7.0 - 42cd3bab4d5746527981157e644b9cab-a00f286a885cfbb65a3fae1ad292e418 +# +# General notes : +# - Integration Server will load server.components.yaml from directory set via --work-dir +# - To ensure valid YAML avoid any use of TAB characters + +serverComponentsVersion: 1 +# reportExcludedComponents: true # Controls whether messages are written on integration server start-up indicating components are excluded. Default is true. + +# Main embedded run-times +NodeJS: false # Do not create NodeJS run-time within the Integration Server + +Nodes: + .NET: false # Controls whether the .NET nodes are loaded. + +JavaNodes: # If JVM is set to false then the JavaNodes section will not apply + Adapters: false # Controls whether the SAP, Oracle JD Edwards, Oracle Peoplesoft and Oracle Siebel nodes are loaded. + CICS: false # Controls whether the CICSRequest node is loaded. + IMS: false # Controls whether the IMSRequest node is loaded. + ODM: false # Controls whether the ODMRules node is loaded. + XSLT: false # Controls whether the XSLTransform nodes are loaded. + WSRR: false # Controls whether the WSRR EndpointLookup and RegistryLookup nodes are loaded (if this component is installed). + +JavaScriptNodes: # If NodeJS is set to false then the JavaScriptNodes section will not apply + Salesforce: false # Controls if the Salesforce connector is loaded. + LoopBack: false # Controls if the LoopBack connector is loaded. + +ResourceManagers: + GlobalCache: false # Controls whether the GlobalCache resources are loaded. + +FlowSecurityProviders: + LDAP: false # Controls whether the LDAP Security provider is loaded for message flow security. + TFIM: false # Controls whether the TFIM Security provider is loaded for message flow security. + WS-Trust: false # Controls whether the WS-Trust v1.3 STS Security provider is loaded for message flow security. diff --git a/experimental/ace-minimal/Dockerfile-no-ace.alpine-openjdk14 b/experimental/ace-minimal/old/Dockerfile-no-ace.alpine-openjdk14 similarity index 100% rename from experimental/ace-minimal/Dockerfile-no-ace.alpine-openjdk14 rename to experimental/ace-minimal/old/Dockerfile-no-ace.alpine-openjdk14 diff --git a/experimental/ace-minimal/Dockerfile.alpine-ibmjre b/experimental/ace-minimal/old/Dockerfile.alpine-ibmjre similarity index 100% rename from experimental/ace-minimal/Dockerfile.alpine-ibmjre rename to experimental/ace-minimal/old/Dockerfile.alpine-ibmjre diff --git a/experimental/ace-minimal/Dockerfile.alpine-openjdk14 b/experimental/ace-minimal/old/Dockerfile.alpine-openjdk14 similarity index 100% rename from experimental/ace-minimal/Dockerfile.alpine-openjdk14 rename to experimental/ace-minimal/old/Dockerfile.alpine-openjdk14 diff --git a/experimental/ace-minimal/Dockerfile.alpine-openjdk16 b/experimental/ace-minimal/old/Dockerfile.alpine-openjdk16 similarity index 100% rename from experimental/ace-minimal/Dockerfile.alpine-openjdk16 rename to experimental/ace-minimal/old/Dockerfile.alpine-openjdk16 diff --git a/experimental/ace-minimal/ibmjava-paths.sh b/experimental/ace-minimal/old/ibmjava-paths.sh similarity index 100% rename from experimental/ace-minimal/ibmjava-paths.sh rename to experimental/ace-minimal/old/ibmjava-paths.sh diff --git a/experimental/ace-minimal/openjdk14-paths.sh b/experimental/ace-minimal/old/openjdk14-paths.sh similarity index 100% rename from experimental/ace-minimal/openjdk14-paths.sh rename to experimental/ace-minimal/old/openjdk14-paths.sh diff --git a/experimental/ace-minimal/openjdk16-paths.sh b/experimental/ace-minimal/old/openjdk16-paths.sh similarity index 100% rename from experimental/ace-minimal/openjdk16-paths.sh rename to experimental/ace-minimal/old/openjdk16-paths.sh diff --git a/experimental/ace-minimal/profile-with-ibmjava-paths.sh b/experimental/ace-minimal/old/profile-with-ibmjava-paths.sh similarity index 100% rename from experimental/ace-minimal/profile-with-ibmjava-paths.sh rename to experimental/ace-minimal/old/profile-with-ibmjava-paths.sh diff --git a/experimental/ace-minimal/profile-with-openjdk14-paths.sh b/experimental/ace-minimal/old/profile-with-openjdk14-paths.sh similarity index 100% rename from experimental/ace-minimal/profile-with-openjdk14-paths.sh rename to experimental/ace-minimal/old/profile-with-openjdk14-paths.sh diff --git a/experimental/ace-minimal/profile-with-openjdk16-paths.sh b/experimental/ace-minimal/old/profile-with-openjdk16-paths.sh similarity index 100% rename from experimental/ace-minimal/profile-with-openjdk16-paths.sh rename to experimental/ace-minimal/old/profile-with-openjdk16-paths.sh diff --git a/experimental/ace-minimal/product-java11-paths.sh b/experimental/ace-minimal/product-java11-paths.sh new file mode 100755 index 0000000..8b13565 --- /dev/null +++ b/experimental/ace-minimal/product-java11-paths.sh @@ -0,0 +1,21 @@ +export MQSI_SIGNAL_EXCLUSIONS=11 +export MQSI_NO_CACHE_SUPPORT=1 + +# Don't use JSSE2 +export MQSI_JAVA_AVOID_SSL_SETTINGS=1 +# May also need to change JDBC policy settings to avoid hitting +# "Unsupported protocolSSL_TLSv2" errors from DB2 as described in +# https://www.ibm.com/mysupport/s/defect/aCI3p000000XlXvGAK/dt179015 +# +# sslConnection=true;sslVersion=TLSv1.3 + +# Needed to avoid errors in ibmint +export _JAVA_OPTIONS="-Dmqsipackagebar.noExtendClasspath=1" +# Needed for javax.xml packages +export MQSI_EXTRA_JAR_DIRECTORY=/opt/ibm/ace-12/common/jakarta/lib + +# Make sure Maven and others can find javac +export PATH=/opt/ibm/ace-12/common/java11/bin:$PATH + +# Not really java-related, but still needed +export LD_LIBRARY_PATH=/usr/glibc-compat/zlib-only:$LD_LIBRARY_PATH diff --git a/experimental/ace-minimal/profile-with-product-java11-paths.sh b/experimental/ace-minimal/profile-with-product-java11-paths.sh new file mode 100755 index 0000000..cda3a22 --- /dev/null +++ b/experimental/ace-minimal/profile-with-product-java11-paths.sh @@ -0,0 +1,24 @@ +# Combined file for easier scripting +export MQSI_SIGNAL_EXCLUSIONS=11 +export MQSI_NO_CACHE_SUPPORT=1 + +# Don't use JSSE2 +export MQSI_JAVA_AVOID_SSL_SETTINGS=1 +# May also need to change JDBC policy settings to avoid hitting +# "Unsupported protocolSSL_TLSv2" errors from DB2 as described in +# https://www.ibm.com/mysupport/s/defect/aCI3p000000XlXvGAK/dt179015 +# +# sslConnection=true;sslVersion=TLSv1.3 + +# Needed to avoid errors in ibmint +export _JAVA_OPTIONS="-Dmqsipackagebar.noExtendClasspath=1" +# Needed for javax.xml packages +export MQSI_EXTRA_JAR_DIRECTORY=/opt/ibm/ace-12/common/jakarta/lib + +. /opt/ibm/ace-12/server/bin/mqsiprofile + +# Make sure Maven and others can find javac +export PATH=/opt/ibm/ace-12/common/java11/bin:$PATH + +# Not really java-related, but still needed +export LD_LIBRARY_PATH=/usr/glibc-compat/zlib-only:$LD_LIBRARY_PATH diff --git a/experimental/build-all.sh b/experimental/build-all.sh index a08c837..7d16eef 100755 --- a/experimental/build-all.sh +++ b/experimental/build-all.sh @@ -1,27 +1,36 @@ #!/bin/bash -export PRODUCT_VERSION=12.0.4.0 -export PRODUCT_LABEL=ace-${PRODUCT_VERSION} -export DOWNLOAD_URL=http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.4.0-ACE-LINUX64-DEVELOPER.tar.gz + +# Later versions from the same site, or else via the Developer edition download site linked from +# https://www.ibm.com/docs/en/app-connect/12.0?topic=enterprise-download-ace-developer-edition-get-started +export DOWNLOAD_URL=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.10.0-ACE-LINUX64-DEVELOPER.tar.gz +export PRODUCT_VERSION=12.0.10.0 + +export DOWNLOAD_CONNECTION_COUNT=10 + # Exit on error set -e cd ace-minimal -docker build --build-arg DOWNLOAD_URL --build-arg PRODUCT_LABEL -t ace-minimal:${PRODUCT_VERSION}-alpine -f Dockerfile.alpine . -docker build --build-arg DOWNLOAD_URL --build-arg PRODUCT_LABEL -t ace-minimal:${PRODUCT_VERSION}-ubuntu -f Dockerfile.ubuntu . -# Highly experimental! -docker build --build-arg DOWNLOAD_URL --build-arg PRODUCT_LABEL -t ace-minimal:${PRODUCT_VERSION}-alpine-openjdk14 -f Dockerfile.alpine-openjdk14 . -docker build --build-arg DOWNLOAD_URL --build-arg PRODUCT_LABEL -t ace-minimal:${PRODUCT_VERSION}-alpine-openjdk16 -f Dockerfile.alpine-openjdk16 . +docker build --build-arg DOWNLOAD_URL --build-arg DOWNLOAD_CONNECTION_COUNT -t ace-minimal:${PRODUCT_VERSION}-alpine -f Dockerfile.alpine . +docker build --build-arg DOWNLOAD_URL --build-arg DOWNLOAD_CONNECTION_COUNT -t ace-minimal:${PRODUCT_VERSION}-alpine-java11 -f Dockerfile.alpine-java11 . +docker build --build-arg DOWNLOAD_URL --build-arg DOWNLOAD_CONNECTION_COUNT -t ace-minimal:${PRODUCT_VERSION}-ubuntu -f Dockerfile.ubuntu . cd ../ace-full -docker build --build-arg DOWNLOAD_URL --build-arg PRODUCT_LABEL -t ace-full:${PRODUCT_VERSION}-ubuntu -f Dockerfile.ubuntu . +docker build --build-arg DOWNLOAD_URL --build-arg DOWNLOAD_CONNECTION_COUNT -t ace-full:${PRODUCT_VERSION}-ubuntu -f Dockerfile.ubuntu . cd ../ace-basic -docker build --build-arg DOWNLOAD_URL --build-arg PRODUCT_LABEL -t ace-basic:${PRODUCT_VERSION}-ubuntu -f Dockerfile.ubuntu . +docker build --build-arg DOWNLOAD_URL --build-arg DOWNLOAD_CONNECTION_COUNT -t ace-basic:${PRODUCT_VERSION}-ubuntu -f Dockerfile.ubuntu . + +cd ../devcontainers +docker build --build-arg DOWNLOAD_URL --build-arg DOWNLOAD_CONNECTION_COUNT -t ace-devcontainer:${PRODUCT_VERSION} -f Dockerfile . +docker build --build-arg DOWNLOAD_URL --build-arg DOWNLOAD_CONNECTION_COUNT -t ace-minimal-devcontainer:${PRODUCT_VERSION} -f Dockerfile.ace-minimal . +docker build --build-arg DOWNLOAD_URL --build-arg DOWNLOAD_CONNECTION_COUNT -t ace-devcontainer-mqclient:${PRODUCT_VERSION} -f Dockerfile.mqclient . cd ../sample # Normally only one of these would be built, and would be tagged with an application version docker build --build-arg LICENSE=accept --build-arg BASE_IMAGE=ace-minimal:${PRODUCT_VERSION}-alpine -t ace-sample:${PRODUCT_VERSION}-alpine -f Dockerfile . -docker build --build-arg LICENSE=accept --build-arg BASE_IMAGE=ace-minimal:${PRODUCT_VERSION}-alpine-openjdk16 -t ace-sample:${PRODUCT_VERSION}-alpine-openjdk16 -f Dockerfile . +docker build --build-arg LICENSE=accept --build-arg BASE_IMAGE=ace-minimal:${PRODUCT_VERSION}-alpine-java11 -t ace-sample:${PRODUCT_VERSION}-alpine-java11 -f Dockerfile . docker build --build-arg LICENSE=accept --build-arg BASE_IMAGE=ace-minimal:${PRODUCT_VERSION}-ubuntu -t ace-sample:${PRODUCT_VERSION}-ubuntu -f Dockerfile . docker build --build-arg LICENSE=accept --build-arg BASE_IMAGE=ace-full:${PRODUCT_VERSION}-ubuntu -t ace-sample:${PRODUCT_VERSION}-full-ubuntu -f Dockerfile . + diff --git a/experimental/devcontainers/Dockerfile b/experimental/devcontainers/Dockerfile index f9b8393..c65e29d 100644 --- a/experimental/devcontainers/Dockerfile +++ b/experimental/devcontainers/Dockerfile @@ -4,12 +4,13 @@ MAINTAINER Trevor Dolby (@trevor-dolby-at-ibm-com) # Build: # -# docker build -t ace-devcontainer:12.0.4.0 -f Dockerfile . +# docker build -t ace-devcontainer:12.0.10.0 -f Dockerfile . -ARG USERNAME -ARG PASSWORD -ARG DOWNLOAD_URL=http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.4.0-ACE-LINUX64-DEVELOPER.tar.gz -ARG PRODUCT_LABEL=ace-12.0.4.0 +# Later versions from the same site, or else via the Developer edition download site linked from +# https://www.ibm.com/docs/en/app-connect/12.0?topic=enterprise-download-ace-developer-edition-get-started +ARG DOWNLOAD_URL=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.10.0-ACE-LINUX64-DEVELOPER.tar.gz +# Can be set higher if needed +ARG DOWNLOAD_CONNECTION_COUNT=1 # Prevent errors about having no terminal when using apt-get ENV DEBIAN_FRONTEND noninteractive @@ -18,18 +19,24 @@ ENV DEBIAN_FRONTEND noninteractive COPY excludes*txt /tmp/ RUN cat /tmp/excludes-base.txt >> /tmp/all-excludes.txt && \ +# Java11 is not required + cat /tmp/excludes-java11.txt >> /tmp/all-excludes.txt && \ +# ToolkitDiscovery connectors are optional + cat /tmp/excludes-nodejs-all.txt >> /tmp/all-excludes.txt && \ # Toolkit is optional cat /tmp/excludes-tools.txt >> /tmp/all-excludes.txt && \ # WSRR nodes are optional cat /tmp/excludes-wsrr.txt >> /tmp/all-excludes.txt # Install ACE and accept the license -RUN apt-get update && apt-get install -y --no-install-recommends curl zip binutils && \ +RUN apt-get update && apt-get install -y aria2 zip binutils && \ mkdir /opt/ibm && \ + cd /tmp && \ echo Downloading package ${DOWNLOAD_URL} && \ - curl ${DOWNLOAD_URL} \ - | tar zx --exclude-from=/tmp/all-excludes.txt --directory /opt/ibm && \ - mv /opt/ibm/${PRODUCT_LABEL} /opt/ibm/ace-12 && \ + aria2c -s ${DOWNLOAD_CONNECTION_COUNT} -j ${DOWNLOAD_CONNECTION_COUNT} -x ${DOWNLOAD_CONNECTION_COUNT} "${DOWNLOAD_URL}" && \ + tar -zxf *12.0*tar.gz --exclude-from=/tmp/all-excludes.txt --directory /opt/ibm && \ + rm -f *12.0*tar.gz && \ + mv /opt/ibm/ace-12.* /opt/ibm/ace-12 && \ find /opt/ibm -name "*.so*" -exec strip {} ";" && \ find /opt/ibm -name "*.wrk" -exec strip {} ";" && \ find /opt/ibm -name "*.lil" -exec strip {} ";" && \ diff --git a/experimental/devcontainers/Dockerfile.ace-minimal b/experimental/devcontainers/Dockerfile.ace-minimal index a3bcacf..5b57f44 100644 --- a/experimental/devcontainers/Dockerfile.ace-minimal +++ b/experimental/devcontainers/Dockerfile.ace-minimal @@ -4,12 +4,13 @@ MAINTAINER Trevor Dolby (@trevor-dolby-at-ibm-com) # Build: # -# docker build -t ace-minimal-devcontainer:12.0.4.0 -f Dockerfile.ace-minimal . +# docker build -t ace-minimal-devcontainer:12.0.10.0 -f Dockerfile.ace-minimal . -ARG USERNAME -ARG PASSWORD -ARG DOWNLOAD_URL=http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.4.0-ACE-LINUX64-DEVELOPER.tar.gz -ARG PRODUCT_LABEL=ace-12.0.4.0 +# Later versions from the same site, or else via the Developer edition download site linked from +# https://www.ibm.com/docs/en/app-connect/12.0?topic=enterprise-download-ace-developer-edition-get-started +ARG DOWNLOAD_URL=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.10.0-ACE-LINUX64-DEVELOPER.tar.gz +# Can be set higher if needed +ARG DOWNLOAD_CONNECTION_COUNT=1 # Prevent errors about having no terminal when using apt-get ENV DEBIAN_FRONTEND noninteractive @@ -28,12 +29,16 @@ RUN cat /tmp/excludes-base.txt >> /tmp/all-excludes.txt && \ cat /tmp/excludes-globalcache.txt >> /tmp/all-excludes.txt && \ # IMS is optional cat /tmp/excludes-ims.txt >> /tmp/all-excludes.txt && \ +# Java11 is not required + cat /tmp/excludes-java11.txt >> /tmp/all-excludes.txt && \ # node.js support is optional; use --no-nodejs on server start line cat /tmp/excludes-nodejs.txt >> /tmp/all-excludes.txt && \ # NPM install support is optional cat /tmp/excludes-npm.txt >> /tmp/all-excludes.txt && \ # ODBC drivers are optional cat /tmp/excludes-odbc.txt >> /tmp/all-excludes.txt && \ +# Telemetry is optional + cat /tmp/excludes-telemetry.txt >> /tmp/all-excludes.txt && \ # Toolkit is optional cat /tmp/excludes-tools.txt >> /tmp/all-excludes.txt && \ # Web UI support optional; use --admin-rest-api -1 on server start line @@ -44,12 +49,14 @@ RUN cat /tmp/excludes-base.txt >> /tmp/all-excludes.txt && \ cat /tmp/excludes-xmlt.txt >> /tmp/all-excludes.txt # Install ACE and accept the license -RUN apt-get update && apt-get install -y --no-install-recommends curl zip binutils && \ +RUN apt-get update && apt-get install -y aria2 zip binutils && \ mkdir /opt/ibm && \ + cd /tmp && \ echo Downloading package ${DOWNLOAD_URL} && \ - curl ${DOWNLOAD_URL} \ - | tar zx --exclude-from=/tmp/all-excludes.txt --directory /opt/ibm && \ - mv /opt/ibm/${PRODUCT_LABEL} /opt/ibm/ace-12 && \ + aria2c -s ${DOWNLOAD_CONNECTION_COUNT} -j ${DOWNLOAD_CONNECTION_COUNT} -x ${DOWNLOAD_CONNECTION_COUNT} "${DOWNLOAD_URL}" && \ + tar -zxf *12.0*tar.gz --exclude-from=/tmp/all-excludes.txt --directory /opt/ibm && \ + rm -f *12.0*tar.gz && \ + mv /opt/ibm/ace-12.* /opt/ibm/ace-12 && \ find /opt/ibm -name "*.so*" -exec strip {} ";" && \ find /opt/ibm -name "*.wrk" -exec strip {} ";" && \ find /opt/ibm -name "*.lil" -exec strip {} ";" && \ @@ -64,6 +71,9 @@ RUN usermod -a -G mqbrkrs vscode \ && echo ". /opt/ibm/ace-12/server/bin/mqsiprofile" >> /home/vscode/.bashrc \ && echo ". /opt/ibm/ace-12/server/bin/mqsiprofile" >> /home/vscode/.profile +# Switch off the components that aren't in the image +COPY minimal-image.components.yaml /opt/ibm/ace-12/image.components.yaml + # Install Maven for development use. # # The standard Maven packages on most distros bring a lot of extra packages with diff --git a/experimental/devcontainers/Dockerfile.mqclient b/experimental/devcontainers/Dockerfile.mqclient index b592aeb..6dbe47d 100644 --- a/experimental/devcontainers/Dockerfile.mqclient +++ b/experimental/devcontainers/Dockerfile.mqclient @@ -4,13 +4,14 @@ MAINTAINER Trevor Dolby (@trevor-dolby-at-ibm-com) # Build: # -# docker build -t ace-devcontainer-mqclient:12.0.4.0 -f Dockerfile.mqclient . +# docker build -t ace-devcontainer-mqclient:12.0.10.0 -f Dockerfile.mqclient . -ARG USERNAME -ARG PASSWORD -ARG DOWNLOAD_URL=http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.4.0-ACE-LINUX64-DEVELOPER.tar.gz -ARG PRODUCT_LABEL=ace-12.0.4.0 -ARG MQ_DOWNLOAD_URL=http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/9.3.1.0-IBM-MQC-Redist-LinuxX64.tar.gz +# Later versions from the same site, or else via the Developer edition download site linked from +# https://www.ibm.com/docs/en/app-connect/12.0?topic=enterprise-download-ace-developer-edition-get-started +ARG DOWNLOAD_URL=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.10.0-ACE-LINUX64-DEVELOPER.tar.gz +ARG MQ_DOWNLOAD_URL=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/9.3.2.0-IBM-MQC-Redist-LinuxX64.tar.gz +# Can be set higher if needed +ARG DOWNLOAD_CONNECTION_COUNT=1 # Prevent errors about having no terminal when using apt-get ENV DEBIAN_FRONTEND noninteractive @@ -19,18 +20,24 @@ ENV DEBIAN_FRONTEND noninteractive COPY excludes*txt /tmp/ RUN cat /tmp/excludes-base.txt >> /tmp/all-excludes.txt && \ +# Java11 is not required + cat /tmp/excludes-java11.txt >> /tmp/all-excludes.txt && \ +# ToolkitDiscovery connectors are optional + cat /tmp/excludes-nodejs-all.txt >> /tmp/all-excludes.txt && \ # Toolkit is optional cat /tmp/excludes-tools.txt >> /tmp/all-excludes.txt && \ # WSRR nodes are optional cat /tmp/excludes-wsrr.txt >> /tmp/all-excludes.txt # Install ACE and accept the license -RUN apt-get update && apt-get install -y --no-install-recommends curl zip binutils && \ +RUN apt-get update && apt-get install -y aria2 zip binutils && \ mkdir /opt/ibm && \ + cd /tmp && \ echo Downloading package ${DOWNLOAD_URL} && \ - curl ${DOWNLOAD_URL} \ - | tar zx --exclude-from=/tmp/all-excludes.txt --directory /opt/ibm && \ - mv /opt/ibm/${PRODUCT_LABEL} /opt/ibm/ace-12 && \ + aria2c -s ${DOWNLOAD_CONNECTION_COUNT} -j ${DOWNLOAD_CONNECTION_COUNT} -x ${DOWNLOAD_CONNECTION_COUNT} "${DOWNLOAD_URL}" && \ + tar -zxf *12.0*tar.gz --exclude-from=/tmp/all-excludes.txt --directory /opt/ibm && \ + rm -f *12.0*tar.gz && \ + mv /opt/ibm/ace-12.* /opt/ibm/ace-12 && \ find /opt/ibm -name "*.so*" -exec strip {} ";" && \ find /opt/ibm -name "*.wrk" -exec strip {} ";" && \ find /opt/ibm -name "*.lil" -exec strip {} ";" && \ diff --git a/experimental/devcontainers/excludes-java11.txt b/experimental/devcontainers/excludes-java11.txt new file mode 100644 index 0000000..54757ff --- /dev/null +++ b/experimental/devcontainers/excludes-java11.txt @@ -0,0 +1 @@ +*/common/java11 diff --git a/experimental/devcontainers/excludes-nodejs-all.txt b/experimental/devcontainers/excludes-nodejs-all.txt new file mode 100644 index 0000000..0787514 --- /dev/null +++ b/experimental/devcontainers/excludes-nodejs-all.txt @@ -0,0 +1,2 @@ +*/server/nodejs_all* + diff --git a/experimental/devcontainers/excludes-telemetry.txt b/experimental/devcontainers/excludes-telemetry.txt new file mode 100644 index 0000000..c8ff4f2 --- /dev/null +++ b/experimental/devcontainers/excludes-telemetry.txt @@ -0,0 +1,2 @@ +*/server/lib/libimbtelemetry.so +*/server/lil/imbopentelemetry.lil diff --git a/experimental/devcontainers/minimal-image.components.yaml b/experimental/devcontainers/minimal-image.components.yaml new file mode 100644 index 0000000..0c050c6 --- /dev/null +++ b/experimental/devcontainers/minimal-image.components.yaml @@ -0,0 +1,37 @@ +--- +# ACE Integration Server components file +# +# Created at 12.0.7.0 - 42cd3bab4d5746527981157e644b9cab-a00f286a885cfbb65a3fae1ad292e418 +# +# General notes : +# - Integration Server will load server.components.yaml from directory set via --work-dir +# - To ensure valid YAML avoid any use of TAB characters + +serverComponentsVersion: 1 +# reportExcludedComponents: true # Controls whether messages are written on integration server start-up indicating components are excluded. Default is true. + +# Main embedded run-times +NodeJS: false # Do not create NodeJS run-time within the Integration Server + +Nodes: + .NET: false # Controls whether the .NET nodes are loaded. + +JavaNodes: # If JVM is set to false then the JavaNodes section will not apply + Adapters: false # Controls whether the SAP, Oracle JD Edwards, Oracle Peoplesoft and Oracle Siebel nodes are loaded. + CICS: false # Controls whether the CICSRequest node is loaded. + IMS: false # Controls whether the IMSRequest node is loaded. + ODM: false # Controls whether the ODMRules node is loaded. + XSLT: false # Controls whether the XSLTransform nodes are loaded. + WSRR: false # Controls whether the WSRR EndpointLookup and RegistryLookup nodes are loaded (if this component is installed). + +JavaScriptNodes: # If NodeJS is set to false then the JavaScriptNodes section will not apply + Salesforce: false # Controls if the Salesforce connector is loaded. + LoopBack: false # Controls if the LoopBack connector is loaded. + +ResourceManagers: + GlobalCache: false # Controls whether the GlobalCache resources are loaded. + +FlowSecurityProviders: + LDAP: false # Controls whether the LDAP Security provider is loaded for message flow security. + TFIM: false # Controls whether the TFIM Security provider is loaded for message flow security. + WS-Trust: false # Controls whether the WS-Trust v1.3 STS Security provider is loaded for message flow security. diff --git a/experimental/windows/README.md b/experimental/windows/README.md new file mode 100644 index 0000000..33f4a89 --- /dev/null +++ b/experimental/windows/README.md @@ -0,0 +1,10 @@ +# Windows containers + +Simple docker images for ACE v12 on Windows, using Windows containers. These containers +will run Windows Server Core, and are not running Linux containers on Windows. + +Dockefiles in the following directories are used for various purposes: + +- ace-basic can run the product server, including all files except the toolkit. +- ace-sample contains a sample BAR file and Dockerfiles for building runnable images to serve HTTP clients. + diff --git a/experimental/windows/ace-basic/Dockerfile b/experimental/windows/ace-basic/Dockerfile new file mode 100644 index 0000000..a90553a --- /dev/null +++ b/experimental/windows/ace-basic/Dockerfile @@ -0,0 +1,27 @@ +ARG FROMIMAGE=mcr.microsoft.com/windows/servercore:ltsc2019 +#ARG FROMIMAGE=jenkins/agent:windowsservercore-ltsc2019 +FROM ${FROMIMAGE} + +# docker build -t ace-basic:12.0.10.0-windows . + +# Update as needed +ARG DOWNLOAD_URL=https://iwm.dhe.ibm.com/sdfdl/v2/regs2/mbford/Xa.2/Xb.WJL1CuPI9gANmbDdDxOhZ8PDHiJ0fYKPUUM7e4LXUys/Xc.12.0.10.0-ACE-WIN64-DEVELOPER.zip/Xd./Xf.lPr.D1vk/Xg.12203400/Xi.swg-wmbfd/XY.regsrvs/XZ.224GETTSkG6f3cguPd6ugJwv0vB5Q9nY/12.0.10.0-ACE-WIN64-DEVELOPER.zip + +WORKDIR c:\\tmp + +# The commands to download and install the ACE product are more easily +# run from a CMD file than from within the Dockerfile itself. +COPY download-and-install-ace.cmd c:\\tmp\\download-and-install-ace.cmd +RUN c:\\tmp\\download-and-install-ace.cmd %DOWNLOAD_URL% + +# Used to debug individual pieces +# +#COPY download-ace.cmd c:\\tmp\\download-ace.cmd +#RUN c:\\tmp\\download-ace.cmd %DOWNLOAD_URL% +#COPY unpack-ace.cmd c:\\tmp\\unpack-ace.cmd +#RUN c:\\tmp\\unpack-ace.cmd +#COPY install-ace.cmd c:\\tmp\\install-ace.cmd +#RUN c:\\tmp\\install-ace.cmd + +# Could also be set to ContainerUser +USER ContainerAdministrator diff --git a/experimental/windows/ace-basic/README.md b/experimental/windows/ace-basic/README.md new file mode 100644 index 0000000..33a5184 --- /dev/null +++ b/experimental/windows/ace-basic/README.md @@ -0,0 +1,50 @@ +# ACE server container for Windows + +This directory contains the files required to build a Windows container with a Windows +Server 2019 base image as the default. For other versions of Windows, see Microsoft +documentation for the correct base image, but note that the "nanoserver" base images +cannot be used with ACE due to their lack of MSI installer support. + +This image includes the ACE product without the UI components (no toolkit or Electron app) +but does include all the server components except the WSRR nodes. + +Build as follows: +``` +docker build -t ace-basic:12.0.10.0-windows . +``` + +The Dockerfile is constructed to minimize the resulting image size, with the downloaded +files extracted, installed, and deleted within a single RUN command to avoid persisting +the install image in a layer. See [Google's image-creation best practices](https://cloud.google.com/architecture/best-practices-for-building-containers#reduce_the_amount_of_clutter_in_your_image) +for more information on that approach and how it helps reduce image size. + +### Setting the correct product URL + +The Dockerfile takes a `DOWNLOAD_URL` parameter that will need to be specified to build +a specific version of the product. This is provided on the command line using the +`--build-arg` parameter, with a default in the Dockerfile that is unlikely to work. + +This value will need updating to an ACE developer edition URL from the IBM website. Start +at https://www.ibm.com/docs/en/app-connect/12.0?topic=enterprise-download-ace-developer-edition-get-started +and proceed through the pages until the main download page with a link: + +![download page](ace-dev-edition-download-windows.png) + +The link is likely to be of the form +``` +https://iwm.dhe.ibm.com/sdfdl/v2/regs2/mbford/Xa.2/Xb.WJL1cUPI9gANEhP8GuPD_qX1rj6x5R4yTUM7s_C2ue8/Xc.12.0.10.0-ACE-WIN64-DEVELOPER.zip/Xd./Xf.LpR.D1vk/Xg.12164875/Xi.swg-wmbfd/XY.regsrvs/XZ.pPVETUejcqPsVfDVKbdNu6IRpo4TkyKu/12.0.10.0-ACE-WIN64-DEVELOPER.zip +``` +Copy that link into the Dockerfile itself or use it as the DOWNLOAD_URL build parameter. + +## Building a Jenkins worker image + +ACE can be used in a Jenkins container built from the standard Jenkins-provided +Windows container. To build an ACE-enabled container image, add +`--build-arg FROMIMAGE=jenkins/agent:windowsservercore-ltsc2019` to the server build line above: +``` +docker build --build-arg FROMIMAGE=jenkins/agent:windowsservercore-ltsc2019 -t ace-jenkins:12.0.10.0-windows . +``` +and refer to it as normal from Jenkins. For a Jenkins pipeline, this might look as follows: +``` + agent { docker { image 'ace-jenkins:12.0.10.0-windows' } } +``` \ No newline at end of file diff --git a/experimental/windows/ace-basic/ace-dev-edition-download-windows.png b/experimental/windows/ace-basic/ace-dev-edition-download-windows.png new file mode 100644 index 0000000..c97dc11 Binary files /dev/null and b/experimental/windows/ace-basic/ace-dev-edition-download-windows.png differ diff --git a/experimental/windows/ace-basic/download-ace.cmd b/experimental/windows/ace-basic/download-ace.cmd new file mode 100644 index 0000000..e4c51b4 --- /dev/null +++ b/experimental/windows/ace-basic/download-ace.cmd @@ -0,0 +1,11 @@ +ECHO ON + +echo %1 +cd c:\tmp +ipconfig /all + +netsh interface ip set dns name="Ethernet" static 8.8.8.8 +curl --location -o aria2.zip https://github.com/aria2/aria2/releases/download/release-1.36.0/aria2-1.36.0-win-64bit-build1.zip +dir c:\tmp\aria2.zip +powershell -Command "Expand-Archive -Path c:\tmp\aria2.zip -DestinationPath c:\tmp\aria-unzip" +c:\tmp\aria-unzip\aria2-1.36.0-win-64bit-build1\aria2c.exe -s 10 -j 10 -x 10 %1 diff --git a/experimental/windows/ace-basic/download-and-install-ace.cmd b/experimental/windows/ace-basic/download-and-install-ace.cmd new file mode 100644 index 0000000..a47fe68 --- /dev/null +++ b/experimental/windows/ace-basic/download-and-install-ace.cmd @@ -0,0 +1,68 @@ +ECHO ON + +cd c:\tmp + +REM **************************************************************** +REM +REM Network setup - may not always be needed! +REM +REM **************************************************************** +ipconfig /all +REM Not clear why we need this sometimes, but DNS resolution doesn't always work out-of-the-box +netsh interface ip set dns name="Ethernet" static 8.8.8.8 + +REM **************************************************************** +REM +REM Download the aria2 utility to speed up the ACE download by using +REM multiple connections to the server. +REM +REM **************************************************************** +curl --location -o aria2.zip https://github.com/aria2/aria2/releases/download/release-1.36.0/aria2-1.36.0-win-64bit-build1.zip +dir c:\tmp\aria2.zip +powershell -Command "Expand-Archive -Path c:\tmp\aria2.zip -DestinationPath c:\tmp\aria-unzip" + + +REM **************************************************************** +REM +REM Download the ACE image and unzip it. +REM +REM **************************************************************** +c:\tmp\aria-unzip\aria2-1.36.0-win-64bit-build1\aria2c.exe -s 10 -j 10 -x 10 %1 +dir c:\tmp +powershell -Command "Expand-Archive -Path c:\tmp\12.0.10.0-ACE-WIN64-DEVELOPER.zip -DestinationPath c:\tmp\ace-unzip" +dir c:\tmp\ace-unzip + +REM **************************************************************** +REM +REM Install ACE itself with the correct options. Install logs will +REM be placed in the %TEMP% directory if anything goes wrong. +REM +REM Note that the .Net DLLs don't seem to install correctly from the +REM installer itself, but can be installed explicitly afterwards. +REM +REM Default would normally be +REM [0660:0760][2023-03-10T17:21:57]i000: Initializing string variable 'LICENSE_ACCEPTED' to value 'false' +REM [0660:0760][2023-03-10T17:21:57]i000: Initializing string variable 'InstallToolkit' to value '1' +REM [0660:0760][2023-03-10T17:21:57]i000: Initializing string variable 'InstallElectronApp' to value '1' +REM [0660:0760][2023-03-10T17:21:57]i000: Initializing string variable 'InstallCloudConnectors' to value '1' +REM [0660:0760][2023-03-10T17:21:57]i000: Initializing string variable 'InstallWSRRnodes' to value '0' +REM [0660:0760][2023-03-10T17:21:57]i000: Initializing string variable 'InstallGAC' to value '1' +REM +REM **************************************************************** +cd c:\tmp\ace-unzip\ +.\ACESetup12.0.10.0.exe /quiet LICENSE_ACCEPTED=true InstallFolder=C:\ace-12 InstallToolkit=0 InstallGAC=0 InstallElectronApp=0 +REM Install the .Net support DLLs +call c:\ace-12\server\bin\runCommand.cmd C:\ace-12\server\bin\mqsiAssemblyInstall -i C:\ace-12\server\bin\IBM.Broker.Plugin.dll +call c:\ace-12\server\bin\runCommand.cmd C:\ace-12\server\bin\mqsiAssemblyInstall -i C:\ace-12\server\bin\IBM.Broker.Support.dll +call c:\ace-12\server\bin\runCommand.cmd C:\ace-12\server\bin\mqsiAssemblyInstall -i C:\ace-12\server\bin\microsoft.crm.sdk.proxy.dll +call c:\ace-12\server\bin\runCommand.cmd C:\ace-12\server\bin\mqsiAssemblyInstall -i C:\ace-12\server\bin\microsoft.xrm.sdk.dll +call c:\ace-12\server\bin\runCommand.cmd C:\ace-12\server\bin\mqsiAssemblyInstall -i C:\ace-12\server\bin\Microsoft.IdentityModel.dll + +REM **************************************************************** +REM +REM Clean up to make the resulting image size smaller. +REM +REM **************************************************************** +cd c:\tmp +rmdir /s /q c:\tmp\ace-unzip +del /q c:\tmp\12*.zip diff --git a/experimental/windows/ace-basic/install-ace.cmd b/experimental/windows/ace-basic/install-ace.cmd new file mode 100644 index 0000000..27b92f2 --- /dev/null +++ b/experimental/windows/ace-basic/install-ace.cmd @@ -0,0 +1,13 @@ +ECHO ON + +dir c:\tmp +dir c:\tmp\ace-unzip + +cd c:\tmp\ace-unzip\ +.\ACESetup12.0.10.0.exe /quiet LICENSE_ACCEPTED=true InstallFolder=C:\ace-v12 InstallToolkit=0 InstallGAC=0 +REM Install the .Net support DLLs +call c:\ace-v12\server\bin\runCommand.cmd C:\ace-v12\server\bin\mqsiAssemblyInstall -i C:\ace-v12\server\bin\IBM.Broker.Plugin.dll +call c:\ace-v12\server\bin\runCommand.cmd C:\ace-v12\server\bin\mqsiAssemblyInstall -i C:\ace-v12\server\bin\IBM.Broker.Support.dll +call c:\ace-v12\server\bin\runCommand.cmd C:\ace-v12\server\bin\mqsiAssemblyInstall -i C:\ace-v12\server\bin\microsoft.crm.sdk.proxy.dll +call c:\ace-v12\server\bin\runCommand.cmd C:\ace-v12\server\bin\mqsiAssemblyInstall -i C:\ace-v12\server\bin\microsoft.xrm.sdk.dll +call c:\ace-v12\server\bin\runCommand.cmd C:\ace-v12\server\bin\mqsiAssemblyInstall -i C:\ace-v12\server\bin\Microsoft.IdentityModel.dll diff --git a/experimental/windows/ace-basic/unpack-ace.cmd b/experimental/windows/ace-basic/unpack-ace.cmd new file mode 100644 index 0000000..ce7adea --- /dev/null +++ b/experimental/windows/ace-basic/unpack-ace.cmd @@ -0,0 +1,7 @@ +ECHO ON + +dir c:\tmp + + +powershell -Command "Expand-Archive -Path c:\tmp\12.0.10.0-ACE-WIN64-DEVELOPER.zip -DestinationPath c:\tmp\ace-unzip" +dir c:\tmp\ace-unzip \ No newline at end of file diff --git a/experimental/windows/ace-sample/Dockerfile b/experimental/windows/ace-sample/Dockerfile new file mode 100644 index 0000000..c4aba71 --- /dev/null +++ b/experimental/windows/ace-sample/Dockerfile @@ -0,0 +1,15 @@ +# Override for other variants +ARG BASE_IMAGE=ace-basic:12.0.10.0-windows +FROM $BASE_IMAGE + +# docker build -t ace-sample:12.0.10.0-windows . +# docker run -p 7800:7800 --rm -ti ace-sample:12.0.10.0-windows + +COPY aceFunction.bar c:\\tmp\\aceFunction.bar + +RUN c:\\ace-12\\ace.cmd mqsicreateworkdir c:\\tmp\\ace-server +RUN c:\\ace-12\\ace.cmd mqsibar -c -a c:\\tmp\\aceFunction.bar -w c:\\tmp\\ace-server +#RUN c:\\ace-12\\ace.cmd ibmint optimize server --work-dir c:\\tmp\\ace-server + +# Set entrypoint to run the server +ENTRYPOINT ["c:\\ace-12\\ace.cmd", "IntegrationServer", "-w", "c:\\tmp\\ace-server", "--no-nodejs", "--admin-rest-api", "-1"] diff --git a/experimental/windows/ace-sample/README.md b/experimental/windows/ace-sample/README.md new file mode 100644 index 0000000..8afed5c --- /dev/null +++ b/experimental/windows/ace-sample/README.md @@ -0,0 +1,18 @@ +# ACE sample container + +This directory contains the files required to build a Windows container with a sample +ACE application that runs automatically when the container is started. This container +is built on top of the [ace-basic](../ace-basic) container. + +## Building and running the sample + +Build as follows: +``` +docker build -t ace-sample:12.0.10.0-windows . +``` + +To run the sample after building: +``` +docker run --rm -ti -p 7800:7800 ace-sample:12.0.10.0-windows +``` +and then `curl http://localhost:7800/test` should return `{"data":"a string from ACE"}` diff --git a/experimental/windows/ace-sample/aceFunction-PI.zip b/experimental/windows/ace-sample/aceFunction-PI.zip new file mode 100644 index 0000000..0508e38 Binary files /dev/null and b/experimental/windows/ace-sample/aceFunction-PI.zip differ diff --git a/experimental/windows/ace-sample/aceFunction.bar b/experimental/windows/ace-sample/aceFunction.bar new file mode 100644 index 0000000..39d02bc Binary files /dev/null and b/experimental/windows/ace-sample/aceFunction.bar differ diff --git a/experimental/windows/server2016/Dockerfile b/experimental/windows/server2016/Dockerfile deleted file mode 100644 index 3859c46..0000000 --- a/experimental/windows/server2016/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM mcr.microsoft.com/windows/servercore:ltsc2016 - -WORKDIR c:\\tmp -COPY ACESetup11.0.16742.4.exe c:\\tmp\\ACESetup.exe -# Install the product, but do not install the .Net support DLLs; installer issues prevent this from working -# in a Docker container -RUN c:\\tmp\\ACESetup.exe /quiet LICENSE_ACCEPTED=true InstallFolder=C:\\ace-v11 InstallToolkit=0 -# Install the .Net support DLLs -# RUN c:\\ace-v11\\server\\\bin\\\runCommand.cmd C:\\ace-v11\\server\\bin\\mqsiAssemblyInstall -i C:\\ace-v11\\server\\bin\\IBM.Broker.Plugin.dll -# RUN c:\\ace-v11\\server\\\bin\\\runCommand.cmd C:\\ace-v11\\server\\bin\\mqsiAssemblyInstall -i C:\\ace-v11\\server\\bin\\IBM.Broker.Support.dll -# RUN c:\\ace-v11\\server\\\bin\\\runCommand.cmd C:\\ace-v11\\server\\bin\\mqsiAssemblyInstall -i C:\\ace-v11\\server\\bin\\microsoft.crm.sdk.proxy.dll -# RUN c:\\ace-v11\\server\\\bin\\\runCommand.cmd C:\\ace-v11\\server\\bin\\mqsiAssemblyInstall -i C:\\ace-v11\\server\\bin\\microsoft.xrm.sdk.dll -# RUN c:\\ace-v11\\server\\\bin\\\runCommand.cmd C:\\ace-v11\\server\\bin\\mqsiAssemblyInstall -i C:\\ace-v11\\server\\bin\\Microsoft.IdentityModel.dll - -# Could also be set to ContainerUser -USER ContainerAdministrator diff --git a/experimental/windows/server2019/Dockerfile b/experimental/windows/server2019/Dockerfile deleted file mode 100644 index 80c064c..0000000 --- a/experimental/windows/server2019/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM mcr.microsoft.com/windows/servercore:2009 - -WORKDIR c:\\tmp -COPY ACESetup11.0.16742.4.exe c:\\tmp\\ACESetup.exe -# Install the product, but do not install the .Net support DLLs; installer issues prevent this from working -# in a Docker container -RUN c:\\tmp\\ACESetup.exe /quiet LICENSE_ACCEPTED=true InstallFolder=C:\\ace-v11 InstallToolkit=0 InstallGAC=0 -# Install the .Net support DLLs -RUN c:\\ace-v11\\server\\\bin\\\runCommand.cmd C:\\ace-v11\\server\\bin\\mqsiAssemblyInstall -i C:\\ace-v11\\server\\bin\\IBM.Broker.Plugin.dll -RUN c:\\ace-v11\\server\\\bin\\\runCommand.cmd C:\\ace-v11\\server\\bin\\mqsiAssemblyInstall -i C:\\ace-v11\\server\\bin\\IBM.Broker.Support.dll -RUN c:\\ace-v11\\server\\\bin\\\runCommand.cmd C:\\ace-v11\\server\\bin\\mqsiAssemblyInstall -i C:\\ace-v11\\server\\bin\\microsoft.crm.sdk.proxy.dll -RUN c:\\ace-v11\\server\\\bin\\\runCommand.cmd C:\\ace-v11\\server\\bin\\mqsiAssemblyInstall -i C:\\ace-v11\\server\\bin\\microsoft.xrm.sdk.dll -RUN c:\\ace-v11\\server\\\bin\\\runCommand.cmd C:\\ace-v11\\server\\bin\\mqsiAssemblyInstall -i C:\\ace-v11\\server\\bin\\Microsoft.IdentityModel.dll - -# Could also be set to ContainerUser -USER ContainerAdministrator diff --git a/experimental/windows/server2022/Dockerfile b/experimental/windows/server2022/Dockerfile deleted file mode 100755 index dbe314b..0000000 --- a/experimental/windows/server2022/Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -FROM mcr.microsoft.com/windows/servercore/insider:10.0.20348.1 - -WORKDIR c:\\tmp -COPY ACESetup12.0.1.0.exe c:\\tmp\\ACESetup.exe -# Install the product, but do not install the .Net support DLLs; installer issues prevent this from working -# in a Docker container -RUN c:\\tmp\\ACESetup.exe /quiet LICENSE_ACCEPTED=true InstallFolder=C:\\ace-v12 InstallToolkit=0 InstallGAC=0 -# Install the .Net support DLLs -RUN c:\\ace-v12\\server\\\bin\\\runCommand.cmd C:\\ace-v12\\server\\bin\\mqsiAssemblyInstall -i C:\\ace-v12\\server\\bin\\IBM.Broker.Plugin.dll -RUN c:\\ace-v12\\server\\\bin\\\runCommand.cmd C:\\ace-v12\\server\\bin\\mqsiAssemblyInstall -i C:\\ace-v12\\server\\bin\\IBM.Broker.Support.dll -RUN c:\\ace-v12\\server\\\bin\\\runCommand.cmd C:\\ace-v12\\server\\bin\\mqsiAssemblyInstall -i C:\\ace-v12\\server\\bin\\microsoft.crm.sdk.proxy.dll -RUN c:\\ace-v12\\server\\\bin\\\runCommand.cmd C:\\ace-v12\\server\\bin\\mqsiAssemblyInstall -i C:\\ace-v12\\server\\bin\\microsoft.xrm.sdk.dll -RUN c:\\ace-v12\\server\\\bin\\\runCommand.cmd C:\\ace-v12\\server\\bin\\mqsiAssemblyInstall -i C:\\ace-v12\\server\\bin\\Microsoft.IdentityModel.dll - -# Could also be set to ContainerUser -USER ContainerAdministrator diff --git a/samples/bars/Dockerfile b/samples/bars/Dockerfile index fd18a5f..5c3d6e2 100644 --- a/samples/bars/Dockerfile +++ b/samples/bars/Dockerfile @@ -1,4 +1,4 @@ -ARG FROMIMAGE=cp.icr.io/cp/appc/ace:12.0.7.0-r1 +ARG FROMIMAGE=cp.icr.io/cp/appc/ace:12.0.10.0-r1 FROM ${FROMIMAGE} USER root @@ -20,6 +20,7 @@ RUN export LICENSE=accept \ ibmint package --compile-maps-and-schemas --input-bar-file "$FILE" --output-bar-file /tmp/temp.bar 2>&1 | tee -a /tmp/deploys && \ ibmint deploy --input-bar-file /tmp/temp.bar --output-work-directory /home/aceuser/ace-server/ 2>&1 | tee -a /tmp/deploys; done \ && ibmint optimize server --work-dir /home/aceuser/ace-server \ - && chmod -R ugo+rwx /home/aceuser/ + && chmod -R ugo+rwx /home/aceuser/ \ + && chmod -R ugo+rwx /var/mqsi/ USER 1001 diff --git a/samples/bars/README.md b/samples/bars/README.md index 0a72a33..86415a7 100644 --- a/samples/bars/README.md +++ b/samples/bars/README.md @@ -26,7 +26,7 @@ First [build the ACE image](../../README.md#Building-a-container-image) or obtai In the `sample/bars` folder: ```bash -docker build -t aceapp --build-arg FROMIMAGE=ace:12.0.7.0-r1 --file Dockerfile . +docker build -t aceapp --build-arg FROMIMAGE=ace:12.0.10.0-r1 --file Dockerfile . ``` ## Running the sample @@ -44,6 +44,6 @@ To exercise the flow, run a command such as: ```bash curl --request GET \ - --url 'http://96fa448ea76e:7800/customerdb/v1/customers?max=REPLACE_THIS_VALUE' \ + --url 'http://localhost:7800/customerdb/v1/customers?max=10' \ --header 'accept: application/json' ``` diff --git a/samples/mqclient/Dockerfile b/samples/mqclient/Dockerfile index ea0d448..2aa72b1 100644 --- a/samples/mqclient/Dockerfile +++ b/samples/mqclient/Dockerfile @@ -1,4 +1,4 @@ -ARG FROMIMAGE=cp.icr.io/cp/appc/ace:12.0.8.0-r1 +ARG FROMIMAGE=cp.icr.io/cp/appc/ace:12.0.10.0-r1 FROM ${FROMIMAGE} USER root @@ -27,4 +27,4 @@ RUN chmod u+x /usr/local/bin/install-*.sh \ ENV MQCERTLABL=aceclient -USER 1001 +USER 1001 \ No newline at end of file diff --git a/samples/mqclient/README.md b/samples/mqclient/README.md index e55d7ea..3f238b0 100644 --- a/samples/mqclient/README.md +++ b/samples/mqclient/README.md @@ -1,5 +1,5 @@ -# Bars Sample +# MQClient Sample ## What is in the sample? @@ -16,7 +16,7 @@ for the client. In this folder, run the docker command as follows (replacing the product version and MQ link as appropriate): ```bash -docker build -t aceapp --build-arg FROMIMAGE=cp.icr.io/cp/appc/ace:12.0.8.0-r1 --build-arg MQ_URL=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/9.3.2.0-IBM-MQC-Redist-LinuxX64.tar.gz --file Dockerfile . +docker build -t aceappmqclient --build-arg FROMIMAGE=cp.icr.io/cp/appc/ace:12.0.10.0-r1 --build-arg MQ_URL=https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/messaging/mqdev/redist/9.3.2.0-IBM-MQC-Redist-LinuxX64.tar.gz --file Dockerfile . ``` ## Running the sample @@ -24,7 +24,7 @@ docker build -t aceapp --build-arg FROMIMAGE=cp.icr.io/cp/appc/ace:12.0.8.0-r1 - To run the container, launch the pod using a command such as: ```bash -docker run -d -p 7600:7600 -p 7800:7800 -e LICENSE=accept aceapp +docker run -d -p 7600:7600 -p 7800:7800 -e LICENSE=accept aceappmqclient ``` This wll then start an IntegrationServer with the MQ Client installed. diff --git a/samples/mqclient/install-mq-client-prereqs.sh b/samples/mqclient/install-mq-client-prereqs.sh index a2f8222..0d3f607 100644 --- a/samples/mqclient/install-mq-client-prereqs.sh +++ b/samples/mqclient/install-mq-client-prereqs.sh @@ -22,11 +22,11 @@ test -f /usr/bin/microdnf && MICRODNF=true || MICRODNF=false test -f /usr/bin/rpm && RPM=true || RPM=false if ($RPM); then - EXTRA_RPMS="bash bc ca-certificates file findutils gawk glibc-common grep ncurses-compat-libs passwd procps-ng sed shadow-utils tar util-linux which" - $MICRODNF && microdnf install ${EXTRA_RPMS} + EXTRA_RPMS="bash bc ca-certificates file findutils gawk glibc-common grep passwd procps-ng sed shadow-utils tar util-linux which" + $MICRODNF && microdnf install -y ${EXTRA_RPMS} else - $MICRODNF && microdnf install findutils + $MICRODNF && microdnf install -y findutils fi # Clean up cached files -$MICRODNF && microdnf clean all \ No newline at end of file +$MICRODNF && microdnf clean all diff --git a/samples/scripts/Dockerfile b/samples/scripts/Dockerfile index d3e6f7b..ca28a26 100644 --- a/samples/scripts/Dockerfile +++ b/samples/scripts/Dockerfile @@ -1,10 +1,10 @@ -ARG FROMIMAGE=cp.icr.io/cp/appc/ace:12.0.4.0-r1 +ARG FROMIMAGE=cp.icr.io/cp/appc/ace:12.0.10.0-r1 FROM ${FROMIMAGE} USER root # Required for the setdbparms script to run -RUN microdnf update && microdnf install python3 && microdnf clean all \ +RUN microdnf update && microdnf install -y python3 && microdnf clean all \ && ln -s /usr/bin/python3 /usr/local/bin/python COPY server.conf.yaml /home/aceuser/ace-server/ @@ -13,4 +13,4 @@ RUN mkdir -p /home/aceuser/initial-config/setdbparms/ COPY ace_config_* /home/aceuser/initial-config/ RUN chmod -R ugo+rwx /home/aceuser/ -USER 1001 \ No newline at end of file +USER 1001 diff --git a/samples/scripts/README.md b/samples/scripts/README.md index 7fb09d0..3a3f82c 100644 --- a/samples/scripts/README.md +++ b/samples/scripts/README.md @@ -12,7 +12,7 @@ First [build the ACE image](../../README.md#Building-a-container-image) or obtai In the `sample/scripts` folder: ```bash -docker build -t aceapp --build-arg FROMIMAGE=ace:12.0.4.0-r1 --file Dockerfile . +docker build -t aceapp --build-arg FROMIMAGE=ace:12.0.10.0-r1 --file Dockerfile . ``` ## Running the sample