Skip to content

Commit

Permalink
deploy files for kafka and zookeeper
Browse files Browse the repository at this point in the history
  • Loading branch information
jaise-aot committed Nov 1, 2023
1 parent 62361ad commit fb9589b
Show file tree
Hide file tree
Showing 2 changed files with 261 additions and 0 deletions.
130 changes: 130 additions & 0 deletions openshift/templates/etl/debezium-kafka.deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
---
kind: Template
apiVersion: template.openshift.io/v1
metadata:
annotations:
description: Deployment template for Apache Kafka.
tags: "${API_NAME}"
name: "${API_NAME}-deploy"
objects:
- kind: DeploymentConfig
apiVersion: apps.openshift.io/v1
metadata:
name: "${API_NAME}"
labels:
app: "${API_NAME}"
app-group: "${APP_GROUP}"
template: "${API_NAME}-deploy"
spec:
strategy:
type: Rolling
rollingParams:
updatePeriodSeconds: 1
intervalSeconds: 1
timeoutSeconds: 600
maxUnavailable: 25%
maxSurge: 25%
triggers:
- type: ConfigChange
replicas: 1
test: false
selector:
app: "${API_NAME}"
deploymentconfig: "${API_NAME}"
template:
metadata:
labels:
app: "${API_NAME}"
app-group: "${APP_GROUP}"
deploymentconfig: "${API_NAME}"
template: "${API_NAME}-deploy"
role: api
spec:
containers:
- name: "${API_NAME}"
image: debezium/kafka:1.9
imagePullPolicy: Always
ports:
- containerPort: 9092
protocol: TCP
env:
- name: ZOOKEEPER_CONNECT
value: debezium-zookeeper:2181
resources:
requests:
cpu: "50m"
memory: "250Mi"
limits:
cpu: "150m"
memory: "500Mi"
terminationMessagePath: "/dev/termination-log"
terminationMessagePolicy: File
imagePullPolicy: Always
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
schedulerName: default-scheduler
- kind: Service
apiVersion: v1
metadata:
name: "${API_NAME}"
creationTimestamp:
labels:
app: "${API_NAME}"
app-group: "${APP_GROUP}"
template: "${API_NAME}-deploy"
spec:
ports:
- name: 9092-tcp
protocol: TCP
port: 9092
targetPort: 9092
selector:
deploymentconfig: "${API_NAME}"
type: ClusterIP
sessionAffinity: None
# status:
# loadBalancer: {}
- kind: Route
apiVersion: v1
metadata:
name: "${API_NAME}"
labels:
app: "${API_NAME}"
app-group: "${APP_GROUP}"
template: "${API_NAME}-deploy"
spec:
to:
kind: Service
name: "${API_NAME}"
weight: 100
port:
targetPort: 9092-tcp
tls:
termination: edge
wildcardPolicy: None
host: "${API_NAME}-${TAG_NAME}.apps.silver.devops.gov.bc.ca"
parameters:
- name: API_NAME
displayName: Name
description: The name assigned to all of the OpenShift resources associated to the
server instance.
required: true
value: debezium-kafka
- name: APP_GROUP
displayName: App Group
description: The name assigned to all of the deployments in this project.
required: true
value: epd
- name: IMAGE_NAMESPACE
displayName: Image Namespace
required: true
description: The namespace of the OpenShift project containing the imagestream for
the application.
value: c6a6e5-tools
- name: TAG_NAME
displayName: Environment TAG name
description: The TAG name for this environment, e.g., dev, test, prod
required: true
value: dev
131 changes: 131 additions & 0 deletions openshift/templates/etl/debezium-zookeeper.deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
---
kind: Template
apiVersion: template.openshift.io/v1
metadata:
annotations:
description: Deployment template for Zookeeper.
tags: "${API_NAME}"
name: "${API_NAME}-deploy"
objects:
- kind: DeploymentConfig
apiVersion: apps.openshift.io/v1
metadata:
name: "${API_NAME}"
labels:
app: "${API_NAME}"
app-group: "${APP_GROUP}"
template: "${API_NAME}-deploy"
spec:
strategy:
type: Rolling
rollingParams:
updatePeriodSeconds: 1
intervalSeconds: 1
timeoutSeconds: 600
maxUnavailable: 25%
maxSurge: 25%
triggers:
- type: ConfigChange
replicas: 1
test: false
selector:
app: "${API_NAME}"
deploymentconfig: "${API_NAME}"
template:
metadata:
labels:
app: "${API_NAME}"
app-group: "${APP_GROUP}"
deploymentconfig: "${API_NAME}"
template: "${API_NAME}-deploy"
role: api
spec:
containers:
- name: "${API_NAME}"
image: debezium/zookeeper:1.9
imagePullPolicy: Always
ports:
- containerPort: 2181
protocol: TCP
- containerPort: 2888
protocol: TCP
- containerPort: 3888
protocol: TCP
resources:
requests:
cpu: "50m"
memory: "250Mi"
limits:
cpu: "150m"
memory: "500Mi"
terminationMessagePath: "/dev/termination-log"
terminationMessagePolicy: File
imagePullPolicy: Always
restartPolicy: Always
terminationGracePeriodSeconds: 30
dnsPolicy: ClusterFirst
securityContext: {}
schedulerName: default-scheduler
- kind: Service
apiVersion: v1
metadata:
name: "${API_NAME}"
creationTimestamp:
labels:
app: "${API_NAME}"
app-group: "${APP_GROUP}"
template: "${API_NAME}-deploy"
spec:
ports:
- name: 2181-tcp
protocol: TCP
port: 2181
targetPort: 2181
selector:
deploymentconfig: "${API_NAME}"
type: ClusterIP
sessionAffinity: None
# status:
# loadBalancer: {}
- kind: Route
apiVersion: v1
metadata:
name: "${API_NAME}"
labels:
app: "${API_NAME}"
app-group: "${APP_GROUP}"
template: "${API_NAME}-deploy"
spec:
to:
kind: Service
name: "${API_NAME}"
weight: 100
port:
targetPort: 2181-tcp
tls:
termination: edge
wildcardPolicy: None
host: "${API_NAME}-${TAG_NAME}.apps.silver.devops.gov.bc.ca"
parameters:
- name: API_NAME
displayName: Name
description: The name assigned to all of the OpenShift resources associated to the
server instance.
required: true
value: debezium-zookeeper
- name: APP_GROUP
displayName: App Group
description: The name assigned to all of the deployments in this project.
required: true
value: epd
- name: IMAGE_NAMESPACE
displayName: Image Namespace
required: true
description: The namespace of the OpenShift project containing the imagestream for
the application.
value: c6a6e5-tools
- name: TAG_NAME
displayName: Environment TAG name
description: The TAG name for this environment, e.g., dev, test, prod
required: true
value: dev

0 comments on commit fb9589b

Please sign in to comment.