Skip to content

Commit 6f581ce

Browse files
tdolby-at-uk-ibm-comTrevor Dolby
andauthored
ace-minimal 12.0.2 update (#171)
* Update to fp11 * Correct build url * Add hybrid image and switch to numeric USER * Fix license issue * Exclude more unusued content * Switch to ace-minimal for hybrid s2i * OpenShift-related modifications * Update copy commands * Busybox find options * Buildah-related mod * OpenShift pipeline * Build reminder * Remove extraneous file * Fix pipeline name * RedHat pipeline updates * Update names * More tasks * Another attempt at repeatable artifacts * Change PVC name * Change UUID * Remove autosave * Change PV name * Remove PV name * Maven s2i updates * Update from local copy * Experiment updates * Fix non-executable scripts * Switch to product Java to pick up JDK in Alpine-based builds * Remove JDK link * Debug * Undo debugging help * Update for v12 images * v12 updates * Add image size picture * Move to later Alpine release Signed-off-by: Trevor Dolby <[email protected]> * Add apk upgrade Signed-off-by: Trevor Dolby <[email protected]> * Fix kaniko Alpine upgrade issue Signed-off-by: Trevor Dolby <[email protected]> * Add mqsicreatebar/toolkit instructions * ACE v12 updates Signed-off-by: Trevor Dolby <[email protected]> * README fixes Signed-off-by: Trevor Dolby <[email protected]> * Fix formatting * Add Windows Server 2022 Signed-off-by: Trevor Dolby <[email protected]> * ACE v12.0.2 update Signed-off-by: Trevor Dolby <[email protected]> * Switch default download location Signed-off-by: Trevor Dolby <[email protected]> * More 12.0.2 updates Signed-off-by: Trevor Dolby <[email protected]> Co-authored-by: Trevor Dolby <[email protected]>
1 parent 011885f commit 6f581ce

File tree

115 files changed

+1018
-1239
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+1018
-1239
lines changed

experimental/README.md

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,33 @@
11
# Experimental docker files
22

3-
Simple docker images for ACE v11 on Linux (amd64 and s390x) and Windows
3+
Simple docker images for ACE v12 on Linux (amd64 and s390x) and Windows
44

55
ace-full contains a Dockerfile for building an image that can run the full product, including mqsicreatebar with a virtual X server.
66

7+
ace-basic contains a Dockerfile for building an image that can run the product server, including all files except the toolkit.
8+
79
ace-minimal contains the Dockerfiles for building images that can run simple servers with a non-root user.
810

911
ace-sample contains a sample BAR file and Dockerfiles for building runnable images to serve HTTP clients.
1012

11-
1213
See build-all.sh for details on building the images; setting LICENSE=accept is required for all but the initial image builds.
1314

1415
To run the sample after building:
1516
```
16-
docker run -e LICENSE=accept --rm -ti ace-sample:11.0.0.9-minimal-alpine
17+
docker run -e LICENSE=accept --rm -ti ace-sample:12.0.2.0-minimal-alpine
1718
```
18-
and then curl http://<container IP>:7800/test should return '{"data":"a string from ACE"}'
19+
and then curl http://[container IP]:7800/test should return '{"data":"a string from ACE"}'
1920

2021
## Various sizes
2122
Local on kenya.hursley.uk.ibm.com (debian 10) with defaults in Dockerfiles:
2223

2324
```
24-
ace-minimal:11.0.0.9-alpine-openjdk14 a224eb57078c 39 seconds ago 682MB
25-
ace-minimal:11.0.0.9-ubuntu 5541e188b068 6 minutes ago 896MB
26-
ace-minimal:11.0.0.9-alpine c906eaa3ba7e 25 minutes ago 524MB
27-
ace-full:11.0.0.9-ubuntu e7a8e54f20cf 4 minutes ago 2.48GB
28-
```
29-
30-
Note that the first two have the web UI available on port 7600; removing that capability would leave them at
31-
32-
```
33-
ace-minimal:11.0.0.9-alpine-openjdk14 eabf8622343a 12 minutes ago 462MB
34-
ace-minimal:11.0.0.9-ubuntu a2cfcf555038 18 minutes ago 676MB
25+
ace-minimal 12.0.2.0-alpine-openjdk16 2d02c13096c9 24 minutes ago 496MB
26+
ace-minimal 12.0.2.0-alpine-openjdk14 5c1d593ee96f 25 minutes ago 506MB
27+
ace-minimal 12.0.2.0-alpine 6775ce85b5fd 27 minutes ago 604MB
28+
ace-minimal 12.0.2.0-ubuntu a351cfebbd4d 26 minutes ago 684MB
29+
ace-basic 12.0.2.0-ubuntu 319227027474 19 minutes ago 1.48GB
30+
ace-full 12.0.2.0-ubuntu 73978ff4c598 20 minutes ago 3.02GB
3531
```
3632

37-
Most of these will fit into the IBM Cloud container registry free tier due to compression, but ace-full is too big for that.
33+
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.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
FROM ubuntu:20.04
2+
MAINTAINER Trevor Dolby <[email protected]> (@tdolby)
3+
4+
# Build and run:
5+
#
6+
# docker build -t ace-basic:12.0.2.0-ubuntu -f Dockerfile .
7+
# docker run -e LICENSE=accept -p 7600:7600 -p 7800:7800 --rm -ti ace-basic:12.0.2.0-ubuntu
8+
#
9+
# Can also mount a volume for the work directory:
10+
#
11+
# 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.2.0-ubuntu
12+
#
13+
# This might require a local directory with the right permissions, or changing the userid further down . . .
14+
15+
16+
ARG DOWNLOAD_URL=http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.2.0-ACE-LINUX64-DEVELOPER.tar.gz
17+
ARG PRODUCT_LABEL=ace-12.0.2.0
18+
19+
# Prevent errors about having no terminal when using apt-get
20+
ENV DEBIAN_FRONTEND noninteractive
21+
22+
# Install ACE v12.0.2.0 and accept the license
23+
RUN apt-get update && apt-get install -y --no-install-recommends curl && \
24+
mkdir /opt/ibm && echo Downloading package ${DOWNLOAD_URL} && \
25+
curl ${DOWNLOAD_URL} | tar zx --exclude=tools --directory /opt/ibm && \
26+
mv /opt/ibm/${PRODUCT_LABEL} /opt/ibm/ace-12 && \
27+
/opt/ibm/ace-12/ace make registry global accept license deferred
28+
29+
# Create a user to run as, create the ace workdir, and chmod script files
30+
RUN useradd --uid 1001 --create-home --home-dir /home/aceuser --shell /bin/bash -G mqbrkrs,sudo aceuser \
31+
&& su - aceuser -c "export LICENSE=accept && . /opt/ibm/ace-12/server/bin/mqsiprofile && mqsicreateworkdir /home/aceuser/ace-server" \
32+
&& echo ". /opt/ibm/ace-12/server/bin/mqsiprofile" >> /home/aceuser/.bashrc
33+
34+
# aceuser
35+
USER 1001
36+
37+
# Set entrypoint to run the server
38+
ENTRYPOINT ["bash", "-c", ". /opt/ibm/ace-12/server/bin/mqsiprofile && IntegrationServer -w /home/aceuser/ace-server"]
Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
11
FROM ubuntu:20.04
22
MAINTAINER Trevor Dolby <[email protected]> (@tdolby)
33

4-
# docker build -t ace-full:11.0.0.9-ubuntu -f Dockerfile.ubuntu .
4+
# docker build -t ace-full:12.0.2.0-ubuntu -f Dockerfile.ubuntu .
55

6-
ARG DOWNLOAD_URL=http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/11.0.0.9-ACE-LINUX64-DEVELOPER.tar.gz
7-
ARG PRODUCT_LABEL=ace-11.0.0.9
6+
ARG DOWNLOAD_URL=http://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/integration/12.0.2.0-ACE-LINUX64-DEVELOPER.tar.gz
7+
ARG PRODUCT_LABEL=ace-12.0.2.0
88

99
# Prevent errors about having no terminal when using apt-get
1010
ENV DEBIAN_FRONTEND noninteractive
1111

12-
# Install ACE v11.0.0.9 and accept the license
12+
# Install ACE v12.0.2.0 and accept the license
1313
RUN apt-get update && apt-get install -y --no-install-recommends curl && \
1414
mkdir /opt/ibm && echo Downloading package ${DOWNLOAD_URL} && \
1515
curl ${DOWNLOAD_URL} | tar zx --directory /opt/ibm && \
16-
mv /opt/ibm/${PRODUCT_LABEL} /opt/ibm/ace-11 && \
17-
/opt/ibm/ace-11/ace make registry global accept license deferred
16+
mv /opt/ibm/${PRODUCT_LABEL} /opt/ibm/ace-12 && \
17+
/opt/ibm/ace-12/ace make registry global accept license deferred
1818

1919
# Configure the system
20-
RUN echo "ACE_11:" > /etc/debian_chroot \
21-
&& echo ". /opt/ibm/ace-11/server/bin/mqsiprofile" >> /root/.bashrc
20+
RUN echo "ACE_12:" > /etc/debian_chroot \
21+
&& echo ". /opt/ibm/ace-12/server/bin/mqsiprofile" >> /root/.bashrc
2222

2323
# mqsicreatebar prereqs; need to run "Xvfb -ac :99 &" and "export DISPLAY=:99"
2424
RUN apt-get -y install libgtk2.0-0 libxtst6 xvfb
2525

2626
# Set BASH_ENV to source mqsiprofile when using docker exec bash -c
27-
ENV BASH_ENV=/opt/ibm/ace-11/server/bin/mqsiprofile
27+
ENV BASH_ENV=/opt/ibm/ace-12/server/bin/mqsiprofile
2828

2929
# Create a user to run as, create the ace workdir, and chmod script files
30-
RUN useradd --create-home --home-dir /home/aceuser --shell /bin/bash -G mqbrkrs,sudo aceuser \
31-
&& su - aceuser -c "export LICENSE=accept && . /opt/ibm/ace-11/server/bin/mqsiprofile && mqsicreateworkdir /home/aceuser/ace-server" \
32-
&& echo ". /opt/ibm/ace-11/server/bin/mqsiprofile" >> /home/aceuser/.bashrc
30+
RUN useradd --uid 1001 --create-home --home-dir /home/aceuser --shell /bin/bash -G mqbrkrs,sudo aceuser \
31+
&& su - aceuser -c "export LICENSE=accept && . /opt/ibm/ace-12/server/bin/mqsiprofile && mqsicreateworkdir /home/aceuser/ace-server" \
32+
&& echo ". /opt/ibm/ace-12/server/bin/mqsiprofile" >> /home/aceuser/.bashrc
3333

34-
USER aceuser
34+
# aceuser
35+
USER 1001
3536
ENTRYPOINT ["bash"]

experimental/ace-full/README.md

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
# ace-full
2+
3+
This image exists to enable the use of mqsicreatebar in build pipelines with ACE v12.
4+
5+
To build the image, run
6+
```
7+
docker build -t ace-full:12.0.2.0-ubuntu -f Dockerfile.ubuntu .
8+
```
9+
in this directory.
10+
11+
Containers must be started with the LICENSE environment variable set to "accept" for the
12+
product to be usable (for example, "-e LICENSE=accept" on a docker run command).
13+
14+
## Build image with mqsicreatebar
15+
16+
This container can be used as a base image for other build containers, or could be run with a
17+
volume mount containing the artifacts and scripts to be built. For mqsicreatebar to run without
18+
errors, an X-Windows server must be available even though no GUI activity is needed. This image
19+
contains a virtual X server that fulfils this need, and it must be started before running
20+
mqsicreatebar:
21+
22+
```
23+
Xvfb -ac :99 &
24+
export DISPLAY=:99
25+
```
26+
27+
where the first command starts the server, and the second sets the DISPLAY variable to point
28+
to the virtual server. The virtual X server must be started for each container, but many
29+
mqsicreatebar commands can be run after the server has been started once.
30+
31+
## Toolkit image with X-Windows
32+
33+
This image can also be used to run the ACE toolkit without needing it be installed on the
34+
host system as long as the host has an X-Windows display running. In this case, no virtual
35+
X server is needed, and the main issue is getting the authorization credentials into the
36+
container. To do this, mount the .Xauthority file from the host into the container as follows:
37+
38+
```
39+
chmod 664 ~/.Xauthority
40+
docker run -e LICENSE=accept -e DISPLAY --network=host -v $HOME/.Xauthority:/home/aceuser/.Xauthority --rm -ti ace-full:12.0.2.0-ubuntu
41+
```
42+
with the "--network=host" and "-e DISPLAY" settings allowing the container the network access
43+
it needs to get to the host X server. If there is no .Xauthority file in the home directory, it
44+
can be copied from /var/run/gdm on most systems, and in many cases the XAUTHORITY environment
45+
variable points to the correct location, so
46+
```
47+
cp $XAUTHORITY ~/.Xauthority
48+
chmod 664 ~/.Xauthority
49+
```
50+
creates the correct file. The chmod is needed due to the docker container running as a different
51+
user from the host user, and if the .Xauthority file is not readable then the toolkit will not be
52+
able to connect to the host display.
53+
54+
Assuming permissions are set correctly, then the docker run command above should lead to the
55+
standard ACE profile banner, and at that point it should be possible to start the toolkit:
56+
```
57+
MQSI 12.0.2.0
58+
/opt/ibm/ace-12/server
59+
60+
(ACE_12:)aceuser@tdolby-laptop:/$ /opt/ibm/ace-12/ace tools
61+
Starting App Connect Enterprise Toolkit interactively
62+
(ACE_12:)aceuser@tdolby-laptop:/$
63+
```
64+
65+
The toolkit may take some time to start, but should succeed in bringing up a splash screen
66+
and then a prompt for a workspace location.
67+
68+
### Errors from Xvfb
69+
70+
Attempting to run the Xvfb command from the mqsicreatebar section above while also using the
71+
X-Windows forwarding described in this section will lead to errors:
72+
```
73+
(ACE_12:)aceuser@tdolby-laptop:/$ Xvfb
74+
_XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
75+
_XSERVTransMakeAllCOTSServerListeners: server already running
76+
(EE)
77+
Fatal server error:
78+
(EE) Cannot establish any listening sockets - Make sure an X server isn't already running(EE)
79+
```
80+
In this case, the solution is to not attempt to run Xvfb when an X-Windows display has
81+
already been set: Xvfb is only present for "headless" running via scripts, and is not needed
82+
if the toolkit is used.

experimental/ace-image-sizes.png

24.2 KB
Loading
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
FROM alpine:3.14
2+
3+
# docker build -t alpine-openjdk14 -f Dockerfile-no-ace.alpine-openjdk14 .
4+
5+
MAINTAINER Trevor Dolby <[email protected]> (@tdolby)
6+
7+
ARG JDK_DOWNLOAD_URL=https://download.java.net/java/GA/jdk14.0.1/664493ef4a6946b186ff29eb326336a2/7/GPL/openjdk-14.0.1_linux-x64_bin.tar.gz
8+
ARG JDK_LABEL=jdk-14.0.1
9+
10+
11+
RUN apk --update add --no-cache --virtual .build-deps curl binutils zstd \
12+
&& GLIBC_VER="2.31-r0" \
13+
&& ALPINE_GLIBC_REPO="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \
14+
&& GCC_LIBS_URL="https://archive.archlinux.org/packages/g/gcc-libs/gcc-libs-10.1.0-2-x86_64.pkg.tar.zst" \
15+
&& GCC_LIBS_SHA256=f80320a03ff73e82271064e4f684cd58d7dbdb07aa06a2c4eea8e0f3c507c45c \
16+
&& ZLIB_URL="https://archive.archlinux.org/packages/z/zlib/zlib-1%3A1.2.11-4-x86_64.pkg.tar.xz" \
17+
&& ZLIB_SHA256=43a17987d348e0b395cb6e28d2ece65fb3b5a0fe433714762780d18c0451c149 \
18+
&& curl -Ls https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub -o /etc/apk/keys/sgerrand.rsa.pub \
19+
&& curl -Ls ${ALPINE_GLIBC_REPO}/${GLIBC_VER}/glibc-${GLIBC_VER}.apk > /tmp/${GLIBC_VER}.apk \
20+
&& apk add /tmp/${GLIBC_VER}.apk \
21+
&& curl -Ls ${GCC_LIBS_URL} -o /tmp/gcc-libs.tar.zst \
22+
&& echo "${GCC_LIBS_SHA256} /tmp/gcc-libs.tar.zst" | sha256sum -c - \
23+
&& mkdir /tmp/gcc \
24+
&& zstd -d /tmp/gcc-libs.tar.zst \
25+
&& tar -xf /tmp/gcc-libs.tar -C /tmp/gcc \
26+
&& mv /tmp/gcc/usr/lib/libgcc* /tmp/gcc/usr/lib/libstdc++* /usr/glibc-compat/lib \
27+
&& strip /usr/glibc-compat/lib/libgcc_s.so.* /usr/glibc-compat/lib/libstdc++.so* \
28+
&& curl -Ls ${ZLIB_URL} -o /tmp/libz.tar.xz \
29+
&& echo "${ZLIB_SHA256} /tmp/libz.tar.xz" | sha256sum -c - \
30+
&& mkdir /tmp/libz \
31+
&& tar -xf /tmp/libz.tar.xz -C /tmp/libz \
32+
&& mv /tmp/libz/usr/lib/libz.so* /usr/glibc-compat/lib \
33+
&& apk del --purge .build-deps \
34+
&& rm -rf /tmp/${GLIBC_VER}.apk /tmp/gcc /tmp/gcc-libs.tar* /tmp/libz /tmp/libz.tar* /var/cache/apk/* \
35+
&& mkdir /usr/glibc-compat/zlib-only \
36+
&& ( cd /usr/glibc-compat/lib && tar -cf - libz* ) | ( cd /usr/glibc-compat/zlib-only && tar -xf - ) \
37+
&& apk add 'apk-tools>2.12.5-r1'
38+
39+
ENV TZ=Europe/London
40+
41+
# Set the env vars mentioned above
42+
COPY profile-with-openjdk14-paths.sh /etc/profile.d/profile-with-openjdk14-paths.sh
43+
COPY openjdk14-paths.sh /etc/profile.d/openjdk14-paths.sh
44+
45+
46+
# Install openjdk
47+
RUN mkdir -p /opt/ibm && \
48+
apk add binutils zip bash curl && \
49+
cd /opt && \
50+
curl ${JDK_DOWNLOAD_URL} | tar -xzf - && \
51+
/opt/${JDK_LABEL}/bin/jlink --strip-debug --no-man-pages --no-header-files --output /opt/openjdk-14 --add-modules java.base,java.compiler,java.datatransfer,java.instrument,java.logging,java.management,java.management.rmi,java.naming,java.net.http,java.prefs,java.rmi,java.scripting,java.se,java.security.jgss,java.security.sasl,java.sql,java.sql.rowset,java.transaction.xa,java.xml,java.xml.crypto,jdk.accessibility,jdk.aot,jdk.attach,jdk.charsets,jdk.compiler,jdk.crypto.cryptoki,jdk.crypto.ec,jdk.dynalink,jdk.hotspot.agent,jdk.internal.ed,jdk.internal.jvmstat,jdk.internal.le,jdk.internal.opt,jdk.internal.vm.ci,jdk.internal.vm.compiler,jdk.internal.vm.compiler.management,jdk.jartool,jdk.jcmd,jdk.jconsole,jdk.jdeps,jdk.jdi,jdk.jdwp.agent,jdk.jfr,jdk.jlink,jdk.management,jdk.management.agent,jdk.management.jfr,jdk.naming.dns,jdk.naming.rmi,jdk.net,jdk.nio.mapmode,jdk.sctp,jdk.security.auth,jdk.security.jgss,jdk.unsupported,jdk.xml.dom,jdk.zipfs && \
52+
rm -rf /opt/${JDK_LABEL} && \
53+
apk del --purge binutils zip curl ncurses-terminfo-base ncurses-libs
54+
55+
56+
RUN apk add binutils zip bash curl && \
57+
addgroup mqbrkrs
58+
59+
# ln -s /opt/openjdk-14 /opt/ibm/ace-12/common/jdk/jre
60+
61+
# Create a user to run as, create the ace workdir, and chmod script files
62+
RUN ( echo "Passw0rd" ; echo "Passw0rd" ) | adduser -h /home/aceuser -s /bin/bash aceuser mqbrkrs && \
63+
adduser aceuser mqbrkrs && \
64+
mkdir /var/mqsi && chmod 777 /var/mqsi
65+
66+
USER aceuser
67+
ENTRYPOINT ["bash"]

0 commit comments

Comments
 (0)