diff --git a/openshift/templates/etl/debezium-kafka.deploy.yaml b/openshift/templates/etl/debezium-kafka.deploy.yaml new file mode 100644 index 00000000..7bef3657 --- /dev/null +++ b/openshift/templates/etl/debezium-kafka.deploy.yaml @@ -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 \ No newline at end of file diff --git a/openshift/templates/etl/debezium-zookeeper.deploy.yaml b/openshift/templates/etl/debezium-zookeeper.deploy.yaml new file mode 100644 index 00000000..9d4bb609 --- /dev/null +++ b/openshift/templates/etl/debezium-zookeeper.deploy.yaml @@ -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 \ No newline at end of file