Compare commits
5 Commits
6f311825c0
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 8a541cafa2 | |||
| 8641701ee4 | |||
| b2311f7e11 | |||
| db424f620d | |||
| 326f683e64 |
31
apple-silicon.md
Normal file
31
apple-silicon.md
Normal file
@@ -0,0 +1,31 @@
|
||||
# Building MQ container for Apple Silicon (ARM64)
|
||||
Build it locally
|
||||
```bash
|
||||
git clone https://github.com/ibm-messaging/mq-container.git
|
||||
cd mq-container
|
||||
make build-devserver
|
||||
```
|
||||
|
||||
Look at the output - specifically the last line.
|
||||
```bash
|
||||
...
|
||||
=> => naming to docker.io/library/ibm-mqadvanced-server-dev:9.3.5.1-arm64 0.0s
|
||||
```
|
||||
|
||||
Use this image instead of the one from icr.io
|
||||
|
||||
~~icr.io/ibm-messaging/mq:9.3.5.1-r1~~
|
||||
|
||||
docker.io/library/ibm-mqadvanced-server-dev:9.3.5.1-amd64
|
||||
|
||||
Return to [readme.md](readme.md).
|
||||
|
||||
## Building a newer/older version
|
||||
Edit the version number in `config.env`.
|
||||
|
||||
If IBM released a newer versinon, you might also pull down changes from github.
|
||||
|
||||
```bash
|
||||
cd mq-container
|
||||
git pull
|
||||
```
|
||||
@@ -1,17 +1,75 @@
|
||||
## POST /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue
|
||||
```bash
|
||||
# New queue from scratch
|
||||
curl --insecure --header 'Content-Type: application/json' \
|
||||
-X POST --header 'Accept: application/json' \
|
||||
-d '{ \
|
||||
"name": "RLN.TEST.QUEUE", \
|
||||
"type": "QLOCAL" \
|
||||
}' \
|
||||
'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue'
|
||||
curl -X POST 'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue' \
|
||||
--insecure \
|
||||
--header 'Content-Type: application/json' \
|
||||
--header 'Accept: application/json' \
|
||||
--header 'ibm-mq-rest-csrf-token: value' \
|
||||
-u admin:passw0rd \
|
||||
--data-binary @- << EOF
|
||||
{
|
||||
"name": "API.QUEUE.1",
|
||||
"type": "local"
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
## POST /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue&like={existing queue name}
|
||||
```bash
|
||||
# New queue like DEV.QUEUE.1
|
||||
curl -X POST --header 'Content-Type: application/json' --header 'Accept: application/json' -d '{ \
|
||||
"name": "RLN.TEST.QUEUE", \
|
||||
"type": "QLOCAL" \
|
||||
}' 'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue?like=DEV.QUEUE.1'
|
||||
```
|
||||
curl -X POST 'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue?like=DEV.QUEUE.1' \
|
||||
--insecure \
|
||||
--header 'Content-Type: application/json' \
|
||||
--header 'Accept: application/json' \
|
||||
--header 'ibm-mq-rest-csrf-token: value' \
|
||||
-u admin:passw0rd \
|
||||
--data-binary @- << EOF
|
||||
{
|
||||
"name": "API.QUEUE.2",
|
||||
"type": "local"
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
## POST /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue&like=<existing queue name>
|
||||
```bash
|
||||
# New queue like DEV.QUEUE.1 replacing a few values
|
||||
curl -X POST 'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue?like=DEV.QUEUE.1' \
|
||||
--insecure \
|
||||
--header 'Content-Type: application/json' \
|
||||
--header 'Accept: application/json' \
|
||||
--header 'ibm-mq-rest-csrf-token: value' \
|
||||
-u admin:passw0rd \
|
||||
--data-binary @- << EOF
|
||||
{
|
||||
"name": "API.QUEUE.3",
|
||||
"type": "local",
|
||||
"storage": {
|
||||
"maximumDepth": 10,
|
||||
"pageSet": 5,
|
||||
"maximumMessageLength": 50,
|
||||
"messageDeliverySequence": "FIFO"
|
||||
},
|
||||
"trigger": {
|
||||
"depth": 1,
|
||||
"processName": "API.QUEUE.2.PROCESS",
|
||||
"enabled": true
|
||||
},
|
||||
"events": {
|
||||
"depth": {
|
||||
"lowPercentage": 0,
|
||||
"highPercentage": 0,
|
||||
"lowEnabled": true,
|
||||
"fullEnabled": true,
|
||||
"highEnabled": true
|
||||
}
|
||||
}
|
||||
}
|
||||
EOF
|
||||
```
|
||||
|
||||
## Expected result
|
||||
Status: 201 Created
|
||||
|
||||
Status: 400 Bad Request
|
||||
@@ -1,20 +1,24 @@
|
||||
### GET /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue
|
||||
## GET /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue
|
||||
```bash
|
||||
# Get all queues
|
||||
curl -X GET \
|
||||
--insecure --header 'Accept: application/json' \
|
||||
-u admin:passw0rd \
|
||||
'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue'
|
||||
curl -X GET 'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue' \
|
||||
--insecure \
|
||||
--header 'Accept: application/json' \
|
||||
-u admin:passw0rd
|
||||
```
|
||||
|
||||
|
||||
## GET /ibmmq/rest/v1/admin/qmgr/{qmgrName}/queue?name={queue name or wildcard}
|
||||
```bash
|
||||
# Get all DEV* queues
|
||||
curl -X GET \
|
||||
--insecure --header 'Accept: application/json' \
|
||||
-u admin:passw0rd \
|
||||
'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue?name=DEV*'
|
||||
curl -X GET 'https://localhost:9443/ibmmq/rest/v1/admin/qmgr/QM1/queue?name=DEV*' \
|
||||
--insecure \
|
||||
--header 'Accept: application/json' \
|
||||
-u admin:passw0rd
|
||||
```
|
||||
|
||||
## Expected output
|
||||
### Search for all queues, or queues that does exist.
|
||||
### A search for all queues, or queues that does exist.
|
||||
Status: 200 OK
|
||||
```json
|
||||
{
|
||||
@@ -39,7 +43,7 @@ Status: 200 OK
|
||||
}
|
||||
```
|
||||
|
||||
### Search for queue that doesn't exist
|
||||
### A search for queue that doesn't exist
|
||||
Status: 200 OK
|
||||
```json
|
||||
{
|
||||
|
||||
55
readme.md
55
readme.md
@@ -1,6 +1,9 @@
|
||||
## Creating a MQ container
|
||||
IBM documentation: https://www.ibm.com/docs/en/ibm-mq/9.3?topic=containers-mq-advanced-developers-container-image
|
||||
|
||||
If you are using Apple Silicon (M1 or newer) you have to build the image yourself - see [apple-silicon.md](apple-silicon.md)
|
||||
|
||||
|
||||
```bash
|
||||
# Cleanup previous container
|
||||
docker stop QM1
|
||||
@@ -21,22 +24,56 @@ docker run \
|
||||
--publish 1414:1414 \
|
||||
--publish 9157:9157 \
|
||||
--publish 9443:9443 \
|
||||
--restart unless-stopped \
|
||||
--volume qm1data:/mnt/mqm \
|
||||
icr.io/ibm-messaging/mq:latest
|
||||
icr.io/ibm-messaging/mq:9.3.5.1-r1
|
||||
|
||||
# Inside the container
|
||||
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > /mnt/mqm/data/web/installations/Installation1/servers/mqweb/mqwebuser.xml
|
||||
echo "<server>" >> /mnt/mqm/data/web/installations/Installation1/servers/mqweb/mqwebuser.xml
|
||||
echo " <featureManager>" >> /mnt/mqm/data/web/installations/Installation1/servers/mqweb/mqwebuser.xml
|
||||
echo " <feature>apiDiscovery-1.0</feature>" >> /mnt/mqm/data/web/installations/Installation1/servers/mqweb/mqwebuser.xml
|
||||
echo " </featureManager>" >> /mnt/mqm/data/web/installations/Installation1/servers/mqweb/mqwebuser.xml
|
||||
echo "</server>" >> /mnt/mqm/data/web/installations/Installation1/servers/mqweb/mqwebuser.xml
|
||||
# Activate Swagger UI - edit file in the container
|
||||
docker exec -it QM1 /bin/bash
|
||||
|
||||
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" > /mnt/mqm/data/web/installations/Installation1/servers/mqweb/mqwebuser.xml
|
||||
echo "<server>" >> /mnt/mqm/data/web/installations/Installation1/servers/mqweb/mqwebuser.xml
|
||||
echo " <featureManager>" >> /mnt/mqm/data/web/installations/Installation1/servers/mqweb/mqwebuser.xml
|
||||
echo " <feature>apiDiscovery-1.0</feature>" >> /mnt/mqm/data/web/installations/Installation1/servers/mqweb/mqwebuser.xml
|
||||
echo " </featureManager>" >> /mnt/mqm/data/web/installations/Installation1/servers/mqweb/mqwebuser.xml
|
||||
echo "</server>" >> /mnt/mqm/data/web/installations/Installation1/servers/mqweb/mqwebuser.xml
|
||||
endmqweb && sleep 5 && strmqweb
|
||||
exit
|
||||
|
||||
# Restart container
|
||||
docker restart QM1
|
||||
```
|
||||
|
||||
## Upgrade MQ
|
||||
```bash
|
||||
docker stop QM1
|
||||
docker rm QM1
|
||||
docker run \
|
||||
--detach \
|
||||
--env LICENSE=accept \
|
||||
--env MQ_ADMIN_PASSWORD=passw0rd \
|
||||
--env MQ_APP_PASSWORD=passw0rd \
|
||||
--env MQ_DEV=true \
|
||||
--env MQ_ENABLE_METRICS=true \
|
||||
--env MQ_QMGR_NAME=QM1 \
|
||||
--name QM1 \
|
||||
--publish 1414:1414 \
|
||||
--publish 9157:9157 \
|
||||
--publish 9443:9443 \
|
||||
--restart unless-stopped \
|
||||
--volume qm1data:/mnt/mqm \
|
||||
icr.io/ibm-messaging/mq:9.3.5.1-r1 # Use a newer version.
|
||||
```
|
||||
## Webconsole / Swagger UI
|
||||
* https://localhost:9443/ibmmq/console/#/
|
||||
* https://localhost:9443/ibm/api/explorer
|
||||
* https://localhost:9443/ibm/api/explorer
|
||||
|
||||
## Let's play with the API
|
||||
- [Display QLOCAL](display-qlocal.md)
|
||||
- [Create QLOCAL](create-qlocal.md)
|
||||
- [Create QREMOTE](create-qremote.md)
|
||||
- [Create QALIAS](create-qalias.md)
|
||||
- [Modify Queue](modify-queue.md)
|
||||
- [Delete Queue](delete-queue.md)
|
||||
- [Create Process](create-process.md)
|
||||
- [Messages - put, get, browse, etc.](messages.md)
|
||||
Reference in New Issue
Block a user