generated from bcgov/quickstart-openshift
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
deploy files for kafka and zookeeper
- Loading branch information
Showing
2 changed files
with
261 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |