Skip to content

Commit

Permalink
Merge pull request #115 from observIQ/ibmmq/server-pem-file
Browse files Browse the repository at this point in the history
MQ Exporter: Updated file extension and keystore script
  • Loading branch information
algchoo authored Feb 14, 2024
2 parents 7a095aa + ea5fabb commit bf84830
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
11 changes: 5 additions & 6 deletions mq-metric-samples/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,13 @@ RUN mkdir -p /opt/bin \
&& mkdir -p /opt/config \
&& chmod a+rx /opt/config

# Create the keystore
RUN /opt/mqm/bin/runmqakm -keydb -create -db /opt/mqm/key.kdb -pw passw0rd -stash -type kdb

# Copy the server's public certificate to container
COPY genericresources/createcerts/server.crt /opt/mqm/server.crt
COPY genericresources/createcerts/server.pem /opt/mqm/server.pem

# Import certificate into the keystore
RUN /opt/mqm/bin/runmqakm -cert -import -target /opt/mqm/key.kdb -stashed -file /opt/mqm/server.crt
# Create the keystore using a script
COPY genericresources/createcerts/create-keystore.sh /opt/mqm/create-keystore.sh
RUN chmod +x /opt/mqm/create-keystore.sh
RUN /opt/mqm/create-keystore.sh

# Install packages
RUN apt-get update \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

set -e

# Create the keystore
/opt/mqm/bin/runmqakm -keydb -create -db /opt/mqm/key.kdb -pw passw0rd -stash -type kdb

# Import certificate into the keystore
/opt/mqm/bin/runmqakm -cert -import -target /opt/mqm/key.kdb -stashed -file /opt/mqm/server.pem

0 comments on commit bf84830

Please sign in to comment.