From 88bbafc4ca87625b27adb870edc2d6b99a1cccb1 Mon Sep 17 00:00:00 2001 From: Rob Parker Date: Mon, 6 Mar 2017 17:04:04 +0000 Subject: [PATCH 1/4] Add in a better default dashboard for the web console --- Dockerfile | 1 + admin.json | 1 + setup-mqm-web.sh | 9 +++++++++ 3 files changed, 11 insertions(+) create mode 100644 admin.json diff --git a/Dockerfile b/Dockerfile index 9c10844..bd3a581 100644 --- a/Dockerfile +++ b/Dockerfile @@ -71,6 +71,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ COPY *.sh /usr/local/bin/ COPY *.mqsc /etc/mqm/ +COPY admin.json /etc/mqm/ COPY mq-dev-config /etc/mqm/mq-dev-config diff --git a/admin.json b/admin.json new file mode 100644 index 0000000..d2504b0 --- /dev/null +++ b/admin.json @@ -0,0 +1 @@ +{"version":0.1,"tabs":[{"title":"IBM MQ Container","numColumns":2,"model":{"title":"","rows":[{"columns":[{"widgets":[{"type":"channel","config":{"selectedQM":"","showSysObjs":false,"sizex":1,"sizey":1,"subType":"all"},"title":"Channels on ","titleTemplateUrl":"adf/templates/widget-title.html","gridsterrow":0,"gridstercol":1},{"type":"topic","config":{"selectedQM":"","showSysObjs":false,"sizex":1,"sizey":1},"title":"Topics on ","titleTemplateUrl":"adf/templates/widget-title.html","gridsterrow":1,"gridstercol":1},{"type":"queue","config":{"selectedQM":"","showSysObjs":false,"sizex":1,"sizey":1,"subType":"all"},"title":"Queues on ","titleTemplateUrl":"adf/templates/widget-title.html","gridsterrow":1,"gridstercol":0},{"type":"queuemanager","gridstercol":0,"gridsterrow":0,"config":{"type":"local","sizex":1,"sizey":1,"customTitle":"Queue Manager"},"title":"Queue Manager","titleTemplateUrl":"adf/templates/widget-title.html"}]}]}],"titleTemplateUrl":"adf/templates/dashboard-title.html"},"isMobile":false}]} diff --git a/setup-mqm-web.sh b/setup-mqm-web.sh index 718b472..b182466 100644 --- a/setup-mqm-web.sh +++ b/setup-mqm-web.sh @@ -117,6 +117,15 @@ else echo "Using existing Web Server configuration." fi +if [ ! -e "${DATA_PATH}/web/installations/${MQ_INSTALLATION}/angular.persistence/admin.json" ]; then + echo "Web QM = ${MQ_QMGR_NAME}" + sed -i "s//${MQ_QMGR_NAME}/g" /etc/mqm/admin.json + chown mqm:mqm /etc/mqm/admin.json + chmod 640 /etc/mqm/admin.json + su -c "mkdir -p ${DATA_PATH}/web/installations/${MQ_INSTALLATION}/angular.persistence" -l mqm + su -c "cp -PTv /etc/mqm/admin.json ${DATA_PATH}/web/installations/${MQ_INSTALLATION}/angular.persistence/admin.json" -l mqm +fi + #Run the server as mqm su -l mqm -c "bash strmqweb &" echo "Web Server started" From 5aa26543314fb9ed0325567d6df38fb04c0da4bb Mon Sep 17 00:00:00 2001 From: Rob Parker Date: Mon, 6 Mar 2017 17:05:22 +0000 Subject: [PATCH 2/4] remove unnecessary echo from dashboard setup --- setup-mqm-web.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/setup-mqm-web.sh b/setup-mqm-web.sh index b182466..60881db 100644 --- a/setup-mqm-web.sh +++ b/setup-mqm-web.sh @@ -118,7 +118,6 @@ else fi if [ ! -e "${DATA_PATH}/web/installations/${MQ_INSTALLATION}/angular.persistence/admin.json" ]; then - echo "Web QM = ${MQ_QMGR_NAME}" sed -i "s//${MQ_QMGR_NAME}/g" /etc/mqm/admin.json chown mqm:mqm /etc/mqm/admin.json chmod 640 /etc/mqm/admin.json From 914c40d30fa23ea20e8676679df54344d1355e11 Mon Sep 17 00:00:00 2001 From: Rob Parker Date: Mon, 13 Mar 2017 17:17:38 +0000 Subject: [PATCH 3/4] run apt-get upgrade after installs --- Dockerfile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index bd3a581..832c2ef 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,6 +26,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Install additional packages required by MQ, this install process and the runtime scripts && apt-get update -y \ && apt-get install -y --no-install-recommends \ + apt-utils \ bash \ bc \ coreutils \ @@ -35,6 +36,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ gawk \ grep \ libc-bin \ + lsb-core \ mount \ passwd \ procps \ @@ -59,6 +61,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Recommended: Set the default MQ installation (makes the MQ commands available on the PATH) && /opt/mqm/bin/setmqinst -p /opt/mqm -i \ # Clean up all the downloaded files + && cd / \ && rm -rf /tmp/mq \ && rm -rf /var/lib/apt/lists/* \ # Optional: Update the command prompt with the MQ version @@ -67,7 +70,10 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Optional: Set these values for the Bluemix Vulnerability Report && sed -i 's/PASS_MAX_DAYS\t99999/PASS_MAX_DAYS\t90/' /etc/login.defs \ && sed -i 's/PASS_MIN_DAYS\t0/PASS_MIN_DAYS\t1/' /etc/login.defs \ - && sed -i 's/password\t\[success=1 default=ignore\]\tpam_unix\.so obscure sha512/password\t[success=1 default=ignore]\tpam_unix.so obscure sha512 minlen=8/' /etc/pam.d/common-password + && sed -i 's/password\t\[success=1 default=ignore\]\tpam_unix\.so obscure sha512/password\t[success=1 default=ignore]\tpam_unix.so obscure sha512 minlen=8/' /etc/pam.d/common-password \ + # We should do this to make sure we have the latest fixes. + && apt-get update -y \ + && apt-get upgrade -y COPY *.sh /usr/local/bin/ COPY *.mqsc /etc/mqm/ From 9928128d741f01fde55d72b686e6713f01d18a6a Mon Sep 17 00:00:00 2001 From: Rob Parker Date: Tue, 14 Mar 2017 10:01:47 +0000 Subject: [PATCH 4/4] Revert "run apt-get upgrade after installs" This reverts commit 914c40d30fa23ea20e8676679df54344d1355e11. --- Dockerfile | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 832c2ef..bd3a581 100644 --- a/Dockerfile +++ b/Dockerfile @@ -26,7 +26,6 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Install additional packages required by MQ, this install process and the runtime scripts && apt-get update -y \ && apt-get install -y --no-install-recommends \ - apt-utils \ bash \ bc \ coreutils \ @@ -36,7 +35,6 @@ RUN export DEBIAN_FRONTEND=noninteractive \ gawk \ grep \ libc-bin \ - lsb-core \ mount \ passwd \ procps \ @@ -61,7 +59,6 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Recommended: Set the default MQ installation (makes the MQ commands available on the PATH) && /opt/mqm/bin/setmqinst -p /opt/mqm -i \ # Clean up all the downloaded files - && cd / \ && rm -rf /tmp/mq \ && rm -rf /var/lib/apt/lists/* \ # Optional: Update the command prompt with the MQ version @@ -70,10 +67,7 @@ RUN export DEBIAN_FRONTEND=noninteractive \ # Optional: Set these values for the Bluemix Vulnerability Report && sed -i 's/PASS_MAX_DAYS\t99999/PASS_MAX_DAYS\t90/' /etc/login.defs \ && sed -i 's/PASS_MIN_DAYS\t0/PASS_MIN_DAYS\t1/' /etc/login.defs \ - && sed -i 's/password\t\[success=1 default=ignore\]\tpam_unix\.so obscure sha512/password\t[success=1 default=ignore]\tpam_unix.so obscure sha512 minlen=8/' /etc/pam.d/common-password \ - # We should do this to make sure we have the latest fixes. - && apt-get update -y \ - && apt-get upgrade -y + && sed -i 's/password\t\[success=1 default=ignore\]\tpam_unix\.so obscure sha512/password\t[success=1 default=ignore]\tpam_unix.so obscure sha512 minlen=8/' /etc/pam.d/common-password COPY *.sh /usr/local/bin/ COPY *.mqsc /etc/mqm/