123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439 |
- {
- "kind": "Template",
- "apiVersion": "v1",
- "metadata": {
- "annotations": {
- "description": "Application template for ActiveMQ brokers using persistent storage."
- },
- "name": "amq6-persistent"
- },
- "labels": {
- "template": "amq6-persistent"
- },
- "parameters": [
- {
- "description": "ActiveMQ Release version, e.g. 6.2, etc.",
- "name": "AMQ_RELEASE",
- "value": "6.2"
- },
- {
- "description": "The name for the application.",
- "name": "APPLICATION_NAME",
- "value": "broker"
- },
- {
- "description": "Protocol to configure. Only openwire is supported by EAP. amqp, amqp+ssl, mqtt, stomp, stomp+ssl, and ssl are not supported by EAP",
- "name": "MQ_PROTOCOL",
- "value": "openwire"
- },
- {
- "description": "Queue names",
- "name": "MQ_QUEUES",
- "value": ""
- },
- {
- "description": "Topic names",
- "name": "MQ_TOPICS",
- "value": ""
- },
- {
- "description": "Size of persistent storage for database volume.",
- "name": "VOLUME_CAPACITY",
- "value": "512Mi"
- },
- {
- "description": "Broker user name",
- "name": "MQ_USERNAME",
- "from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
- },
- {
- "description": "Broker user password",
- "name": "MQ_PASSWORD",
- "from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
- },
- {
- "description": "ActiveMQ Admin User",
- "name": "AMQ_ADMIN_USERNAME",
- "from": "user[a-zA-Z0-9]{3}",
- "generate": "expression"
- },
- {
- "description": "ActiveMQ Admin Password",
- "name": "AMQ_ADMIN_PASSWORD",
- "from": "[a-zA-Z0-9]{8}",
- "generate": "expression"
- },
- {
- "description": "Name of a secret containing SSL related files",
- "name": "AMQ_SECRET",
- "value": "amq-app-secret"
- },
- {
- "description": "SSL trust store filename",
- "name": "AMQ_TRUSTSTORE",
- "value": "broker.ts"
- },
- {
- "description": "SSL key store filename",
- "name": "AMQ_KEYSTORE",
- "value": "broker.ks"
- }
- ],
- "objects": [
- {
- "kind": "Service",
- "apiVersion": "v1",
- "spec": {
- "ports": [
- {
- "port": 5672,
- "targetPort": 5672
- }
- ],
- "selector": {
- "deploymentConfig": "${APPLICATION_NAME}-amq"
- }
- },
- "metadata": {
- "name": "${APPLICATION_NAME}-amq-amqp",
- "labels": {
- "application": "${APPLICATION_NAME}"
- },
- "annotations": {
- "description": "The broker's amqp port."
- }
- }
- },
- {
- "kind": "Service",
- "apiVersion": "v1",
- "spec": {
- "ports": [
- {
- "port": 5671,
- "targetPort": 5671
- }
- ],
- "selector": {
- "deploymentConfig": "${APPLICATION_NAME}-amq"
- }
- },
- "metadata": {
- "name": "${APPLICATION_NAME}-amq-amqp-ssl",
- "labels": {
- "application": "${APPLICATION_NAME}"
- },
- "annotations": {
- "description": "The broker's amqp ssl port."
- }
- }
- },
- {
- "kind": "Service",
- "apiVersion": "v1",
- "spec": {
- "ports": [
- {
- "port": 1883,
- "targetPort": 1883
- }
- ],
- "selector": {
- "deploymentConfig": "${APPLICATION_NAME}-amq"
- }
- },
- "metadata": {
- "name": "${APPLICATION_NAME}-amq-mqtt",
- "labels": {
- "application": "${APPLICATION_NAME}"
- },
- "annotations": {
- "description": "The broker's mqtt port."
- }
- }
- },
- {
- "kind": "Service",
- "apiVersion": "v1",
- "spec": {
- "ports": [
- {
- "port": 61613,
- "targetPort": 61613
- }
- ],
- "selector": {
- "deploymentConfig": "${APPLICATION_NAME}-amq"
- }
- },
- "metadata": {
- "name": "${APPLICATION_NAME}-amq-stomp",
- "labels": {
- "application": "${APPLICATION_NAME}"
- },
- "annotations": {
- "description": "The broker's stomp port."
- }
- }
- },
- {
- "kind": "Service",
- "apiVersion": "v1",
- "spec": {
- "ports": [
- {
- "port": 61612,
- "targetPort": 61612
- }
- ],
- "selector": {
- "deploymentConfig": "${APPLICATION_NAME}-amq"
- }
- },
- "metadata": {
- "name": "${APPLICATION_NAME}-amq-stomp-ssl",
- "labels": {
- "application": "${APPLICATION_NAME}"
- },
- "annotations": {
- "description": "The broker's stomp ssl port."
- }
- }
- },
- {
- "kind": "Service",
- "apiVersion": "v1",
- "spec": {
- "ports": [
- {
- "port": 61616,
- "targetPort": 61616
- }
- ],
- "selector": {
- "deploymentConfig": "${APPLICATION_NAME}-amq"
- }
- },
- "metadata": {
- "name": "${APPLICATION_NAME}-amq-tcp",
- "labels": {
- "application": "${APPLICATION_NAME}"
- },
- "annotations": {
- "description": "The broker's tcp (openwire) port."
- }
- }
- },
- {
- "kind": "Service",
- "apiVersion": "v1",
- "spec": {
- "ports": [
- {
- "port": 61617,
- "targetPort": 61617
- }
- ],
- "selector": {
- "deploymentConfig": "${APPLICATION_NAME}-amq"
- }
- },
- "metadata": {
- "name": "${APPLICATION_NAME}-amq-tcp-ssl",
- "labels": {
- "application": "${APPLICATION_NAME}"
- },
- "annotations": {
- "description": "The broker's tcp ssl (openwire) port."
- }
- }
- },
- {
- "kind": "DeploymentConfig",
- "apiVersion": "v1",
- "metadata": {
- "name": "${APPLICATION_NAME}-amq",
- "labels": {
- "application": "${APPLICATION_NAME}"
- }
- },
- "spec": {
- "strategy": {
- "type": "Recreate"
- },
- "triggers": [
- {
- "type": "ImageChange",
- "imageChangeParams": {
- "automatic": true,
- "containerNames": [
- "${APPLICATION_NAME}-amq"
- ],
- "from": {
- "kind": "ImageStreamTag",
- "namespace": "openshift",
- "name": "jboss-amq-6:${AMQ_RELEASE}"
- }
- }
- }
- ],
- "replicas": 1,
- "selector": {
- "deploymentConfig": "${APPLICATION_NAME}-amq"
- },
- "template": {
- "metadata": {
- "name": "${APPLICATION_NAME}-amq",
- "labels": {
- "deploymentConfig": "${APPLICATION_NAME}-amq",
- "application": "${APPLICATION_NAME}"
- }
- },
- "spec": {
- "serviceAccount": "amq-service-account",
- "containers": [
- {
- "name": "${APPLICATION_NAME}-amq",
- "image": "jboss-amq-6",
- "imagePullPolicy": "Always",
- "volumeMounts": [
- {
- "name": "broker-secret-volume",
- "mountPath": "/etc/amq-secret-volume",
- "readOnly": true
- },
- {
- "mountPath": "/opt/amq/data/kahadb",
- "name": "${APPLICATION_NAME}-amq-pvol"
- }
- ],
- "readinessProbe": {
- "exec": {
- "command": [
- "/bin/bash",
- "-c",
- "curl -s -L -u ${AMQ_ADMIN_USERNAME}:${AMQ_ADMIN_PASSWORD} 'http://localhost:8161/hawtio/jolokia/read/org.apache.activemq:type=Broker,brokerName=*,service=Health/CurrentStatus' | grep -q '\"CurrentStatus\" *: *\"Good\"'"
- ]
- }
- },
- "ports": [
- {
- "name": "amqp",
- "containerPort": 5672,
- "protocol": "TCP"
- },
- {
- "name": "amqp-ssl",
- "containerPort": 5671,
- "protocol": "TCP"
- },
- {
- "name": "mqtt",
- "containerPort": 1883,
- "protocol": "TCP"
- },
- {
- "name": "stomp",
- "containerPort": 61613,
- "protocol": "TCP"
- },
- {
- "name": "stomp-ssl",
- "containerPort": 61612,
- "protocol": "TCP"
- },
- {
- "name": "tcp",
- "containerPort": 61616,
- "protocol": "TCP"
- },
- {
- "name": "tcp-ssl",
- "containerPort": 61617,
- "protocol": "TCP"
- }
- ],
- "env": [
- {
- "name": "AMQ_USER",
- "value": "${MQ_USERNAME}"
- },
- {
- "name": "AMQ_PASSWORD",
- "value": "${MQ_PASSWORD}"
- },
- {
- "name": "AMQ_PROTOCOLS",
- "value": "${MQ_PROTOCOL}"
- },
- {
- "name": "AMQ_QUEUES",
- "value": "${MQ_QUEUES}"
- },
- {
- "name": "AMQ_TOPICS",
- "value": "${MQ_TOPICS}"
- },
- {
- "name": "AMQ_ADMIN_USERNAME",
- "value": "${AMQ_ADMIN_USERNAME}"
- },
- {
- "name": "AMQ_ADMIN_PASSWORD",
- "value": "${AMQ_ADMIN_PASSWORD}"
- },
- {
- "name": "AMQ_KEYSTORE_TRUSTSTORE_DIR",
- "value": "/etc/amq-secret-volume"
- },
- {
- "name": "AMQ_TRUSTSTORE",
- "value": "${AMQ_TRUSTSTORE}"
- },
- {
- "name": "AMQ_KEYSTORE",
- "value": "${AMQ_KEYSTORE}"
- }
- ]
- }
- ],
- "volumes": [
- {
- "name": "broker-secret-volume",
- "secret": {
- "secretName": "${AMQ_SECRET}"
- }
- },
- {
- "name": "${APPLICATION_NAME}-amq-pvol",
- "persistentVolumeClaim": {
- "claimName": "${APPLICATION_NAME}-amq-claim"
- }
- }
- ]
- }
- }
- }
- },
- {
- "apiVersion": "v1",
- "kind": "PersistentVolumeClaim",
- "metadata": {
- "name": "${APPLICATION_NAME}-amq-claim",
- "labels": {
- "application": "${APPLICATION_NAME}"
- }
- },
- "spec": {
- "accessModes": [ "ReadWriteOnce" ],
- "resources": {
- "requests": {
- "storage": "${VOLUME_CAPACITY}"
- }
- }
- }
- }
- ]
- }
|