bora.json 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "name": "bora_template",
  6. "creationTimestamp": null
  7. },
  8. "objects": [
  9. {
  10. "kind": "DeploymentConfig",
  11. "apiVersion": "v1",
  12. "metadata": {
  13. "name": "${APPLICATION_NAME}",
  14. "generation": 1,
  15. "creationTimestamp": null,
  16. "labels": {
  17. "app": "${APPLICATION_NAME}"
  18. },
  19. "annotations": {
  20. "openshift.io/generated-by": "OpenShiftWebConsole"
  21. }
  22. },
  23. "spec": {
  24. "strategy": {
  25. "type": "Rolling",
  26. "rollingParams": {
  27. "updatePeriodSeconds": 1,
  28. "intervalSeconds": 1,
  29. "timeoutSeconds": 600,
  30. "maxUnavailable": "25%",
  31. "maxSurge": "25%"
  32. },
  33. "resources": {},
  34. "activeDeadlineSeconds": 21600
  35. },
  36. "triggers": [
  37. {
  38. "type": "ImageChange",
  39. "imageChangeParams": {
  40. "automatic": true,
  41. "containerNames": [
  42. "${APPLICATION_NAME}"
  43. ],
  44. "from": {
  45. "kind": "ImageStreamTag",
  46. "namespace": "bora",
  47. "name": "${APPLICATION_NAME}:latest"
  48. }
  49. }
  50. },
  51. {
  52. "type": "ConfigChange"
  53. }
  54. ],
  55. "replicas": 1,
  56. "test": false,
  57. "selector": {
  58. "deploymentconfig": "${APPLICATION_NAME}"
  59. },
  60. "template": {
  61. "metadata": {
  62. "creationTimestamp": null,
  63. "labels": {
  64. "app": "${APPLICATION_NAME}",
  65. "deploymentconfig": "${APPLICATION_NAME}"
  66. }
  67. },
  68. "spec": {
  69. "containers": [
  70. {
  71. "name": "${APPLICATION_NAME}",
  72. "image": "docker-registry.default.svc:5000/bora/${APPLICATION_NAME}@sha256:dab618bd970fbb3556520f49006a4a0783619de02b0cf73f5aa2ce5012810e88",
  73. "ports": [
  74. {
  75. "containerPort": 8080,
  76. "protocol": "TCP"
  77. }
  78. ],
  79. "env": [
  80. {
  81. "name": "BORA_ADEI_SERVER",
  82. "value": "http://adei-katrin.kaas.kit.edu/adei/"
  83. },
  84. {
  85. "name": "BORA_POLLING",
  86. "value": "120"
  87. },
  88. {
  89. "name": "BORA_PORT",
  90. "value": "8080"
  91. },
  92. {
  93. "name": "BORA_TITLE",
  94. "value": "${APPLICATION_NAME}"
  95. },
  96. {
  97. "name": "BORA_ADEI_USERNAME",
  98. "value": "katrin"
  99. },
  100. {
  101. "name": "BORA_ADEI_PASSWORD",
  102. "value": "neutrino"
  103. }
  104. ],
  105. "resources": {},
  106. "terminationMessagePath": "/dev/termination-log",
  107. "terminationMessagePolicy": "File",
  108. "imagePullPolicy": "Always"
  109. }
  110. ],
  111. "restartPolicy": "Always",
  112. "terminationGracePeriodSeconds": 30,
  113. "dnsPolicy": "ClusterFirst",
  114. "securityContext": {},
  115. "schedulerName": "default-scheduler"
  116. }
  117. }
  118. },
  119. "status": {
  120. "latestVersion": 0,
  121. "observedGeneration": 0,
  122. "replicas": 0,
  123. "updatedReplicas": 0,
  124. "availableReplicas": 0,
  125. "unavailableReplicas": 0
  126. }
  127. },
  128. {
  129. "kind": "BuildConfig",
  130. "apiVersion": "v1",
  131. "metadata": {
  132. "name": "${APPLICATION_NAME}",
  133. "creationTimestamp": null,
  134. "labels": {
  135. "app": "${APPLICATION_NAME}"
  136. },
  137. "annotations": {
  138. "openshift.io/generated-by": "OpenShiftWebConsole"
  139. }
  140. },
  141. "spec": {
  142. "triggers": [
  143. {
  144. "type": "ImageChange",
  145. "imageChange": {}
  146. },
  147. {
  148. "type": "ConfigChange"
  149. },
  150. {
  151. "type": "Generic",
  152. "generic": {
  153. "secret": "${GENERIC_TRIGGER_SECRET}"
  154. }
  155. },
  156. {
  157. "type": "GitHub",
  158. "github": {
  159. "secret": "${GITHUB_TRIGGER_SECRET}"
  160. }
  161. }
  162. ],
  163. "runPolicy": "Serial",
  164. "source": {
  165. "type": "Git",
  166. "git": {
  167. "uri": "${SOURCE_REPOSITORY_URL}",
  168. "ref": "master"
  169. }
  170. },
  171. "strategy": {
  172. "type": "Source",
  173. "sourceStrategy": {
  174. "from": {
  175. "kind": "ImageStreamTag",
  176. "namespace": "openshift",
  177. "name": "python:2.7"
  178. }
  179. }
  180. },
  181. "output": {
  182. "to": {
  183. "kind": "ImageStreamTag",
  184. "name": "${APPLICATION_NAME}:latest"
  185. }
  186. },
  187. "resources": {},
  188. "postCommit": {},
  189. "nodeSelector": null
  190. },
  191. "status": {
  192. "lastVersion": 0
  193. }
  194. },
  195. {
  196. "kind": "ImageStream",
  197. "apiVersion": "v1",
  198. "metadata": {
  199. "name": "${APPLICATION_NAME}",
  200. "generation": 1,
  201. "creationTimestamp": null,
  202. "labels": {
  203. "app": "${APPLICATION_NAME}"
  204. },
  205. "annotations": {
  206. "openshift.io/generated-by": "OpenShiftWebConsole"
  207. }
  208. },
  209. "spec": {
  210. "lookupPolicy": {
  211. "local": false
  212. },
  213. "tags": [
  214. {
  215. "name": "latest",
  216. "annotations": null,
  217. "from": {
  218. "kind": "DockerImage",
  219. "name": "docker-registry.default.svc:5000/bora/${APPLICATION_NAME}:latest"
  220. },
  221. "generation": null,
  222. "importPolicy": {},
  223. "referencePolicy": {
  224. "type": ""
  225. }
  226. }
  227. ]
  228. },
  229. "status": {
  230. "dockerImageRepository": ""
  231. }
  232. },
  233. {
  234. "kind": "Route",
  235. "apiVersion": "v1",
  236. "metadata": {
  237. "name": "${APPLICATION_NAME}",
  238. "creationTimestamp": null,
  239. "labels": {
  240. "app": "${APPLICATION_NAME}"
  241. },
  242. "annotations": {
  243. "openshift.io/generated-by": "OpenShiftWebConsole",
  244. "openshift.io/host.generated": "true"
  245. }
  246. },
  247. "spec": {
  248. "host": "bora-${APPLICATION_NAME}.kaas.kit.edu",
  249. "to": {
  250. "kind": "Service",
  251. "name": "${APPLICATION_NAME}",
  252. "weight": 100
  253. },
  254. "port": {
  255. "targetPort": "8080-tcp"
  256. },
  257. "wildcardPolicy": "None"
  258. },
  259. "status": {
  260. "ingress": [
  261. {
  262. "host": "bora-${APPLICATION_NAME}.kaas.kit.edu",
  263. "routerName": "router",
  264. "conditions": [
  265. {
  266. "type": "Admitted",
  267. "status": "True",
  268. "lastTransitionTime": "2018-05-03T09:34:48Z"
  269. }
  270. ],
  271. "wildcardPolicy": "None"
  272. }
  273. ]
  274. }
  275. },
  276. {
  277. "kind": "Service",
  278. "apiVersion": "v1",
  279. "metadata": {
  280. "name": "${APPLICATION_NAME}",
  281. "creationTimestamp": null,
  282. "labels": {
  283. "app": "${APPLICATION_NAME}"
  284. },
  285. "annotations": {
  286. "openshift.io/generated-by": "OpenShiftWebConsole"
  287. }
  288. },
  289. "spec": {
  290. "ports": [
  291. {
  292. "name": "8080-tcp",
  293. "protocol": "TCP",
  294. "port": 8080,
  295. "targetPort": 8080
  296. }
  297. ],
  298. "selector": {
  299. "deploymentconfig": "${APPLICATION_NAME}"
  300. },
  301. "type": "ClusterIP",
  302. "sessionAffinity": "None"
  303. },
  304. "status": {
  305. "loadBalancer": {}
  306. }
  307. },
  308. ],
  309. "parameters": [
  310. {
  311. "description": "The title of the BORA application",
  312. "name": "APPLICATION_NAME"
  313. },
  314. {
  315. "description": "The URL of the repository with your application source code.",
  316. "name": "SOURCE_REPOSITORY_URL"
  317. },
  318. {
  319. "description": "Github trigger secret",
  320. "name": "GITHUB_TRIGGER_SECRET",
  321. "from": "[a-zA-Z0-9]{8}",
  322. "generate": "expression"
  323. },
  324. {
  325. "description": "Generic trigger secret",
  326. "name": "GENERIC_TRIGGER_SECRET",
  327. "from": "[a-zA-Z0-9]{8}",
  328. "generate": "expression"
  329. }
  330. ]
  331. }