Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crane and v13 update #64

Merged
merged 13 commits into from
Nov 21, 2024
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/ace-toolkit-xvnc/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ace-demo-pipeline-toolkit-xvnc-devcontainer",
"image": "tdolby/experimental:ace-devcontainer-xvnc-12.0.11.0",
"image": "tdolby/experimental:ace-devcontainer-xvnc-13.0.1.0",
"containerEnv": {
"LICENSE": "accept"
},
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ace-demo-pipeline-devcontainer",
"image": "tdolby/experimental:ace-minimal-devcontainer-12.0.11.0",
"image": "tdolby/experimental:ace-minimal-devcontainer-13.0.1.0",
"containerEnv": {
"LICENSE": "accept"
},
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/quay.io-ace-toolkit-xvnc/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ace-demo-pipeline-quay.io-toolkit-xvnc-devcontainer",
"image": "quay.io/trevor_dolby/ace-devcontainer-xvnc:12.0.11.0",
"image": "quay.io/trevor_dolby/ace-devcontainer-xvnc:13.0.1.0",
"containerEnv": {
"LICENSE": "accept"
},
Expand Down
2 changes: 1 addition & 1 deletion .devcontainer/quay.io/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ace-demo-pipeline-devcontainer-quay-io",
"image": "quay.io/trevor_dolby/ace-minimal-devcontainer:12.0.11.0",
"image": "quay.io/trevor_dolby/ace-minimal-devcontainer:13.0.1.0",
"containerEnv": {
"LICENSE": "accept"
},
Expand Down
125 changes: 125 additions & 0 deletions .github/workflows/cp4i-image-crane.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
name: CP4i Image Build using Crane

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
container:
image: cp.icr.io/cp/appc/ace:13.0.1.0-r1
credentials:
username: ${{ secrets.CP_USERNAME }}
password: ${{ secrets.CP_PASSWORD }}
env:
LICENSE: accept
volumes:
- /var/run/docker.sock:/var/run/docker.sock
options: -u 0
steps:
- name: Install git
shell: bash
run: |
microdnf install git -y

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Build the application and test it
shell: bash
run: |
echo "Loading ACE profile"
export LICENSE=accept
set +e # Don't fail on error if the profile has already been loaded
. /opt/ibm/ace-13/server/bin/mqsiprofile
set -e # Fail on error - this must be done after the profile in case the container has the profile loaded already

echo ========================================================================
echo Building application
echo ========================================================================
# Using --compile-maps-and-schemas for 13.0.1 and later . . .
ibmint package --input-path . --output-bar-file $PWD/tea-application-combined.bar --project TeaSharedLibraryJava --project TeaSharedLibrary --project TeaRESTApplication --compile-maps-and-schemas

echo ========================================================================
echo Building unit tests
echo ========================================================================
# Create the unit test work directory
mqsicreateworkdir /tmp/test-work-dir
mqsibar -w /tmp/test-work-dir -a $PWD/tea-application-combined.bar
# Build just the unit tests
ibmint deploy --input-path . --output-work-directory /tmp/test-work-dir --project TeaRESTApplication_UnitTest

echo ========================================================================
echo Running unit tests
echo ========================================================================
IntegrationServer -w /tmp/test-work-dir --no-nodejs --start-msgflows false --test-project TeaRESTApplication_UnitTest --test-junit-options --reports-dir=junit-reports

- name: Create the container structure
run: |
echo "Loading ACE profile"
export LICENSE=accept
set +e # Don't fail on error if the profile has already been loaded
. /opt/ibm/ace-13/server/bin/mqsiprofile
set -e # Fail on error - this must be done after the profile in case the container has the profile loaded already
rm -rf /tmp/build
mkdir -p /tmp/build
echo ========================================================================
echo Creating work directory structure
echo ========================================================================
mqsicreateworkdir /tmp/build/ace-server
mqsibar -w /tmp/build/ace-server -a $PWD/tea-application-combined.bar
ibmint optimize server --work-dir /tmp/build/ace-server

echo ========================================================================
echo Copy in various startup files
echo ========================================================================
cp $PWD/demo-infrastructure/TEAJDBC.policyxml /tmp/build/ace-server/
cp $PWD/demo-infrastructure/application-overrides.txt /tmp/build/ace-server/
cp $PWD/demo-infrastructure/init-creds.sh /tmp/build/ace-server/ace-startup-script.sh
cp $PWD/demo-infrastructure/read-hashicorp-creds.sh /tmp/build/ace-server/
cp $PWD/demo-infrastructure/read-xml-creds.sh /tmp/build/ace-server/
cp tekton/os/cp4i/Dockerfile /tmp/build

- name: Install docker
run: |
set -e # Fail on error
cd /tmp && curl https://download.docker.com/linux/static/stable/x86_64/docker-27.1.1.tgz | tar -xzvf -
mv /tmp/docker/docker /usr/bin/docker

- name: Login to cp.icr.io (base images)
uses: docker/login-action@v3
with:
username: ${{ secrets.CP_USERNAME }}
password: ${{ secrets.CP_PASSWORD }}
registry: cp.icr.io

- name: Login to Docker Hub (destination)
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Create container image
run: |
# checkout v4 does this and the removes it
git config --global --add safe.directory $PWD

set -e # Fail on error

export DATE=$(date '+%Y%m%d%H%M%S')
export COMMIT=$(git log -1 --pretty=%h)
export TAG="$DATE"-"$COMMIT"
echo Setting container tag to "$TAG"

cd /tmp/build
chmod -R 777 .
echo ========================================================================
echo Building container image
echo ========================================================================
docker build --file Dockerfile --build-arg BASE_IMAGE=cp.icr.io/cp/appc/ace-server-prod:13.0.1.0-r2-20241024-142903 -t tdolby/experimental:tea-github-action-$TAG .

echo ========================================================================
echo Pushing container image
echo ========================================================================
docker push tdolby/experimental:tea-github-action-$TAG
59 changes: 59 additions & 0 deletions .github/workflows/cp4i-image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: CP4i Image Build

on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
container:
image: tdolby/experimental:ace-minimal-13.0.1.0-alpine
env:
LICENSE: accept
volumes:
- /var/run/docker.sock:/var/run/docker.sock
options: -u 0
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4

- name: Build the application and test it
shell: bash
run: |
echo "Loading ACE profile"
export LICENSE=accept
set +e # Don't fail on error if the profile has already been loaded
. /opt/ibm/ace-13/server/bin/mqsiprofile
set -e # Fail on error - this must be done after the profile in case the container has the profile loaded already

echo ========================================================================
echo Building application
echo ========================================================================
# Using --compile-maps-and-schemas for 13.0.1 and later . . .
ibmint package --input-path . --output-bar-file $PWD/tea-application-combined.bar --project TeaSharedLibraryJava --project TeaSharedLibrary --project TeaRESTApplication --compile-maps-and-schemas

echo ========================================================================
echo Building unit tests
echo ========================================================================
# Create the unit test work directory
mqsicreateworkdir /tmp/test-work-dir
mqsibar -w /tmp/test-work-dir -a $PWD/tea-application-combined.bar
# Build just the unit tests
ibmint deploy --input-path . --output-work-directory /tmp/test-work-dir --project TeaRESTApplication_UnitTest

echo ========================================================================
echo Running unit tests
echo ========================================================================
IntegrationServer -w /tmp/test-work-dir --no-nodejs --start-msgflows false --test-project TeaRESTApplication_UnitTest --test-junit-options --reports-dir=junit-reports

- name: Create the container structure
run: |
rm -rf /tmp/build
mkdir -p /tmp/build
cp tekton/Dockerfile /tmp/build/Dockerfile

- name: Install docker
run: |
unset LD_LIBRARY_PATH || /bin/true
apk add docker
4 changes: 2 additions & 2 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
build:
runs-on: ubuntu-latest
container:
image: tdolby/experimental:ace-minimal-build-12.0.11.0-alpine
image: tdolby/experimental:ace-minimal-build-13.0.1.0-alpine
volumes:
- /var/run/docker.sock:/var/run/docker.sock
options: -u 0
Expand Down Expand Up @@ -37,7 +37,7 @@ jobs:
- name: Build the image
run: |
cd /tmp/build
docker build --file Dockerfile --build-arg BASE_IMAGE=tdolby/experimental:ace-minimal-12.0.11.0-alpine -t tdolby/experimental:tea-github-action-latest .
docker build --file Dockerfile --build-arg BASE_IMAGE=tdolby/experimental:ace-minimal-13.0.1.0-alpine -t tdolby/experimental:tea-github-action-latest .

- name: Push the image
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/main-cp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
# Set the cp.icr.io ace container as runtime.
container:
image: cp.icr.io/cp/appc/ace:12.0.11.0-r1
image: cp.icr.io/cp/appc/ace:13.0.1.0-r1
credentials:
username: ${{ secrets.CP_USERNAME }}
password: ${{ secrets.CP_PASSWORD }}
Expand All @@ -28,13 +28,13 @@ jobs:
echo "Loading ACE profile"
export LICENSE=accept
set +e # Don't fail on error if the profile has already been loaded
. /opt/ibm/ace-12/server/bin/mqsiprofile
. /opt/ibm/ace-13/server/bin/mqsiprofile
set -e # Fail on error - this must be done after the profile in case the container has the profile loaded already

echo ========================================================================
echo Building application
echo ========================================================================
# Using --compile-maps-and-schemas for 12.0.11 and later . . .
# Using --compile-maps-and-schemas for 13.0.1 and later . . .
ibmint package --input-path . --output-bar-file $PWD/tea-application-combined.bar --project TeaSharedLibraryJava --project TeaSharedLibrary --project TeaRESTApplication --compile-maps-and-schemas

echo ========================================================================
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# The type of runner that the job will run on
runs-on: ubuntu-latest
container:
image: tdolby/experimental:ace-minimal-12.0.11.0-alpine
image: tdolby/experimental:ace-minimal-13.0.1.0-alpine
env:
LICENSE: accept
steps:
Expand All @@ -32,13 +32,13 @@ jobs:
echo "Loading ACE profile"
export LICENSE=accept
set +e # Don't fail on error if the profile has already been loaded
. /opt/ibm/ace-12/server/bin/mqsiprofile
. /opt/ibm/ace-13/server/bin/mqsiprofile
set -e # Fail on error - this must be done after the profile in case the container has the profile loaded already

echo ========================================================================
echo Building application
echo ========================================================================
# Using --compile-maps-and-schemas for 12.0.11 and later . . .
# Using --compile-maps-and-schemas for 13.0.1 and later . . .
ibmint package --input-path . --output-bar-file $PWD/tea-application-combined.bar --project TeaSharedLibraryJava --project TeaSharedLibrary --project TeaRESTApplication --compile-maps-and-schemas

echo ========================================================================
Expand Down
12 changes: 6 additions & 6 deletions Jenkinsfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pipeline {
agent { docker {
image 'cp.icr.io/cp/appc/ace:12.0.11.0-r1'
/* image 'ace-minimal:12.0.11.0-alpine' */
image 'cp.icr.io/cp/appc/ace:13.0.1.0-r1'
/* image 'ace-minimal:13.0.1.0-alpine' */
args '-e LICENSE=accept --entrypoint ""'
} }
parameters {
Expand All @@ -23,7 +23,7 @@ pipeline {
export HOME=/tmp

export LICENSE=accept
. /opt/ibm/ace-12/server/bin/mqsiprofile
. /opt/ibm/ace-13/server/bin/mqsiprofile

set -e # Fail on error - this must be done after the profile in case the container has the profile loaded already

Expand All @@ -34,7 +34,7 @@ pipeline {
echo ========================================================================
echo Building application
echo ========================================================================
# Using --compile-maps-and-schemas for 12.0.11 and later . . .
# Using --compile-maps-and-schemas for 13.0.1 and later . . .
ibmint package --input-path . --output-bar-file $PWD/tea-application-combined.bar --project TeaSharedLibraryJava --project TeaSharedLibrary --project TeaRESTApplication --compile-maps-and-schemas

echo ========================================================================
Expand Down Expand Up @@ -73,7 +73,7 @@ pipeline {
export HOME=/tmp

export LICENSE=accept
. /opt/ibm/ace-12/server/bin/mqsiprofile
. /opt/ibm/ace-13/server/bin/mqsiprofile

set -e # Fail on error - this must be done after the profile in case the container has the profile loaded already

Expand Down Expand Up @@ -109,7 +109,7 @@ pipeline {

stage('Next stage deploy') {
steps {
sh "bash -c \"export LICENSE=accept ; . /opt/ibm/ace-12/server/bin/mqsiprofile ; mqsideploy -i ${params.integrationNodeHost} -p ${params.integrationNodePort} -e ${params.integrationServerName} -a tea-application-combined.bar\""
sh "bash -c \"export LICENSE=accept ; . /opt/ibm/ace-13/server/bin/mqsiprofile ; mqsideploy -i ${params.integrationNodeHost} -p ${params.integrationNodePort} -e ${params.integrationServerName} -a tea-application-combined.bar\""
}
}

Expand Down
2 changes: 1 addition & 1 deletion Jenkinsfile.windows
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pipeline {
string(name: 'integrationServerName', defaultValue: 'default', description: 'Integration server name')
}
environment {
ACE_COMMAND = "C:\\Program Files\\IBM\\ACE\\12.0.11.0\\ace"
ACE_COMMAND = "C:\\Program Files\\IBM\\ACE\\13.0.1.0\\ace"
CT_JDBC = credentials('CT_JDBC')
}
stages {
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@ created on-demand to make setup easier, the logging goes to the console instead

## Recent changes

- Minikube added as the default "plain Kubernetes" option.
- ACE-as-a-Service added as a deploy target (see below).
- Upgraded to [ACE 13.0.1](https://community.ibm.com/community/user/integration/blogs/ben-thompson1/2024/09/27/ace-13-0-1-0)
- Uses [Crane](https://github.com/google/go-containerregistry/tree/main/cmd/crane) for faster container image builds.

## Technology and target options

Expand Down Expand Up @@ -60,7 +60,7 @@ ACE deploy targets currently include:
locally) and OpenShift can be used with the former, while the latter expects to deploy to the Cloud
Pak for Integration (CP4i). See [tekton/README.md#container-deploy-target](tekton/README.md#container-deploy-target)
for a description of the container deploy pipelines.
- [ACE-as-a-Service](https://www.ibm.com/docs/en/app-connect/12.0?topic=app-connect-enterprise-as-service)
- [ACE-as-a-Service](https://www.ibm.com/docs/en/app-connect/13.0?topic=app-connect-enterprise-as-service)
(ACEaaS) running on Amazon Web Services (AWS). This option requires an instance (which can be a trial instance)
of ACEaaS to be available but does not require ACE servers to managed directly (in virtual machines or containers)
as the flows run entirely in the cloud. See [demo-infrastructure/README-aceaas-pipelines.md](demo-infrastructure/README-aceaas-pipelines.md)
Expand Down Expand Up @@ -99,7 +99,7 @@ Regardless of the pipeline technology and deployment target, some initial steps
(forked) repo locally with the pre-installed eGit plugin. Although development and testing
can be done online using a GitHub-hosted container (see [README-codespaces](README-codespaces.md)
for details), having the toolkit available locally is helpful for replicating the most common
ACE development experience. See the developer edition [download page](https://www.ibm.com/docs/en/app-connect/12.0?topic=enterprise-download-ace-developer-edition-get-started)
ACE development experience. See the developer edition [download page](https://www.ibm.com/docs/en/app-connect/13.0?topic=enterprise-download-ace-developer-edition-get-started)
for a free version (limited to one transaction per second per flow) if your organization does
not have existing ACE licenses.

Expand Down
2 changes: 1 addition & 1 deletion TeaRESTApplication/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ curl -X POST --data '{"name": "Assam", "strength": 5}' http://173.193.79.84:3153
curl http://173.193.79.84:31531/tea/index/1
```

Can be run locally as well as in the cloud, and for full details this repo should be pulled into an ACE 12.0.11.0 toolkit (via the egit plugin) and examined there.
Can be run locally as well as in the cloud, and for full details this repo should be pulled into an ACE 13.0.1.0 toolkit (via the egit plugin) and examined there.

## Implementation

Expand Down
Loading