Initial developer config
This commit is contained in:
6
Makefile
6
Makefile
@@ -49,6 +49,7 @@ BUILD_SERVER_CONTAINER=build-server
|
|||||||
NUM_CPU=$(shell docker info --format "{{ .NCPU }}")
|
NUM_CPU=$(shell docker info --format "{{ .NCPU }}")
|
||||||
# BASE_IMAGE_TAG is a normalized version of BASE_IMAGE, suitable for use in a Docker tag
|
# BASE_IMAGE_TAG is a normalized version of BASE_IMAGE, suitable for use in a Docker tag
|
||||||
BASE_IMAGE_TAG=$(subst /,-,$(subst :,-,$(BASE_IMAGE)))
|
BASE_IMAGE_TAG=$(subst /,-,$(subst :,-,$(BASE_IMAGE)))
|
||||||
|
MQ_IMAGE_DEVSERVER_BASE=mqadvanced-server-dev-base:$(MQ_VERSION)-$(ARCH)-$(BASE_IMAGE_TAG)
|
||||||
|
|
||||||
# Try to figure out which archive to use from the BASE_IMAGE
|
# Try to figure out which archive to use from the BASE_IMAGE
|
||||||
ifeq "$(findstring ubuntu,$(BASE_IMAGE))" "ubuntu"
|
ifeq "$(findstring ubuntu,$(BASE_IMAGE))" "ubuntu"
|
||||||
@@ -220,8 +221,9 @@ build-advancedserver: downloads/$(MQ_ARCHIVE) docker-version
|
|||||||
.PHONY: build-devserver
|
.PHONY: build-devserver
|
||||||
build-devserver: downloads/$(MQ_ARCHIVE_DEV) docker-version
|
build-devserver: downloads/$(MQ_ARCHIVE_DEV) docker-version
|
||||||
@test "$(shell uname -m)" = "x86_64" || (echo "Error: MQ Advanced for Developers is only available for x86_64 architecture" && exit 1)
|
@test "$(shell uname -m)" = "x86_64" || (echo "Error: MQ Advanced for Developers is only available for x86_64 architecture" && exit 1)
|
||||||
$(info $(shell printf $(TITLE)"Build $(MQ_IMAGE_DEVSERVER)"$(END)))
|
$(info $(shell printf $(TITLE)"Build $(MQ_IMAGE_DEVSERVER_BASE)"$(END)))
|
||||||
$(call docker-build-mq,$(MQ_IMAGE_DEVSERVER),Dockerfile-server,$(MQ_ARCHIVE_DEV),"98102d16795c4263ad9ca075190a2d4d","IBM MQ Advanced for Developers (Non-Warranted)",$(MQ_VERSION))
|
$(call docker-build-mq,$(MQ_IMAGE_DEVSERVER_BASE),Dockerfile-server,$(MQ_ARCHIVE_DEV),"98102d16795c4263ad9ca075190a2d4d","IBM MQ Advanced for Developers (Non-Warranted)",$(MQ_VERSION))
|
||||||
|
docker build --tag $(MQ_IMAGE_DEVSERVER) incubating/mqadvanced-server-dev
|
||||||
|
|
||||||
.PHONY: build-advancedserver-cover
|
.PHONY: build-advancedserver-cover
|
||||||
build-advancedserver-cover: docker-version
|
build-advancedserver-cover: docker-version
|
||||||
|
|||||||
30
incubating/mqadvanced-server-dev/Dockerfile
Normal file
30
incubating/mqadvanced-server-dev/Dockerfile
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
# © Copyright IBM Corporation 2015, 2018
|
||||||
|
#
|
||||||
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
# you may not use this file except in compliance with the License.
|
||||||
|
# You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
# See the License for the specific language governing permissions and
|
||||||
|
# limitations under the License.
|
||||||
|
|
||||||
|
FROM mqadvanced-server-dev-base:9.0.4.0-x86_64-ubuntu-16.04
|
||||||
|
|
||||||
|
## Add admin and app users, and set a default password for admin
|
||||||
|
RUN useradd admin -G mqm \
|
||||||
|
&& groupadd mqclient \
|
||||||
|
&& useradd app -G mqclient,mqm \
|
||||||
|
&& echo admin:passw0rd | chpasswd
|
||||||
|
|
||||||
|
COPY dev.mqsc /etc/mqm/
|
||||||
|
COPY entrypoint.sh /usr/local/bin/
|
||||||
|
RUN chmod +x /usr/local/bin/entrypoint.sh
|
||||||
|
|
||||||
|
# Enable MQ developer default configuration
|
||||||
|
ENV MQ_DEV=true
|
||||||
|
|
||||||
|
ENTRYPOINT ["entrypoint.sh"]
|
||||||
49
incubating/mqadvanced-server-dev/dev.mqsc
Normal file
49
incubating/mqadvanced-server-dev/dev.mqsc
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
* © Copyright IBM Corporation 2017
|
||||||
|
*
|
||||||
|
*
|
||||||
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
* you may not use this file except in compliance with the License.
|
||||||
|
* You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
* See the License for the specific language governing permissions and
|
||||||
|
* limitations under the License.
|
||||||
|
|
||||||
|
STOP LISTENER('SYSTEM.DEFAULT.LISTENER.TCP')
|
||||||
|
|
||||||
|
* Developer queues
|
||||||
|
DEFINE QLOCAL('DEV.QUEUE.1') REPLACE
|
||||||
|
DEFINE QLOCAL('DEV.QUEUE.2') REPLACE
|
||||||
|
DEFINE QLOCAL('DEV.QUEUE.3') REPLACE
|
||||||
|
DEFINE QLOCAL('DEV.DEAD.LETTER.QUEUE') REPLACE
|
||||||
|
|
||||||
|
* Use a different dead letter queue, for undeliverable messages
|
||||||
|
ALTER QMGR DEADQ('DEV.DEAD.LETTER.QUEUE')
|
||||||
|
|
||||||
|
* Developer topics
|
||||||
|
DEFINE TOPIC('DEV.BASE.TOPIC') TOPICSTR('dev/') REPLACE
|
||||||
|
|
||||||
|
* Developer connection authentication
|
||||||
|
DEFINE AUTHINFO('DEV.AUTHINFO') AUTHTYPE(IDPWOS) CHCKCLNT(REQDADM) CHCKLOCL(OPTIONAL) ADOPTCTX(YES) REPLACE
|
||||||
|
ALTER QMGR CONNAUTH('DEV.AUTHINFO')
|
||||||
|
REFRESH SECURITY(*) TYPE(CONNAUTH)
|
||||||
|
|
||||||
|
* Developer channels (Application + Admin)
|
||||||
|
DEFINE CHANNEL('DEV.ADMIN.SVRCONN') CHLTYPE(SVRCONN) REPLACE
|
||||||
|
DEFINE CHANNEL('DEV.APP.SVRCONN') CHLTYPE(SVRCONN) REPLACE
|
||||||
|
|
||||||
|
* Developer channel authentication rules
|
||||||
|
SET CHLAUTH('*') TYPE(ADDRESSMAP) ADDRESS('*') USERSRC(NOACCESS) DESCR('Back-stop rule - Blocks everyone') ACTION(REPLACE)
|
||||||
|
SET CHLAUTH('DEV.APP.SVRCONN') TYPE(ADDRESSMAP) ADDRESS('*') USERSRC(CHANNEL) CHCKCLNT(REQUIRED) DESCR('Allows connection via APP channel') ACTION(REPLACE)
|
||||||
|
SET CHLAUTH('DEV.ADMIN.SVRCONN') TYPE(BLOCKUSER) USERLIST('nobody') DESCR('Allows admins on ADMIN channel') ACTION(REPLACE)
|
||||||
|
SET CHLAUTH('DEV.ADMIN.SVRCONN') TYPE(USERMAP) CLNTUSER('admin') USERSRC(CHANNEL) DESCR('Allows admin user to connect via ADMIN channel') ACTION(REPLACE)
|
||||||
|
|
||||||
|
* Developer authority records
|
||||||
|
SET AUTHREC PROFILE('DEV.AUTHINFO') GROUP('root') OBJTYPE(AUTHINFO) AUTHADD(CHG,DLT,DSP,INQ)
|
||||||
|
SET AUTHREC PROFILE('DEV.AUTHINFO') GROUP('mqm') OBJTYPE(AUTHINFO) AUTHADD(CHG,DLT,DSP,INQ)
|
||||||
|
SET AUTHREC PROFILE('DEV.**') GROUP('mqclient') OBJTYPE(QUEUE) AUTHADD(BROWSE,GET,INQ,PUT)
|
||||||
|
SET AUTHREC PROFILE('DEV.**') GROUP('mqclient') OBJTYPE(TOPIC) AUTHADD(PUB,SUB)
|
||||||
17
incubating/mqadvanced-server-dev/entrypoint.sh
Normal file
17
incubating/mqadvanced-server-dev/entrypoint.sh
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Change admin password
|
||||||
|
if [ -n "${MQ_ADMIN_PASSWORD}" ]; then
|
||||||
|
echo admin:${MQ_ADMIN_PASSWORD} | chpasswd
|
||||||
|
fi
|
||||||
|
# Change app password
|
||||||
|
if [ -n "${MQ_APP_PASSWORD}" ]; then
|
||||||
|
echo app:${MQ_APP_PASSWORD} | chpasswd
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Delete the MQSC with developer defaults, if requested
|
||||||
|
if [ "${MQ_DEV}" != "true" ]; then
|
||||||
|
rm -f /etc/mqm/dev.mqsc
|
||||||
|
fi
|
||||||
|
|
||||||
|
exec runmqserver
|
||||||
Reference in New Issue
Block a user