Commit c6aebe88 by BrianHolsen

added openshift template for ejweb (test-only)

parents
apiVersion: v1
kind: Template
metadata:
creationTimestamp: 2017-08-03T09:45:33Z
name: ejweb
namespace: openshift
resourceVersion: "30353"
selfLink: /oapi/v1/namespaces/openshift/templates/paas-test
uid: 7ed063c6-7830-11e7-be64-00155d7f1102
objects:
- apiVersion: v1
data:
password: ZHJhZ29uY29vZnk=
username: eXVsb25nQGJiZHRlay5jb20=
kind: Secret
metadata:
creationTimestamp: null
name: ejweb
type: kubernetes.io/basic-auth
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
- apiVersion: v1
kind: ImageStream
metadata:
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-db-init
- apiVersion: v1
kind: BuildConfig
metadata:
annotations:
openshift.io/generated-by: OpenShiftWebConsole
creationTimestamp: null
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
nodeSelector: null
output:
to:
kind: ImageStreamTag
name: ${APPLICATION_NAME}:latest
postCommit: {}
resources: {}
runPolicy: Serial
source:
git:
ref: master
uri: https://git.okayapps.com/yulong/ejweb-mng-openshift.git
sourceSecret:
name: ejweb
type: Git
strategy:
sourceStrategy:
from:
kind: ImageStreamTag
name: jboss-webserver31-tomcat8-openshift:1.0
namespace: openshift
type: Source
triggers:
- generic:
secret: 3ebd3d60b40bf15b
type: Generic
- github:
secret: 121349a4c1ab1abc
type: GitHub
- imageChange: {}
type: ImageChange
- type: ConfigChange
status:
lastVersion: 0
- apiVersion: v1
kind: BuildConfig
metadata:
annotations:
openshift.io/generated-by: OpenShiftWebConsole
creationTimestamp: null
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-db-init
spec:
nodeSelector: null
output:
to:
kind: ImageStreamTag
name: ${APPLICATION_NAME}-db-init:latest
postCommit: {}
resources: {}
runPolicy: Serial
source:
git:
ref: master
uri: https://git.okayapps.com/yulong/paas-test.git
sourceSecret:
name: ejweb
type: Git
strategy:
sourceStrategy:
from:
kind: ImageStreamTag
name: jboss-webserver31-tomcat8-openshift:1.0
namespace: openshift
type: Source
triggers:
- generic:
secret: 3ebd3d60b40bf15b
type: Generic
- github:
secret: 121349a4c1ab1abc
type: GitHub
- imageChange: {}
type: ImageChange
- type: ConfigChange
status:
lastVersion: 0
- apiVersion: v1
kind: DeploymentConfig
metadata:
annotations:
openshift.io/generated-by: OpenShiftWebConsole
creationTimestamp: null
generation: 1
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-mysql
spec:
replicas: 1
selector:
app: ${APPLICATION_NAME}
deploymentconfig: ${APPLICATION_NAME}-mysql
strategy:
type: Recreate
template:
metadata:
annotations:
openshift.io/generated-by: OpenShiftWebConsole
creationTimestamp: null
labels:
app: ${APPLICATION_NAME}
deploymentconfig: ${APPLICATION_NAME}-mysql
name: ${APPLICATION_NAME}-mysql
spec:
containers:
- env:
- name: MYSQL_USER
value: ${MYSQL_USER}
- name: MYSQL_PASSWORD
value: ${MYSQL_PASSWORD}
- name: MYSQL_DATABASE
value: ${MYSQL_DATABASE}
image: mysql:latest
imagePullPolicy: Always
name: ${APPLICATION_NAME}-mysql
ports:
- containerPort: 3306
protocol: TCP
terminationGracePeriodSeconds: 60
triggers:
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- ${APPLICATION_NAME}-mysql
from:
kind: ImageStreamTag
name: mysql:latest
namespace: openshift
- type: ConfigChange
status:
availableReplicas: 0
latestVersion: 0
observedGeneration: 0
replicas: 0
unavailableReplicas: 0
updatedReplicas: 0
- apiVersion: v1
kind: DeploymentConfig
metadata:
annotations:
openshift.io/generated-by: OpenShiftWebConsole
creationTimestamp: null
generation: 1
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
name: ${APPLICATION_NAME}
replicas: 1
selector:
deploymentconfig: ${APPLICATION_NAME}
strategy:
activeDeadlineSeconds: 21600
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
creationTimestamp: null
labels:
app: ${APPLICATION_NAME}
deploymentconfig: ${APPLICATION_NAME}
spec:
containers:
- env:
- name: DB_SERVICE_NAME
value: ${APPLICATION_NAME}-mysql
- name: MYSQL_DATABASE
value: ${MYSQL_DATABASE}
- name: MYSQL_USER
value: ${MYSQL_USER}
- name: MYSQL_PASSWORD
value: ${MYSQL_PASSWORD}
image: ${APPLICATION_NAME}
imagePullPolicy: Always
name: ${APPLICATION_NAME}
ports:
- containerPort: 8080
protocol: TCP
- containerPort: 8443
protocol: TCP
- containerPort: 8778
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
dnsPolicy: ClusterFirst
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 30
test: false
triggers:
- imageChangeParams:
automatic: true
containerNames:
- ${APPLICATION_NAME}
from:
kind: ImageStreamTag
name: ${APPLICATION_NAME}:latest
type: ImageChange
- type: ConfigChange
status:
availableReplicas: 0
latestVersion: 0
observedGeneration: 0
replicas: 0
unavailableReplicas: 0
updatedReplicas: 0
- apiVersion: v1
kind: DeploymentConfig
metadata:
annotations:
openshift.io/generated-by: OpenShiftWebConsole
creationTimestamp: null
generation: 1
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-db-init
spec:
name: ${APPLICATION_NAME}-db-init
replicas: 1
selector:
deploymentconfig: ${APPLICATION_NAME}-db-init
strategy:
activeDeadlineSeconds: 21600
resources: {}
rollingParams:
intervalSeconds: 1
maxSurge: 25%
maxUnavailable: 25%
timeoutSeconds: 600
updatePeriodSeconds: 1
type: Rolling
template:
metadata:
creationTimestamp: null
labels:
app: ${APPLICATION_NAME}
deploymentconfig: ${APPLICATION_NAME}-db-init
spec:
containers:
- env:
- name: DB_SERVICE_NAME
value: ${APPLICATION_NAME}-mysql
- name: MYSQL_DATABASE
value: ${MYSQL_DATABASE}
- name: MYSQL_USER
value: ${MYSQL_USER}
- name: MYSQL_PASSWORD
value: ${MYSQL_PASSWORD}
image: ${APPLICATION_NAME}-db-init
imagePullPolicy: Always
name: ${APPLICATION_NAME}-db-init
ports:
- containerPort: 8080
protocol: TCP
- containerPort: 8443
protocol: TCP
- containerPort: 8778
protocol: TCP
resources: {}
terminationMessagePath: /dev/termination-log
dnsPolicy: ClusterFirst
restartPolicy: Always
securityContext: {}
terminationGracePeriodSeconds: 30
test: false
triggers:
- imageChangeParams:
automatic: true
containerNames:
- ${APPLICATION_NAME}-db-init
from:
kind: ImageStreamTag
name: ${APPLICATION_NAME}-db-init:latest
type: ImageChange
- type: ConfigChange
status:
availableReplicas: 0
latestVersion: 0
observedGeneration: 0
replicas: 0
unavailableReplicas: 0
updatedReplicas: 0
- apiVersion: v1
kind: Service
metadata:
annotations:
openshift.io/generated-by: OpenShiftWebConsole
creationTimestamp: null
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-mysql
spec:
ports:
- name: 3306-tcp
port: 3306
protocol: TCP
targetPort: 3306
selector:
deploymentconfig: ${APPLICATION_NAME}-mysql
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
openshift.io/generated-by: OpenShiftWebConsole
service.alpha.openshift.io/dependencies: '[{"name":"${APPLICATION_NAME}-mysql","namespace":"","kind":"Service"}]'
creationTimestamp: null
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
ports:
- name: 8080-tcp
port: 8080
protocol: TCP
targetPort: 8080
- name: 8443-tcp
port: 8443
protocol: TCP
targetPort: 8443
- name: 8778-tcp
port: 8778
protocol: TCP
targetPort: 8778
selector:
deploymentconfig: ${APPLICATION_NAME}
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
- apiVersion: v1
kind: Service
metadata:
annotations:
openshift.io/generated-by: OpenShiftWebConsole
service.alpha.openshift.io/dependencies: '[{"name":"${APPLICATION_NAME}-mysql","namespace":"","kind":"Service"}]'
creationTimestamp: null
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-db-init
spec:
ports:
- name: 8080-tcp
port: 8080
protocol: TCP
targetPort: 8080
- name: 8443-tcp
port: 8443
protocol: TCP
targetPort: 8443
- name: 8778-tcp
port: 8778
protocol: TCP
targetPort: 8778
selector:
deploymentconfig: ${APPLICATION_NAME}-db-init
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
- apiVersion: v1
id: ${APPLICATION_NAME}
kind: Route
metadata:
annotations:
description: Route for application's http service.
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}
spec:
host: ${HOSTNAME_HTTP}
to:
name: ${APPLICATION_NAME}
port:
targetPort: 8080-tcp
- apiVersion: v1
id: ${APPLICATION_NAME}-db-init
kind: Route
metadata:
annotations:
description: Route for application's db-init http service.
labels:
app: ${APPLICATION_NAME}
name: ${APPLICATION_NAME}-db-init
spec:
host: ${HOSTNAME_HTTP_DB_INIT}
to:
name: ${APPLICATION_NAME}-db-init
port:
targetPort: 8080-tcp
parameters:
- description: The name of this app
displayName: Application Name
name: APPLICATION_NAME
required: true
value: ejweb
- description: Database name
displayName: Database Name
name: MYSQL_DATABASE
required: true
value: ejweb
- displayName: MySql username
from: user[a-zA-Z0-9]{3}
generate: expression
name: MYSQL_USER
required: true
- displayName: MySql password
from: '[a-zA-Z0-9]{8}'
generate: expression
name: MYSQL_PASSWORD
required: true
- displayName: Hostname for EJWEB
value: ejweb.origin.local
name: HOSTNAME_HTTP
required: false
- displayName: Hostname for EJWEB-DB-INIT
value: ejweb-db-init.origin.local
name: HOSTNAME_HTTP_DB_INIT
required: false
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment