Skip to content

Commit

Permalink
Merge pull request #201 from ot4i/12.0.10.0-r2
Browse files Browse the repository at this point in the history
updated too 12.0.10.0-r2
  • Loading branch information
andyedwardsibm authored Dec 11, 2023
2 parents 09a67e5 + ef7d7b5 commit 8f2080b
Show file tree
Hide file tree
Showing 58 changed files with 798 additions and 192 deletions.
27 changes: 16 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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 .
- 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
19 changes: 10 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand All @@ -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"]
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
51 changes: 36 additions & 15 deletions experimental/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

46 changes: 46 additions & 0 deletions experimental/ace-basic/Dockerfile.mqclient
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
FROM ubuntu:22.04

MAINTAINER Trevor Dolby <[email protected]> (@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
32 changes: 18 additions & 14 deletions experimental/ace-basic/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -1,31 +1,35 @@
FROM ubuntu:20.04
MAINTAINER Trevor Dolby <tdolby@uk.ibm.com> (@tdolby)
FROM ubuntu:22.04
MAINTAINER Trevor Dolby <trevor.dolby@ibm.com> (@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
Expand Down
Binary file added experimental/ace-dev-edition-download.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 17 additions & 9 deletions experimental/ace-full/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -1,19 +1,27 @@
FROM ubuntu:20.04
MAINTAINER Trevor Dolby <tdolby@uk.ibm.com> (@tdolby)
FROM ubuntu:22.04
MAINTAINER Trevor Dolby <trevor.dolby@ibm.com> (@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
Expand Down
5 changes: 5 additions & 0 deletions experimental/ace-full/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading

0 comments on commit 8f2080b

Please sign in to comment.