diff --git a/rln/Makefile b/rln/Makefile index 3d4e062..5bf6abf 100644 --- a/rln/Makefile +++ b/rln/Makefile @@ -1,3 +1,16 @@ +build: + docker buildx build -t pymqi -f ubi9/Dockerfile.ubi9-mqclient ubi9/ + docker buildx build -t ubi9python -f ubi9/Dockerfile.ubi9 ubi9/ + make -C ../ build-devserver + +push: build + docker tag pymqi git.cbo.dk/rasmus/mq-container:ubi9-mqclient + docker push git.cbo.dk/rasmus/mq-container:ubi9-mqclient + docker tag pymqi git.cbo.dk/rasmus/mq-container:ubi9 + docker push git.cbo.dk/rasmus/mq-container:ubi9 + docker tag ibm-mqadvanced-server-dev:9.4.1.0-amd64 git.cbo.dk/rasmus/mq-container:9.4.1.0-amd64 + docker push git.cbo.dk/rasmus/mq-container:9.4.1.0-amd64 + run: kubectl delete pod mq-ubuntu-pod kubectl delete pvc mqm-pvc diff --git a/rln/rln.md b/rln/rln.md index a381378..82bf017 100644 --- a/rln/rln.md +++ b/rln/rln.md @@ -1,11 +1,6 @@ -make build-devserver -docker tag ibm-mqadvanced-server-dev:9.4.1.0-amd64 git.cbo.dk/rasmus/mq-container:9.4.1.0-amd64 -docker push git.cbo.dk/rasmus/mq-container:9.4.1.0-amd64 - -cd rln -make run - +# Testing ```bash -apt-get update && apt-get update -y && apt-get install -y python3 python3-pip python3-dev build-essential wget curl && pip install --break-system-packages pymqi -``` - +make build +make push +make run +``` \ No newline at end of file diff --git a/rln/ubi9/Dockerfile.ubi9 b/rln/ubi9/Dockerfile.ubi9 new file mode 100644 index 0000000..0964a8e --- /dev/null +++ b/rln/ubi9/Dockerfile.ubi9 @@ -0,0 +1,10 @@ +# docker buildx build -t pymqi . -f Dockerfile.ubi9 + +FROM registry.access.redhat.com/ubi9/python-312:1-25.1729767846 + +USER 0 + +RUN yum update -y \ + && yum install -y tar wget python3 python3-devel python3-pip + +ENTRYPOINT ["tail", "-f", "/dev/null"] \ No newline at end of file diff --git a/rln/ubi9/Dockerfile.ubi9-mqclient b/rln/ubi9/Dockerfile.ubi9-mqclient new file mode 100644 index 0000000..02463b4 --- /dev/null +++ b/rln/ubi9/Dockerfile.ubi9-mqclient @@ -0,0 +1,21 @@ +# docker buildx build -t pymqi . -f Dockerfile.ubi9-mqclient + +FROM registry.access.redhat.com/ubi9/python-312:1-25.1729767846 + +USER 0 + +COPY ./mq/9.4.1.0-IBM-MQC-LinuxX64.tar.gz /tmp/IBM-MQC-LinuxX64.tar.gz +COPY ./mq/*.py /tmp + +RUN yum update -y \ + && yum install -y tar wget python3 python3-devel python3-pip \ + && cd /tmp \ + && tar -xvf IBM-MQC-LinuxX64.tar.gz \ + && cd /tmp/MQClient \ + && ./mqlicense.sh -accept \ + && rpm -i *.rpm \ + && /opt/mqm/bin/setmqinst -i -p /opt/mqm \ + && source /opt/mqm/bin/setmqenv -l -p /opt/mqm \ + && pip install pymqi + +ENTRYPOINT ["tail", "-f", "/dev/null"] \ No newline at end of file diff --git a/rln/ubi9/mq/9.4.1.0-IBM-MQ-Explorer-LinuxX64.tar.gz b/rln/ubi9/mq/9.4.1.0-IBM-MQ-Explorer-LinuxX64.tar.gz new file mode 100644 index 0000000..356c6d5 Binary files /dev/null and b/rln/ubi9/mq/9.4.1.0-IBM-MQ-Explorer-LinuxX64.tar.gz differ diff --git a/rln/ubi9/mq/9.4.1.0-IBM-MQ-Install-Java-All.jar b/rln/ubi9/mq/9.4.1.0-IBM-MQ-Install-Java-All.jar new file mode 100644 index 0000000..5eb1670 Binary files /dev/null and b/rln/ubi9/mq/9.4.1.0-IBM-MQ-Install-Java-All.jar differ diff --git a/rln/ubi9/mq/9.4.1.0-IBM-MQ-Java-InstallRA.jar b/rln/ubi9/mq/9.4.1.0-IBM-MQ-Java-InstallRA.jar new file mode 100644 index 0000000..1c60858 Binary files /dev/null and b/rln/ubi9/mq/9.4.1.0-IBM-MQ-Java-InstallRA.jar differ diff --git a/rln/ubi9/mq/9.4.1.0-IBM-MQ-Sigs-Certs.tar.gz b/rln/ubi9/mq/9.4.1.0-IBM-MQ-Sigs-Certs.tar.gz new file mode 100644 index 0000000..8e02c14 Binary files /dev/null and b/rln/ubi9/mq/9.4.1.0-IBM-MQ-Sigs-Certs.tar.gz differ diff --git a/rln/ubi9/mq/9.4.1.0-IBM-MQC-LinuxX64.tar.gz b/rln/ubi9/mq/9.4.1.0-IBM-MQC-LinuxX64.tar.gz new file mode 100644 index 0000000..5c9260f Binary files /dev/null and b/rln/ubi9/mq/9.4.1.0-IBM-MQC-LinuxX64.tar.gz differ diff --git a/rln/ubi9/mq/9.4.1.0-IBM-MQC-Redist-LinuxX64.tar.gz b/rln/ubi9/mq/9.4.1.0-IBM-MQC-Redist-LinuxX64.tar.gz new file mode 100644 index 0000000..4a19572 Binary files /dev/null and b/rln/ubi9/mq/9.4.1.0-IBM-MQC-Redist-LinuxX64.tar.gz differ diff --git a/rln/ubi9/mq/9.4.1.0-IBM-MQC-UbuntuLinuxX64.tar.gz b/rln/ubi9/mq/9.4.1.0-IBM-MQC-UbuntuLinuxX64.tar.gz new file mode 100644 index 0000000..d79051b Binary files /dev/null and b/rln/ubi9/mq/9.4.1.0-IBM-MQC-UbuntuLinuxX64.tar.gz differ diff --git a/rln/ubi9/mq/9.4.1.0-IBM-MQIPT-LinuxX64.tar.gz b/rln/ubi9/mq/9.4.1.0-IBM-MQIPT-LinuxX64.tar.gz new file mode 100644 index 0000000..71e89ac Binary files /dev/null and b/rln/ubi9/mq/9.4.1.0-IBM-MQIPT-LinuxX64.tar.gz differ diff --git a/rln/ubi9/mq/pymqi-binding.py b/rln/ubi9/mq/pymqi-binding.py new file mode 100644 index 0000000..2fd309f --- /dev/null +++ b/rln/ubi9/mq/pymqi-binding.py @@ -0,0 +1,13 @@ +import pymqi + +queue_manager = 'QM1' +queue_name = 'DEV.QUEUE1' +message = 'Hello from Python!' + +qmgr = pymqi.connect(queue_manager) + +queue = pymqi.Queue(qmgr, queue_name) +queue.put(message) +queue.close() + +qmgr.disconnect() \ No newline at end of file diff --git a/rln/ubi9/mq/pymqi-tcp.py b/rln/ubi9/mq/pymqi-tcp.py new file mode 100644 index 0000000..b7be440 --- /dev/null +++ b/rln/ubi9/mq/pymqi-tcp.py @@ -0,0 +1,17 @@ +import pymqi + +queue_manager = 'QM1' +channel = 'DEV.APP.SVRCONN' +host = '192.168.50.155' +port = '1414' +queue_name = 'DEV.QUEUE1' +message = 'Hello from Python!' +conn_info = '%s(%s)' % (host, port) + +qmgr = pymqi.connect(queue_manager, channel, conn_info) + +queue = pymqi.Queue(qmgr, queue_name) +queue.put(message) +queue.close() + +qmgr.disconnect() \ No newline at end of file diff --git a/rln/ubi9/notes.md b/rln/ubi9/notes.md new file mode 100644 index 0000000..b1798b3 --- /dev/null +++ b/rln/ubi9/notes.md @@ -0,0 +1,7 @@ +# Notes +Build ubi9 container with MQ client and pymqi installed. +```bash +docker buildx build -t pymqi . -f Dockerfile.ubi9 +docker tag pymqi git.cbo.dk/rasmus/mq-container:ubi9-client +docker push git.cbo.dk/rasmus/mq-container:ubi9-client + ``` \ No newline at end of file