Add dockerfiles
This commit is contained in:
13
rln/Makefile
13
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:
|
run:
|
||||||
kubectl delete pod mq-ubuntu-pod
|
kubectl delete pod mq-ubuntu-pod
|
||||||
kubectl delete pvc mqm-pvc
|
kubectl delete pvc mqm-pvc
|
||||||
|
|||||||
15
rln/rln.md
15
rln/rln.md
@@ -1,11 +1,6 @@
|
|||||||
make build-devserver
|
# Testing
|
||||||
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
|
|
||||||
|
|
||||||
```bash
|
```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
|
||||||
|
```
|
||||||
10
rln/ubi9/Dockerfile.ubi9
Normal file
10
rln/ubi9/Dockerfile.ubi9
Normal file
@@ -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"]
|
||||||
21
rln/ubi9/Dockerfile.ubi9-mqclient
Normal file
21
rln/ubi9/Dockerfile.ubi9-mqclient
Normal file
@@ -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"]
|
||||||
BIN
rln/ubi9/mq/9.4.1.0-IBM-MQ-Explorer-LinuxX64.tar.gz
Normal file
BIN
rln/ubi9/mq/9.4.1.0-IBM-MQ-Explorer-LinuxX64.tar.gz
Normal file
Binary file not shown.
BIN
rln/ubi9/mq/9.4.1.0-IBM-MQ-Install-Java-All.jar
Normal file
BIN
rln/ubi9/mq/9.4.1.0-IBM-MQ-Install-Java-All.jar
Normal file
Binary file not shown.
BIN
rln/ubi9/mq/9.4.1.0-IBM-MQ-Java-InstallRA.jar
Normal file
BIN
rln/ubi9/mq/9.4.1.0-IBM-MQ-Java-InstallRA.jar
Normal file
Binary file not shown.
BIN
rln/ubi9/mq/9.4.1.0-IBM-MQ-Sigs-Certs.tar.gz
Normal file
BIN
rln/ubi9/mq/9.4.1.0-IBM-MQ-Sigs-Certs.tar.gz
Normal file
Binary file not shown.
BIN
rln/ubi9/mq/9.4.1.0-IBM-MQC-LinuxX64.tar.gz
Normal file
BIN
rln/ubi9/mq/9.4.1.0-IBM-MQC-LinuxX64.tar.gz
Normal file
Binary file not shown.
BIN
rln/ubi9/mq/9.4.1.0-IBM-MQC-Redist-LinuxX64.tar.gz
Normal file
BIN
rln/ubi9/mq/9.4.1.0-IBM-MQC-Redist-LinuxX64.tar.gz
Normal file
Binary file not shown.
BIN
rln/ubi9/mq/9.4.1.0-IBM-MQC-UbuntuLinuxX64.tar.gz
Normal file
BIN
rln/ubi9/mq/9.4.1.0-IBM-MQC-UbuntuLinuxX64.tar.gz
Normal file
Binary file not shown.
BIN
rln/ubi9/mq/9.4.1.0-IBM-MQIPT-LinuxX64.tar.gz
Normal file
BIN
rln/ubi9/mq/9.4.1.0-IBM-MQIPT-LinuxX64.tar.gz
Normal file
Binary file not shown.
13
rln/ubi9/mq/pymqi-binding.py
Normal file
13
rln/ubi9/mq/pymqi-binding.py
Normal file
@@ -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()
|
||||||
17
rln/ubi9/mq/pymqi-tcp.py
Normal file
17
rln/ubi9/mq/pymqi-tcp.py
Normal file
@@ -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()
|
||||||
7
rln/ubi9/notes.md
Normal file
7
rln/ubi9/notes.md
Normal file
@@ -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
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user