Skip to content

Commit

Permalink
Merge pull request #9 from calvinzhuca/rhba70-dev
Browse files Browse the repository at this point in the history
[RHBA-577] Create OpenShift templates based on RHBA LA release -- 1st draft
  • Loading branch information
errantepiphany committed Mar 20, 2018
2 parents 29356af + aff8c10 commit bc27e48
Show file tree
Hide file tree
Showing 10 changed files with 2,289 additions and 31 deletions.
330 changes: 330 additions & 0 deletions templates/rhba70-businesscentral-monitoring-with-smartrouter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,330 @@
---
kind: Template
apiVersion: v1
metadata:
annotations:
description: Application template for Red Hat Business Central 7.0 which includes Business Central Monitoring and Smart Router.
iconClass: icon-jboss
tags: rhba,jboss,xpaas
version: 1.4.0
openshift.io/display-name: Red Hat Business Central 7.0 Monitoring + Smart router
name: rhba70-businesscentral-monitoring-with-smartrouter
labels:
template: rhba70-businesscentral-monitoring-with-smartrouter
xpaas: 1.4.0
message: A new Business Central Monitoring + Smart Router applications have been created in your project. The username/password for accessing Business Central Monitoring interface is ${KIE_ADMIN_USER}/${KIE_ADMIN_PWD}.
parameters:
- displayName: Application Name
description: The name for the application.
name: APPLICATION_NAME
value: myapp
required: true
- displayName: EAP Admin User
description: EAP administrator username
name: ADMIN_USERNAME
value: eapadmin
required: false
- displayName: EAP Admin Password
description: EAP administrator password
name: ADMIN_PASSWORD
from: "[a-zA-Z]{6}[0-9]{1}!"
generate: expression
required: false
- displayName: KIE Admin User
description: KIE administrator username
name: KIE_ADMIN_USER
value: adminUser
required: false
- displayName: KIE Admin Password
description: KIE administrator password
name: KIE_ADMIN_PWD
from: "[a-zA-Z]{6}[0-9]{1}!"
generate: expression
required: false
- displayName: KIE Server User
description: KIE execution server username (Sets the org.kie.server.user system property)
name: KIE_SERVER_USER
value: executionUser
required: false
- displayName: KIE Server Password
description: KIE execution server password (Sets the org.kie.server.pwd system property)
name: KIE_SERVER_PWD
from: "[a-zA-Z]{6}[0-9]{1}!"
generate: expression
required: false
- displayName: Business Central Custom http Route Hostname
description: 'Custom hostname for http service route. Leave blank for default hostname,
e.g.: <application-name>-rhbacentrmon-<project>.<default-domain-suffix>'
name: BUSINESS_CENTRAL_HOSTNAME_HTTP
value: ''
required: false
- displayName: ImageStream Namespace
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.
name: IMAGE_STREAM_NAMESPACE
value: openshift
required: true
- displayName: ImageStream Tag
description: A named pointer to an image in an image stream. Default is "1.0".
name: IMAGE_STREAM_TAG
value: "1.0"
required: false
- displayName: Smart Router Custom http Route Hostname
description: Custom hostname for http service route. Leave blank for default hostname, e.g. <application-name>-smartrouter-<project>.<default-domain-suffix>'
name: SMART_ROUTER_HOSTNAME_HTTP
value: ''
required: false
- displayName: Smart Router ID
description: Router ID used when connecting to the controller (router property org.kie.server.router.id)
name: KIE_SERVER_ROUTER_ID
value: kie-server-router
- displayName: Smart Router listening port
description: Port in which the smart router server listens (router property org.kie.server.router.port)
name: KIE_SERVER_ROUTER_PORT
value: "9000"
- displayName: Smart Router protocol
description: KIE server router protocol (Used to build the org.kie.server.router.url.external property)
name: KIE_SERVER_ROUTER_PROTOCOL
value: http
- displayName: Smart Router external URL
description: Public URL where the router can be found. Format http://<host>:<port> (router property org.kie.server.router.url.external)
name: KIE_SERVER_ROUTER_URL_EXTERNAL
- displayName: Smart Router name
description: Router name used when connecting to the controller (router property org.kie.server.router.name)
name: KIE_SERVER_ROUTER_NAME
value: KIE Server Router
- displayName: KIE server controller host
description: KIE server controller host (Used to set the org.kie.server.controller system property)
name: KIE_SERVER_CONTROLLER_HOST
example: my-app-controller-ocpuser.os.example.com
required: false
- displayName: KIE server controller port
description: KIE server controller port (Used to set the org.kie.server.controller system property)
name: KIE_SERVER_CONTROLLER_PORT
example: '8080'
required: false
- displayName: KIE server controller protocol
description: KIE server controller protocol (Used to set the org.kie.server.controller system property)
name: KIE_SERVER_CONTROLLER_PROTOCOL
value: http
required: false
- displayName: KIE server controller service
description: KIE server controller service (Used to set the org.kie.server.controller system property if host and port aren't set)
name: KIE_SERVER_CONTROLLER_SERVICE
value: ''
required: false
- displayName: KIE Server Controller User
description: KIE server controller username (Sets the org.kie.server.controller.user system property)
name: KIE_SERVER_CONTROLLER_USER
value: controllerUser
required: false
- displayName: KIE Server Controller Password
description: KIE server controller password (Sets the org.kie.server.controller.pwd system property)
name: KIE_SERVER_CONTROLLER_PWD
from: "[a-zA-Z]{6}[0-9]{1}!"
generate: expression
required: false
- displayName: KIE Server controller token
description: KIE server controller token for bearer authentication (Sets the org.kie.server.controller.token system property)
name: KIE_SERVER_CONTROLLER_TOKEN
objects:
- kind: Service
apiVersion: v1
spec:
ports:
- port: 8080
targetPort: 8080
selector:
deploymentConfig: "${APPLICATION_NAME}-rhbacentrmon"
metadata:
name: "${APPLICATION_NAME}-rhbacentrmon"
labels:
application: "${APPLICATION_NAME}"
annotations:
description: The Business Central web server's http port.
- kind: Service
apiVersion: v1
spec:
ports:
- port: 9000
targetPort: 9000
selector:
deploymentConfig: "${APPLICATION_NAME}-smartrouter"
metadata:
name: "${APPLICATION_NAME}-smartrouter"
labels:
application: "${APPLICATION_NAME}"
annotations:
description: The smart router server http port.
- kind: Route
apiVersion: v1
id: "${APPLICATION_NAME}-rhbacentrmon-http"
metadata:
name: "${APPLICATION_NAME}-rhbacentrmon"
labels:
application: "${APPLICATION_NAME}"
annotations:
description: Route for Business Central's http service.
spec:
host: "${BUSINESS_CENTRAL_HOSTNAME_HTTP}"
to:
name: "${APPLICATION_NAME}-rhbacentrmon"
- kind: Route
apiVersion: v1
id: "${APPLICATION_NAME}-smartrouter-http"
metadata:
name: "${APPLICATION_NAME}-smartrouter"
labels:
application: "${APPLICATION_NAME}"
annotations:
description: Route for the smart router's http service.
spec:
host: "${SMART_ROUTER_HOSTNAME_HTTP}"
to:
name: "${APPLICATION_NAME}-smartrouter"
- kind: DeploymentConfig
apiVersion: v1
metadata:
name: "${APPLICATION_NAME}-rhbacentrmon"
labels:
application: "${APPLICATION_NAME}"
spec:
strategy:
type: Recreate
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- "${APPLICATION_NAME}-rhbacentrmon"
from:
kind: ImageStreamTag
namespace: "${IMAGE_STREAM_NAMESPACE}"
name: "rhba70-businesscentral-monitoring-openshift:${IMAGE_STREAM_TAG}"
- type: ConfigChange
replicas: 1
selector:
deploymentConfig: "${APPLICATION_NAME}-rhbacentrmon"
template:
metadata:
name: "${APPLICATION_NAME}-rhbacentrmon"
labels:
deploymentConfig: "${APPLICATION_NAME}-rhbacentrmon"
application: "${APPLICATION_NAME}"
spec:
terminationGracePeriodSeconds: 60
containers:
- name: "${APPLICATION_NAME}-rhbacentrmon"
image: rhba70-businesscentral-monitoring-openshift
imagePullPolicy: Always
livenessProbe:
exec:
command:
- "/bin/bash"
- "-c"
- "/opt/eap/bin/livenessProbe.sh"
readinessProbe:
exec:
command:
- "/bin/bash"
- "-c"
- "/opt/eap/bin/readinessProbe.sh"
ports:
- name: jolokia
containerPort: 8778
protocol: TCP
- name: http
containerPort: 8080
protocol: TCP
env:
- name: KIE_ADMIN_PWD
value: "${KIE_ADMIN_PWD}"
- name: KIE_ADMIN_USER
value: "${KIE_ADMIN_USER}"
- name: KIE_SERVER_PWD
value: "${KIE_SERVER_PWD}"
- name: KIE_SERVER_USER
value: "${KIE_SERVER_USER}"
- name: ADMIN_USERNAME
value: "${ADMIN_USERNAME}"
- name: ADMIN_PASSWORD
value: "${ADMIN_PASSWORD}"
- name: KIE_SERVER_CONTROLLER_PWD
value: ${KIE_SERVER_CONTROLLER_PWD}
- name: KIE_SERVER_CONTROLLER_USER
value: ${KIE_SERVER_CONTROLLER_USER}
- name: PROBE_IMPL
value: probe.eap.jolokia.EapProbe
- name: PROBE_DISABLE_BOOT_ERRORS_CHECK
value: 'true'
- kind: DeploymentConfig
apiVersion: v1
metadata:
name: ${APPLICATION_NAME}-smartrouter
labels:
application: "${APPLICATION_NAME}"
spec:
strategy:
type: Recreate
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- "${APPLICATION_NAME}-smartrouter"
from:
kind: ImageStreamTag
namespace: "${IMAGE_STREAM_NAMESPACE}"
name: "rhba70-smartrouter-openshift:${IMAGE_STREAM_TAG}"
- type: ConfigChange
replicas: 1
selector:
deploymentConfig: "${APPLICATION_NAME}-smartrouter"
template:
metadata:
name: "${APPLICATION_NAME}-smartrouter"
labels:
application: "${APPLICATION_NAME}"
deploymentConfig: "${APPLICATION_NAME}-smartrouter"
spec:
terminationGracePeriodSeconds: 60
containers:
- name: "${APPLICATION_NAME}-smartrouter"
image: rhba70-smartrouter-openshift
imagePullPolicy: Always
ports:
- name: http
containerPort: 9000
protocol: TCP
env:
- name: KIE_SERVER_ROUTER_HOST
valueFrom:
fieldRef:
fieldPath: status.podIP
- name: KIE_SERVER_ROUTER_PORT
value: "${KIE_SERVER_ROUTER_PORT}"
- name: KIE_SERVER_ROUTER_URL_EXTERNAL
value: "${KIE_SERVER_ROUTER_URL_EXTERNAL}"
- name: KIE_SERVER_ROUTER_ID
value: "${KIE_SERVER_ROUTER_ID}"
- name: KIE_SERVER_ROUTER_NAME
value: "${KIE_SERVER_ROUTER_NAME}"
- name: KIE_SERVER_ROUTER_PROTOCOL
value: "${KIE_SERVER_ROUTER_PROTOCOL}"
- name: KIE_SERVER_CONTROLLER_HOST
value: "${KIE_SERVER_CONTROLLER_HOST}"
- name: KIE_SERVER_CONTROLLER_PORT
value: "${KIE_SERVER_CONTROLLER_PORT}"
- name: KIE_SERVER_CONTROLLER_PROTOCOL
value: "${KIE_SERVER_CONTROLLER_PROTOCOL}"
- name: KIE_SERVER_CONTROLLER_SERVICE
value: "${KIE_SERVER_CONTROLLER_SERVICE}"
- name: KIE_SERVER_CONTROLLER_USER
value: "${KIE_SERVER_CONTROLLER_USER}"
- name: KIE_SERVER_CONTROLLER_PWD
value: "${KIE_SERVER_CONTROLLER_PWD}"
- name: KIE_SERVER_CONTROLLER_TOKEN
value: "${KIE_SERVER_CONTROLLER_TOKEN}"

0 comments on commit bc27e48

Please sign in to comment.