apiVersion: v1 kind: Template labels: template: amq-broker-73-custom xpaas: 1.4.16 message: A new messaging service has been created in your project. It will handle the protocol(s) "${AMQ_PROTOCOL}". The username/password for accessing the service is ${AMQ_USER}/${AMQ_PASSWORD}. metadata: annotations: description: Application template for Red Hat AMQ brokers. This template doesn't feature SSL support. iconClass: icon-amq openshift.io/display-name: Red Hat AMQ Broker 7.3 Custom Config (Ephemeral, no SSL) openshift.io/provider-display-name: Red Hat, Inc. tags: messaging,amq,xpaas template.openshift.io/documentation-url: 'https://access.redhat.com/documentation/en/red-hat-amq/' template.openshift.io/long-description: >- This template defines resources needed to develop a Red Hat AMQ Broker 7.3 based application, including a deployment configuration, using ephemeral (temporary) storage. template.openshift.io/support-url: 'https://access.redhat.com' version: 1.4.16 name: amq-broker-73-custom objects: - apiVersion: v1 kind: Service metadata: annotations: description: The broker's console Jolokia port. labels: application: ${APPLICATION_NAME} name: ${AMQ_NAME}-amq-jolokia spec: ports: - port: 8161 targetPort: 8161 selector: deploymentConfig: ${APPLICATION_NAME}-amq - apiVersion: v1 kind: Service metadata: annotations: description: The broker's AMQP port. labels: application: ${APPLICATION_NAME} name: ${AMQ_NAME}-amq-amqp spec: ports: - port: 5672 targetPort: 5672 selector: deploymentConfig: ${APPLICATION_NAME}-amq - apiVersion: v1 kind: Service metadata: annotations: description: The broker's MQTT port. labels: application: ${APPLICATION_NAME} name: ${AMQ_NAME}-amq-mqtt spec: ports: - port: 1883 targetPort: 1883 selector: deploymentConfig: ${APPLICATION_NAME}-amq - apiVersion: v1 kind: Service metadata: annotations: description: The broker's STOMP port. labels: application: ${APPLICATION_NAME} name: ${AMQ_NAME}-amq-stomp spec: ports: - port: 61613 targetPort: 61613 selector: deploymentConfig: ${APPLICATION_NAME}-amq - apiVersion: v1 kind: Service metadata: annotations: description: The broker's OpenWire port. service.alpha.openshift.io/dependencies: '[{"name": "${AMQ_NAME}-amq-amqp", "kind": "Service"},{"name": "${AMQ_NAME}-amq-mqtt", "kind": "Service"},{"name": "${AMQ_NAME}-amq-stomp", "kind": "Service"}]' labels: application: ${APPLICATION_NAME} name: ${AMQ_NAME}-amq-tcp spec: ports: - port: 61616 targetPort: 61616 selector: deploymentConfig: ${APPLICATION_NAME}-amq - apiVersion: v1 kind: DeploymentConfig metadata: labels: application: ${APPLICATION_NAME} name: ${APPLICATION_NAME}-amq spec: replicas: 1 selector: deploymentConfig: ${APPLICATION_NAME}-amq strategy: rollingParams: maxSurge: 0 type: Rolling template: metadata: labels: application: ${APPLICATION_NAME} deploymentConfig: ${APPLICATION_NAME}-amq name: ${APPLICATION_NAME}-amq spec: containers: - env: - name: AMQ_USER value: ${AMQ_USER} - name: AMQ_PASSWORD value: ${AMQ_PASSWORD} - name: AMQ_ROLE value: ${AMQ_ROLE} - name: AMQ_NAME value: ${AMQ_NAME} - name: AMQ_TRANSPORTS value: ${AMQ_PROTOCOL} - name: AMQ_QUEUES value: ${AMQ_QUEUES} - name: AMQ_ADDRESSES value: ${AMQ_ADDRESSES} - name: AMQ_GLOBAL_MAX_SIZE value: ${AMQ_GLOBAL_MAX_SIZE} - name: AMQ_REQUIRE_LOGIN value: ${AMQ_REQUIRE_LOGIN} - name: BROKER_XML value: ${BROKER_XML} - name: LOGGING_PROPERTIES value: ${LOGGING_PROPERTIES} - name: AMQ_EXTRA_ARGS value: ${AMQ_EXTRA_ARGS} - name: AMQ_ANYCAST_PREFIX value: ${AMQ_ANYCAST_PREFIX} - name: AMQ_MULTICAST_PREFIX value: ${AMQ_MULTICAST_PREFIX} image: ${IMAGE} imagePullPolicy: Always readinessProbe: exec: command: - "/bin/bash" - "-c" - "/opt/amq/bin/readinessProbe.sh" name: ${APPLICATION_NAME}-amq ports: - containerPort: 8161 name: console-jolokia protocol: TCP - containerPort: 5672 name: amqp protocol: TCP - containerPort: 1883 name: mqtt protocol: TCP - containerPort: 61613 name: stomp protocol: TCP - containerPort: 61616 name: artemis protocol: TCP terminationGracePeriodSeconds: 60 triggers: - type: ConfigChange - apiVersion: v1 kind: Route metadata: labels: application: ${APPLICATION_NAME} name: console spec: to: kind: Service name: ${AMQ_NAME}-amq-jolokia parameters: - description: The name for the application. displayName: Application Name name: APPLICATION_NAME required: true value: broker - description: 'Protocols to configure, separated by commas. Allowed values are: `openwire`, `amqp`, `stomp`, `mqtt` and `hornetq`.' displayName: AMQ Protocols name: AMQ_PROTOCOL value: openwire,amqp,stomp,mqtt,hornetq - description: Queue names, separated by commas. These queues will be automatically created when the broker starts. If left empty, queues will be still created dynamically. displayName: Queues name: AMQ_QUEUES - description: Address names, separated by commas. These addresses will be automatically created when the broker starts. If left empty, addresses will be still created dynamically. displayName: Addresses name: AMQ_ADDRESSES - description: User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated. displayName: AMQ Username from: user[a-zA-Z0-9]{3} generate: expression name: AMQ_USER - description: Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated. displayName: AMQ Password from: '[a-zA-Z0-9]{8}' generate: expression name: AMQ_PASSWORD - description: User role for standard broker user. displayName: AMQ Role name: AMQ_ROLE value: admin - description: The name of the broker displayName: AMQ Name name: AMQ_NAME value: broker - description: "Maximum amount of memory which message data may consume (Default: Undefined, half of the system's memory)." displayName: AMQ Global Max Size name: AMQ_GLOBAL_MAX_SIZE value: 100 gb - description: "Determines whether or not the broker will allow anonymous access, or require login." displayName: AMQ Require Login name: AMQ_REQUIRE_LOGIN - description: Extra arguments for broker creation name: AMQ_EXTRA_ARGS required: false - description: Anycast prefix applied to the multiplexed protocol port 61616 displayName: AMQ Anycast Prefix name: AMQ_ANYCAST_PREFIX required: false - description: Multicast prefix applied to the multiplexed protocol port 61616 displayName: AMQ Multicast Prefix name: AMQ_MULTICAST_PREFIX required: false - description: Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project. displayName: ImageStream Namespace name: IMAGE_STREAM_NAMESPACE required: true value: openshift - description: Broker Image displayName: Image name: IMAGE required: true value: registry.redhat.io/amq-broker-7/amq-broker-73-openshift:7.3 - description: The broker.xml configuration file. displayName: broker.xml name: BROKER_XML value: |- ${AMQ_NAME} true NIO ./data/paging ./data/bindings ./data/journal ./data/large-messages true 2 10 10M 3800000 1 5000 90 true 120000 60000 HALT tcp://${BROKER_IP}:61616?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=CORE,AMQP,STOMP,HORNETQ,MQTT,OPENWIRE;useEpoll=true;amqpCredits=1000;amqpLowCredits=300 tcp://${BROKER_IP}:5672?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=AMQP;useEpoll=true;amqpCredits=1000;amqpMinCredits=300 tcp://${BROKER_IP}:61613?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=STOMP;useEpoll=true tcp://${BROKER_IP}:5445?protocols=HORNETQ,STOMP;useEpoll=true tcp://${BROKER_IP}:1883?tcpSendBufferSize=1048576;tcpReceiveBufferSize=1048576;protocols=MQTT;useEpoll=true DLQ ExpiryQueue 0 -1 10 PAGE true true true true DLQ ExpiryQueue 0 -1 10 PAGE true true true true
- description: The logging.properties configuration file. displayName: logging.properties name: LOGGING_PROPERTIES value: |- # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You 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. # # Additional logger names to configure (root logger is always configured) # Root logger option loggers=org.eclipse.jetty,org.jboss.logging,org.apache.activemq.artemis.core.server,org.apache.activemq.artemis.utils,org.apache.activemq.artemis.journal,org.apache.activemq.artemis.jms.server,org.apache.activemq.artemis.integration.bootstrap # Root logger level logger.level=INFO # ActiveMQ Artemis logger levels logger.org.apache.activemq.artemis.core.server.level=INFO logger.org.apache.activemq.artemis.journal.level=INFO logger.org.apache.activemq.artemis.utils.level=INFO logger.org.apache.activemq.artemis.jms.level=INFO logger.org.apache.activemq.artemis.integration.bootstrap.level=INFO logger.org.eclipse.jetty.level=WARN # Root logger handlers logger.handlers=CONSOLE # Console handler configuration handler.CONSOLE=org.jboss.logmanager.handlers.ConsoleHandler handler.CONSOLE.properties=autoFlush handler.CONSOLE.level=DEBUG handler.CONSOLE.autoFlush=true handler.CONSOLE.formatter=PATTERN # File handler configuration handler.FILE=org.jboss.logmanager.handlers.PeriodicRotatingFileHandler handler.FILE.level=DEBUG handler.FILE.properties=suffix,append,autoFlush,fileName handler.FILE.suffix=.yyyy-MM-dd handler.FILE.append=true handler.FILE.autoFlush=true handler.FILE.fileName=${artemis.instance}/log/artemis.log handler.FILE.formatter=PATTERN # Formatter pattern configuration formatter.PATTERN=org.jboss.logmanager.formatters.PatternFormatter formatter.PATTERN.properties=pattern formatter.PATTERN.pattern=%d %-5p [%c] %s%E%n