{ "apiVersion": "v1", "kind": "Template", "metadata": { "annotations": { "description": "Camel route using ActiveMQ in Karaf container.", "tags": "quickstart,java,karaf,fis", "iconClass": "icon-jboss", "version": "2.0" }, "name": "s2i-karaf2-camel-amq" }, "labels": { "template": "s2i-karaf2-camel-amq" }, "parameters": [ { "name": "APP_NAME", "displayName": "Application Name", "required": true, "value": "s2i-karaf2-camel-amq", "description": "The name assigned to the application." }, { "name": "GIT_REPO", "displayName": "Git Repository URL", "value": "https://github.com/maschmid/karaf2-camel-amq.git", "required": true, "description": "The URL of the repository with your application source code." }, { "name": "GIT_REF", "displayName": "Git Reference", "value": "bz1393711", "description": "Set this to a branch name, tag or other ref of your repository if you are not using the default branch." }, { "name": "SERVICE_NAME", "displayName": "Service Name", "value": "s2i-karaf2-camel-amq", "description": "Exposed Service name." }, { "name": "BUILDER_VERSION", "displayName": "Builder version", "value": "2.0", "description": "The version of the FIS S2I builder image to use." }, { "name": "APP_VERSION", "displayName": "Application Version", "value": "1.0.0.redhat-000004", "description": "The application version." }, { "name": "MAVEN_ARGS", "displayName": "Maven Arguments", "value": "install -DskipTests -Dfabric8.skip -e -B", "description": "Arguments passed to mvn in the build." }, { "name": "MAVEN_ARGS_APPEND", "displayName": "Extra Maven Arguments", "description": "Extra arguments passed to mvn, e.g. for multi-module builds." }, { "name": "ARTIFACT_DIR", "displayName": "Maven build directory", "description": "Directory of the artifact to be built, e.g. for multi-module builds." }, { "name": "IMAGE_STREAM_NAMESPACE", "displayName": "Image Stream Namespace", "value": "openshift", "required": true, "description": "Namespace in which the Fuse ImageStreams 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." }, { "name": "BUILD_SECRET", "displayName": "Git Build Secret", "generate": "expression", "description": "The secret needed to trigger a build.", "from": "[a-zA-Z0-9]{40}" }, { "name": "ACTIVEMQ_SERVICE_NAME", "displayName": "ActiveMQ Broker Service", "required": true, "value": "broker-amq-tcp", "description": "Set this to the name of the TCP service of the ActiveMQ broker. You may need to create a broker first." }, { "name": "ACTIVEMQ_USERNAME", "displayName": "ActiveMQ Broker Username", "value": "admin", "description": "The username used to authenticate with the ActiveMQ broker. Leave it empty if authentication is disabled." }, { "name": "ACTIVEMQ_PASSWORD", "displayName": "ActiveMQ Broker Password", "value": "admin", "description": "The password used to authenticate with the ActiveMQ broker. Leave it empty if authentication is disabled." }, { "description": "Protocols to configure, separated by commas. Allowed values are: `openwire`, `amqp`, `stomp` and `mqtt`.", "name": "MQ_PROTOCOL", "value": "openwire", "required": false }, { "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.", "name": "MQ_QUEUES", "value": "", "required": false }, { "description": "Topic names, separated by commas. These topics will be automatically created when the broker starts. If left empty, topics will be still created dynamically.", "name": "MQ_TOPICS", "value": "", "required": false }, { "description": "List of packages that are allowed to be serialized for use in ObjectMessage, separated by commas. If your app doesn't use ObjectMessages, leave this blank. This is a security enforcement. For the rationale, see http://activemq.apache.org/objectmessage.html", "name": "MQ_SERIALIZABLE_PACKAGES", "value": "", "required": false }, { "description": "User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.", "name": "MQ_USERNAME", "value": "admin", "required": false }, { "description": "Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.", "name": "MQ_PASSWORD", "value": "admin", "required": false }, { "description": "The discovery agent type to use for discovering mesh endpoints. 'dns' will use OpenShift's DNS service to resolve endpoints. 'kube' will use Kubernetes REST API to resolve service endpoints. If using 'kube' the service account for the pod must have the 'view' role, which can be added via 'oc policy add-role-to-user view system:serviceaccount::default' where is the project namespace.", "name": "AMQ_MESH_DISCOVERY_TYPE", "value": "kube", "required": false }, { "description": "The A-MQ storage usage limit", "name": "AMQ_STORAGE_USAGE_LIMIT", "value": "100 gb", "required": false } ], "objects": [ { "kind": "Service", "apiVersion": "v1", "spec": { "ports": [ { "port": 61616, "targetPort": 61616 } ], "selector": { "deploymentConfig": "broker-amq" } }, "metadata": { "name": "broker-amq-tcp", "labels": { "application": "broker" }, "annotations": { "description": "The broker's OpenWire port." } } }, { "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { "name": "broker-amq", "labels": { "application": "broker" } }, "spec": { "strategy": { "type": "Rolling", "rollingParams": { "maxSurge": 0 } }, "triggers": [ { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "broker-amq" ], "from": { "kind": "ImageStreamTag", "namespace": "${IMAGE_STREAM_NAMESPACE}", "name": "jboss-amq-62:1.3" } } }, { "type": "ConfigChange" } ], "replicas": 1, "selector": { "deploymentConfig": "broker-amq" }, "template": { "metadata": { "name": "broker-amq", "labels": { "deploymentConfig": "broker-amq", "application": "broker" } }, "spec": { "terminationGracePeriodSeconds": 60, "containers": [ { "name": "broker-amq", "image": "jboss-amq-62", "imagePullPolicy": "Always", "readinessProbe": { "exec": { "command": [ "/bin/bash", "-c", "/opt/amq/bin/readinessProbe.sh" ] } }, "ports": [ { "name": "jolokia", "containerPort": 8778, "protocol": "TCP" }, { "name": "amqp", "containerPort": 5672, "protocol": "TCP" }, { "name": "mqtt", "containerPort": 1883, "protocol": "TCP" }, { "name": "stomp", "containerPort": 61613, "protocol": "TCP" }, { "name": "tcp", "containerPort": 61616, "protocol": "TCP" } ], "env": [ { "name": "AMQ_USER", "value": "${MQ_USERNAME}" }, { "name": "AMQ_PASSWORD", "value": "${MQ_PASSWORD}" }, { "name": "AMQ_TRANSPORTS", "value": "${MQ_PROTOCOL}" }, { "name": "AMQ_QUEUES", "value": "${MQ_QUEUES}" }, { "name": "AMQ_TOPICS", "value": "${MQ_TOPICS}" }, { "name": "MQ_SERIALIZABLE_PACKAGES", "value": "${MQ_SERIALIZABLE_PACKAGES}" }, { "name": "AMQ_MESH_DISCOVERY_TYPE", "value": "${AMQ_MESH_DISCOVERY_TYPE}" }, { "name": "AMQ_MESH_SERVICE_NAME", "value": "broker-amq-tcp" }, { "name": "AMQ_MESH_SERVICE_NAMESPACE", "valueFrom": { "fieldRef": { "fieldPath": "metadata.namespace" } } }, { "name": "AMQ_STORAGE_USAGE_LIMIT", "value": "${AMQ_STORAGE_USAGE_LIMIT}" } ] } ] } } } }, { "kind": "ImageStream", "apiVersion": "v1", "metadata": { "name": "${APP_NAME}", "creationTimestamp": null, "labels": { "component": "${APP_NAME}", "container": "karaf", "group": "quickstarts", "project": "${APP_NAME}", "provider": "s2i", "version": "${APP_VERSION}" } }, "spec": {}, "status": { "dockerImageRepository": "" } }, { "kind": "BuildConfig", "apiVersion": "v1", "metadata": { "name": "${APP_NAME}", "creationTimestamp": null, "labels": { "component": "${APP_NAME}", "container": "karaf", "group": "quickstarts", "project": "${APP_NAME}", "provider": "s2i", "version": "${APP_VERSION}" } }, "spec": { "triggers": [ { "type": "GitHub", "github": { "secret": "${BUILD_SECRET}" } }, { "type": "Generic", "generic": { "secret": "${BUILD_SECRET}" } }, { "type": "ConfigChange" }, { "type": "ImageChange", "imageChange": {} } ], "source": { "type": "Git", "git": { "uri": "${GIT_REPO}", "ref": "${GIT_REF}" } }, "strategy": { "type": "Source", "sourceStrategy": { "from": { "kind": "DockerImage", "name": "registry.access.redhat.com/jboss-fuse-6-tech-preview/fis-karaf-openshift:2.0" }, "forcePull": true, "incremental": true, "env": [ { "name": "BUILD_LOGLEVEL", "value": "5" }, { "name": "ARTIFACT_DIR", "value": "${ARTIFACT_DIR}" }, { "name": "MAVEN_ARGS", "value": "${MAVEN_ARGS}" }, { "name": "MAVEN_ARGS_APPEND", "value": "${MAVEN_ARGS_APPEND}" } ] } }, "output": { "to": { "kind": "ImageStreamTag", "name": "${APP_NAME}:latest" } }, "resources": {} }, "status": { "lastVersion": 0 } }, { "kind": "DeploymentConfig", "apiVersion": "v1", "metadata": { "name": "${APP_NAME}", "creationTimestamp": null, "labels": { "component": "${APP_NAME}", "container": "karaf", "group": "quickstarts", "project": "${APP_NAME}", "provider": "s2i", "version": "${APP_VERSION}" } }, "spec": { "strategy": { "resources": {} }, "triggers": [ { "type": "ConfigChange" }, { "type": "ImageChange", "imageChangeParams": { "automatic": true, "containerNames": [ "${APP_NAME}" ], "from": { "kind": "ImageStreamTag", "name": "${APP_NAME}:latest" } } } ], "replicas": 1, "selector": { "component": "${APP_NAME}", "container": "karaf", "deploymentconfig": "${APP_NAME}", "group": "quickstarts", "project": "${APP_NAME}", "provider": "s2i", "version": "${APP_VERSION}" }, "template": { "metadata": { "creationTimestamp": null, "labels": { "component": "${APP_NAME}", "container": "karaf", "deploymentconfig": "${APP_NAME}", "group": "quickstarts", "project": "${APP_NAME}", "provider": "s2i", "version": "${APP_VERSION}" } }, "spec": { "containers": [ { "name": "${APP_NAME}", "image": "library/${APP_NAME}:latest", "readinessProbe" : { "httpGet" : { "path" : "/readiness-check", "port" : 8181 }, "initialDelaySeconds" : 10 }, "livenessProbe" : { "httpGet" : { "path" : "/health-check", "port" : 8181 }, "initialDelaySeconds" : 180 }, "ports": [ { "containerPort": 8181, "name": "http" }, { "containerPort": 8778, "name": "jolokia" } ], "env" : [ { "name" : "KUBERNETES_NAMESPACE", "valueFrom" : { "fieldRef" : { "fieldPath" : "metadata.namespace" } } }, { "name": "ACTIVEMQ_SERVICE_NAME", "value": "${ACTIVEMQ_SERVICE_NAME}" }, { "name": "ACTIVEMQ_USERNAME", "value": "${ACTIVEMQ_USERNAME}" }, { "name": "ACTIVEMQ_PASSWORD", "value": "${ACTIVEMQ_PASSWORD}" } ], "resources": {} } ] } } }, "status": {} } ] }