apiVersion: v1 kind: Template labels: template: eap-clustering metadata: annotations: description: A JBoss EAP clustering on OpenShift example. iconClass: icon-jboss tags: instant-app,eap,java creationTimestamp: null name: eap-clustering objects: - apiVersion: v1 kind: Service metadata: annotations: description: The web server's http port. labels: application: ${APPLICATION_NAME} name: ${APPLICATION_NAME} spec: ports: - port: 8080 targetPort: 8080 selector: deploymentConfig: ${APPLICATION_NAME} - apiVersion: v1 kind: Route metadata: annotations: description: Route for application's http service. labels: application: ${APPLICATION_NAME} name: ${APPLICATION_NAME} spec: host: ${HOSTNAME_HTTP} path: /session-replication/ to: name: ${APPLICATION_NAME} - apiVersion: v1 kind: ImageStream metadata: labels: application: ${APPLICATION_NAME} name: ${APPLICATION_NAME} - apiVersion: v1 kind: BuildConfig metadata: labels: application: ${APPLICATION_NAME} name: ${APPLICATION_NAME} spec: output: to: kind: ImageStreamTag name: ${APPLICATION_NAME}:latest source: git: ref: master uri: https://github.com/andyneeb/eap-clustering type: Git strategy: sourceStrategy: forcePull: true from: kind: ImageStreamTag name: jboss-eap64-openshift:1.4 namespace: openshift type: Source triggers: - github: secret: ${GITHUB_WEBHOOK_SECRET} type: GitHub - generic: secret: ${GENERIC_WEBHOOK_SECRET} type: Generic - imageChange: {} type: ImageChange - type: ConfigChange - apiVersion: v1 kind: DeploymentConfig metadata: labels: application: ${APPLICATION_NAME} name: ${APPLICATION_NAME} spec: replicas: 2 selector: deploymentConfig: ${APPLICATION_NAME} strategy: type: Recreate template: metadata: labels: application: ${APPLICATION_NAME} deploymentConfig: ${APPLICATION_NAME} name: ${APPLICATION_NAME} spec: containers: - env: - name: OPENSHIFT_KUBE_PING_LABELS value: application=${APPLICATION_NAME} - name: OPENSHIFT_KUBE_PING_NAMESPACE valueFrom: fieldRef: apiVersion: v1 fieldPath: metadata.namespace - name: HORNETQ_CLUSTER_PASSWORD value: ${HORNETQ_CLUSTER_PASSWORD} - name: HORNETQ_QUEUES value: ${HORNETQ_QUEUES} - name: HORNETQ_TOPICS value: ${HORNETQ_TOPICS} - name: JGROUPS_CLUSTER_PASSWORD value: ${JGROUPS_CLUSTER_PASSWORD} image: ${APPLICATION_NAME} imagePullPolicy: Always livenessProbe: exec: command: - /bin/bash - -c - /opt/eap/bin/livenessProbe.sh name: ${APPLICATION_NAME} ports: - containerPort: 8778 name: jolokia protocol: TCP - containerPort: 8080 name: http protocol: TCP - containerPort: 8888 name: ping protocol: TCP readinessProbe: exec: command: - /bin/bash - -c - /opt/eap/bin/readinessProbe.sh terminationGracePeriodSeconds: 60 triggers: - imageChangeParams: automatic: true containerNames: - ${APPLICATION_NAME} from: kind: ImageStream name: ${APPLICATION_NAME} type: ImageChange - type: ConfigChange parameters: - description: The name for the application. name: APPLICATION_NAME required: true value: eap-clustering - description: 'Custom hostname for http service route. Leave blank for default hostname, e.g.: -.' name: HOSTNAME_HTTP - description: HornetQ cluster admin password from: '[a-zA-Z0-9]{8}' generate: expression name: HORNETQ_CLUSTER_PASSWORD required: true - description: GitHub trigger secret from: '[a-zA-Z0-9]{8}' generate: expression name: GITHUB_WEBHOOK_SECRET required: true - description: Generic build trigger secret from: '[a-zA-Z0-9]{8}' generate: expression name: GENERIC_WEBHOOK_SECRET required: true - description: JGroups cluster password from: '[a-zA-Z0-9]{8}' generate: expression name: JGROUPS_CLUSTER_PASSWORD required: true