|
@@ -0,0 +1,331 @@
|
|
|
+{
|
|
|
+ "kind": "Template",
|
|
|
+ "apiVersion": "v1",
|
|
|
+ "metadata": {
|
|
|
+ "name": "bora_template",
|
|
|
+ "creationTimestamp": null
|
|
|
+ },
|
|
|
+ "objects": [
|
|
|
+ {
|
|
|
+ "kind": "DeploymentConfig",
|
|
|
+ "apiVersion": "v1",
|
|
|
+ "metadata": {
|
|
|
+ "name": "${APPLICATION_NAME}",
|
|
|
+ "generation": 1,
|
|
|
+ "creationTimestamp": null,
|
|
|
+ "labels": {
|
|
|
+ "app": "${APPLICATION_NAME}"
|
|
|
+ },
|
|
|
+ "annotations": {
|
|
|
+ "openshift.io/generated-by": "OpenShiftWebConsole"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "spec": {
|
|
|
+ "strategy": {
|
|
|
+ "type": "Rolling",
|
|
|
+ "rollingParams": {
|
|
|
+ "updatePeriodSeconds": 1,
|
|
|
+ "intervalSeconds": 1,
|
|
|
+ "timeoutSeconds": 600,
|
|
|
+ "maxUnavailable": "25%",
|
|
|
+ "maxSurge": "25%"
|
|
|
+ },
|
|
|
+ "resources": {},
|
|
|
+ "activeDeadlineSeconds": 21600
|
|
|
+ },
|
|
|
+ "triggers": [
|
|
|
+ {
|
|
|
+ "type": "ImageChange",
|
|
|
+ "imageChangeParams": {
|
|
|
+ "automatic": true,
|
|
|
+ "containerNames": [
|
|
|
+ "${APPLICATION_NAME}"
|
|
|
+ ],
|
|
|
+ "from": {
|
|
|
+ "kind": "ImageStreamTag",
|
|
|
+ "namespace": "bora",
|
|
|
+ "name": "${APPLICATION_NAME}:latest"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "ConfigChange"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "replicas": 1,
|
|
|
+ "test": false,
|
|
|
+ "selector": {
|
|
|
+ "deploymentconfig": "${APPLICATION_NAME}"
|
|
|
+ },
|
|
|
+ "template": {
|
|
|
+ "metadata": {
|
|
|
+ "creationTimestamp": null,
|
|
|
+ "labels": {
|
|
|
+ "app": "${APPLICATION_NAME}",
|
|
|
+ "deploymentconfig": "${APPLICATION_NAME}"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "spec": {
|
|
|
+ "containers": [
|
|
|
+ {
|
|
|
+ "name": "${APPLICATION_NAME}",
|
|
|
+ "image": "docker-registry.default.svc:5000/bora/${APPLICATION_NAME}@sha256:dab618bd970fbb3556520f49006a4a0783619de02b0cf73f5aa2ce5012810e88",
|
|
|
+ "ports": [
|
|
|
+ {
|
|
|
+ "containerPort": 8080,
|
|
|
+ "protocol": "TCP"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "env": [
|
|
|
+ {
|
|
|
+ "name": "BORA_ADEI_SERVER",
|
|
|
+ "value": "http://adei-katrin.kaas.kit.edu/adei/"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "BORA_POLLING",
|
|
|
+ "value": "120"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "BORA_PORT",
|
|
|
+ "value": "8080"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "BORA_TITLE",
|
|
|
+ "value": "${APPLICATION_NAME}"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "BORA_ADEI_USERNAME",
|
|
|
+ "value": "katrin"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name": "BORA_ADEI_PASSWORD",
|
|
|
+ "value": "neutrino"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "resources": {},
|
|
|
+ "terminationMessagePath": "/dev/termination-log",
|
|
|
+ "terminationMessagePolicy": "File",
|
|
|
+ "imagePullPolicy": "Always"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "restartPolicy": "Always",
|
|
|
+ "terminationGracePeriodSeconds": 30,
|
|
|
+ "dnsPolicy": "ClusterFirst",
|
|
|
+ "securityContext": {},
|
|
|
+ "schedulerName": "default-scheduler"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "status": {
|
|
|
+ "latestVersion": 0,
|
|
|
+ "observedGeneration": 0,
|
|
|
+ "replicas": 0,
|
|
|
+ "updatedReplicas": 0,
|
|
|
+ "availableReplicas": 0,
|
|
|
+ "unavailableReplicas": 0
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "kind": "BuildConfig",
|
|
|
+ "apiVersion": "v1",
|
|
|
+ "metadata": {
|
|
|
+ "name": "${APPLICATION_NAME}",
|
|
|
+ "creationTimestamp": null,
|
|
|
+ "labels": {
|
|
|
+ "app": "${APPLICATION_NAME}"
|
|
|
+ },
|
|
|
+ "annotations": {
|
|
|
+ "openshift.io/generated-by": "OpenShiftWebConsole"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "spec": {
|
|
|
+ "triggers": [
|
|
|
+ {
|
|
|
+ "type": "ImageChange",
|
|
|
+ "imageChange": {}
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "ConfigChange"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "Generic",
|
|
|
+ "generic": {
|
|
|
+ "secret": "${GENERIC_TRIGGER_SECRET}"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "type": "GitHub",
|
|
|
+ "github": {
|
|
|
+ "secret": "${GITHUB_TRIGGER_SECRET}"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "runPolicy": "Serial",
|
|
|
+ "source": {
|
|
|
+ "type": "Git",
|
|
|
+ "git": {
|
|
|
+ "uri": "${SOURCE_REPOSITORY_URL}",
|
|
|
+ "ref": "master"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "strategy": {
|
|
|
+ "type": "Source",
|
|
|
+ "sourceStrategy": {
|
|
|
+ "from": {
|
|
|
+ "kind": "ImageStreamTag",
|
|
|
+ "namespace": "openshift",
|
|
|
+ "name": "python:2.7"
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "output": {
|
|
|
+ "to": {
|
|
|
+ "kind": "ImageStreamTag",
|
|
|
+ "name": "${APPLICATION_NAME}:latest"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "resources": {},
|
|
|
+ "postCommit": {},
|
|
|
+ "nodeSelector": null
|
|
|
+ },
|
|
|
+ "status": {
|
|
|
+ "lastVersion": 0
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "kind": "ImageStream",
|
|
|
+ "apiVersion": "v1",
|
|
|
+ "metadata": {
|
|
|
+ "name": "${APPLICATION_NAME}",
|
|
|
+ "generation": 1,
|
|
|
+ "creationTimestamp": null,
|
|
|
+ "labels": {
|
|
|
+ "app": "${APPLICATION_NAME}"
|
|
|
+ },
|
|
|
+ "annotations": {
|
|
|
+ "openshift.io/generated-by": "OpenShiftWebConsole"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "spec": {
|
|
|
+ "lookupPolicy": {
|
|
|
+ "local": false
|
|
|
+ },
|
|
|
+ "tags": [
|
|
|
+ {
|
|
|
+ "name": "latest",
|
|
|
+ "annotations": null,
|
|
|
+ "from": {
|
|
|
+ "kind": "DockerImage",
|
|
|
+ "name": "docker-registry.default.svc:5000/bora/${APPLICATION_NAME}:latest"
|
|
|
+ },
|
|
|
+ "generation": null,
|
|
|
+ "importPolicy": {},
|
|
|
+ "referencePolicy": {
|
|
|
+ "type": ""
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ },
|
|
|
+ "status": {
|
|
|
+ "dockerImageRepository": ""
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "kind": "Route",
|
|
|
+ "apiVersion": "v1",
|
|
|
+ "metadata": {
|
|
|
+ "name": "${APPLICATION_NAME}",
|
|
|
+ "creationTimestamp": null,
|
|
|
+ "labels": {
|
|
|
+ "app": "${APPLICATION_NAME}"
|
|
|
+ },
|
|
|
+ "annotations": {
|
|
|
+ "openshift.io/generated-by": "OpenShiftWebConsole",
|
|
|
+ "openshift.io/host.generated": "true"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "spec": {
|
|
|
+ "host": "bora-${APPLICATION_NAME}.kaas.kit.edu",
|
|
|
+ "to": {
|
|
|
+ "kind": "Service",
|
|
|
+ "name": "${APPLICATION_NAME}",
|
|
|
+ "weight": 100
|
|
|
+ },
|
|
|
+ "port": {
|
|
|
+ "targetPort": "8080-tcp"
|
|
|
+ },
|
|
|
+ "wildcardPolicy": "None"
|
|
|
+ },
|
|
|
+ "status": {
|
|
|
+ "ingress": [
|
|
|
+ {
|
|
|
+ "host": "bora-${APPLICATION_NAME}.kaas.kit.edu",
|
|
|
+ "routerName": "router",
|
|
|
+ "conditions": [
|
|
|
+ {
|
|
|
+ "type": "Admitted",
|
|
|
+ "status": "True",
|
|
|
+ "lastTransitionTime": "2018-05-03T09:34:48Z"
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "wildcardPolicy": "None"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "kind": "Service",
|
|
|
+ "apiVersion": "v1",
|
|
|
+ "metadata": {
|
|
|
+ "name": "${APPLICATION_NAME}",
|
|
|
+ "creationTimestamp": null,
|
|
|
+ "labels": {
|
|
|
+ "app": "${APPLICATION_NAME}"
|
|
|
+ },
|
|
|
+ "annotations": {
|
|
|
+ "openshift.io/generated-by": "OpenShiftWebConsole"
|
|
|
+ }
|
|
|
+ },
|
|
|
+ "spec": {
|
|
|
+ "ports": [
|
|
|
+ {
|
|
|
+ "name": "8080-tcp",
|
|
|
+ "protocol": "TCP",
|
|
|
+ "port": 8080,
|
|
|
+ "targetPort": 8080
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ "selector": {
|
|
|
+ "deploymentconfig": "${APPLICATION_NAME}"
|
|
|
+ },
|
|
|
+ "type": "ClusterIP",
|
|
|
+ "sessionAffinity": "None"
|
|
|
+ },
|
|
|
+ "status": {
|
|
|
+ "loadBalancer": {}
|
|
|
+ }
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ "parameters": [
|
|
|
+ {
|
|
|
+ "description": "The title of the BORA application",
|
|
|
+ "name": "APPLICATION_NAME"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "description": "The URL of the repository with your application source code.",
|
|
|
+ "name": "SOURCE_REPOSITORY_URL"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "description": "Github trigger secret",
|
|
|
+ "name": "GITHUB_TRIGGER_SECRET",
|
|
|
+ "from": "[a-zA-Z0-9]{8}",
|
|
|
+ "generate": "expression"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "description": "Generic trigger secret",
|
|
|
+ "name": "GENERIC_TRIGGER_SECRET",
|
|
|
+ "from": "[a-zA-Z0-9]{8}",
|
|
|
+ "generate": "expression"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+}
|