openjdk18-web-basic-s2i.json 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "iconClass": "icon-rh-openjdk",
  7. "tags": "java",
  8. "version": "1.4.14",
  9. "openshift.io/display-name": "OpenJDK 8",
  10. "openshift.io/provider-display-name": "Red Hat, Inc.",
  11. "description": "An example Java application using OpenJDK 8. For more information about using this template, see https://github.com/jboss-openshift/application-templates.",
  12. "template.openshift.io/long-description": "This template defines resources needed to develop Red Hat OpenJDK Java 8 based application.",
  13. "template.openshift.io/documentation-url": "https://access.redhat.com/documentation/en/",
  14. "template.openshift.io/support-url": "https://access.redhat.com"
  15. },
  16. "name": "openjdk18-web-basic-s2i"
  17. },
  18. "labels": {
  19. "template": "openjdk18-web-basic-s2i",
  20. "xpaas": "1.4.14"
  21. },
  22. "message": "A new java application has been created in your project.",
  23. "parameters": [
  24. {
  25. "description": "The name for the application.",
  26. "displayName": "Application Name",
  27. "name": "APPLICATION_NAME",
  28. "value": "openjdk-app",
  29. "required": true
  30. },
  31. {
  32. "description": "Custom hostname for http service route. Leave blank for default hostname, e.g.: <application-name>-<project>.<default-domain-suffix>",
  33. "displayName": "Custom http Route Hostname",
  34. "name": "HOSTNAME_HTTP",
  35. "value": "",
  36. "required": false
  37. },
  38. {
  39. "description": "Git source URI for application",
  40. "displayName": "Git Repository URL",
  41. "name": "SOURCE_REPOSITORY_URL",
  42. "value": "https://github.com/jboss-openshift/openshift-quickstarts",
  43. "required": true
  44. },
  45. {
  46. "description": "Git branch/tag reference",
  47. "displayName": "Git Reference",
  48. "name": "SOURCE_REPOSITORY_REF",
  49. "value": "master",
  50. "required": false
  51. },
  52. {
  53. "description": "Path within Git project to build; empty for root project directory.",
  54. "displayName": "Context Directory",
  55. "name": "CONTEXT_DIR",
  56. "value": "undertow-servlet",
  57. "required": false
  58. },
  59. {
  60. "description": "GitHub trigger secret",
  61. "displayName": "Github Webhook Secret",
  62. "name": "GITHUB_WEBHOOK_SECRET",
  63. "from": "[a-zA-Z0-9]{8}",
  64. "generate": "expression",
  65. "required": true
  66. },
  67. {
  68. "description": "Generic build trigger secret",
  69. "displayName": "Generic Webhook Secret",
  70. "name": "GENERIC_WEBHOOK_SECRET",
  71. "from": "[a-zA-Z0-9]{8}",
  72. "generate": "expression",
  73. "required": true
  74. },
  75. {
  76. "description": "Namespace in which the ImageStreams for Red Hat Middleware images are installed. These ImageStreams are normally installed in the openshift namespace. You should only need to modify this if you've installed the ImageStreams in a different namespace/project.",
  77. "displayName": "ImageStream Namespace",
  78. "name": "IMAGE_STREAM_NAMESPACE",
  79. "value": "openshift",
  80. "required": true
  81. }
  82. ],
  83. "objects": [
  84. {
  85. "kind": "Service",
  86. "apiVersion": "v1",
  87. "spec": {
  88. "ports": [
  89. {
  90. "port": 8080,
  91. "targetPort": 8080
  92. }
  93. ],
  94. "selector": {
  95. "deploymentConfig": "${APPLICATION_NAME}"
  96. }
  97. },
  98. "metadata": {
  99. "name": "${APPLICATION_NAME}",
  100. "labels": {
  101. "application": "${APPLICATION_NAME}"
  102. },
  103. "annotations": {
  104. "description": "The application's http port."
  105. }
  106. }
  107. },
  108. {
  109. "kind": "Route",
  110. "apiVersion": "v1",
  111. "id": "${APPLICATION_NAME}-http",
  112. "metadata": {
  113. "name": "${APPLICATION_NAME}",
  114. "labels": {
  115. "application": "${APPLICATION_NAME}"
  116. },
  117. "annotations": {
  118. "description": "Route for application's http service."
  119. }
  120. },
  121. "spec": {
  122. "host": "${HOSTNAME_HTTP}",
  123. "to": {
  124. "name": "${APPLICATION_NAME}"
  125. }
  126. }
  127. },
  128. {
  129. "kind": "ImageStream",
  130. "apiVersion": "v1",
  131. "metadata": {
  132. "name": "${APPLICATION_NAME}",
  133. "labels": {
  134. "application": "${APPLICATION_NAME}"
  135. }
  136. }
  137. },
  138. {
  139. "kind": "BuildConfig",
  140. "apiVersion": "v1",
  141. "metadata": {
  142. "name": "${APPLICATION_NAME}",
  143. "labels": {
  144. "application": "${APPLICATION_NAME}"
  145. }
  146. },
  147. "spec": {
  148. "source": {
  149. "type": "Git",
  150. "git": {
  151. "uri": "${SOURCE_REPOSITORY_URL}",
  152. "ref": "${SOURCE_REPOSITORY_REF}"
  153. },
  154. "contextDir": "${CONTEXT_DIR}"
  155. },
  156. "strategy": {
  157. "type": "Source",
  158. "sourceStrategy": {
  159. "forcePull": true,
  160. "from": {
  161. "kind": "ImageStreamTag",
  162. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  163. "name": "java:8"
  164. }
  165. }
  166. },
  167. "output": {
  168. "to": {
  169. "kind": "ImageStreamTag",
  170. "name": "${APPLICATION_NAME}:latest"
  171. }
  172. },
  173. "triggers": [
  174. {
  175. "type": "GitHub",
  176. "github": {
  177. "secret": "${GITHUB_WEBHOOK_SECRET}"
  178. }
  179. },
  180. {
  181. "type": "Generic",
  182. "generic": {
  183. "secret": "${GENERIC_WEBHOOK_SECRET}"
  184. }
  185. },
  186. {
  187. "type": "ImageChange",
  188. "imageChange": {}
  189. },
  190. {
  191. "type": "ConfigChange"
  192. }
  193. ]
  194. }
  195. },
  196. {
  197. "kind": "DeploymentConfig",
  198. "apiVersion": "v1",
  199. "metadata": {
  200. "name": "${APPLICATION_NAME}",
  201. "labels": {
  202. "application": "${APPLICATION_NAME}"
  203. }
  204. },
  205. "spec": {
  206. "strategy": {
  207. "type": "Recreate"
  208. },
  209. "triggers": [
  210. {
  211. "type": "ImageChange",
  212. "imageChangeParams": {
  213. "automatic": true,
  214. "containerNames": [
  215. "${APPLICATION_NAME}"
  216. ],
  217. "from": {
  218. "kind": "ImageStreamTag",
  219. "name": "${APPLICATION_NAME}:latest"
  220. }
  221. }
  222. },
  223. {
  224. "type": "ConfigChange"
  225. }
  226. ],
  227. "replicas": 1,
  228. "selector": {
  229. "deploymentConfig": "${APPLICATION_NAME}"
  230. },
  231. "template": {
  232. "metadata": {
  233. "name": "${APPLICATION_NAME}",
  234. "labels": {
  235. "deploymentConfig": "${APPLICATION_NAME}",
  236. "application": "${APPLICATION_NAME}"
  237. }
  238. },
  239. "spec": {
  240. "terminationGracePeriodSeconds": 75,
  241. "containers": [
  242. {
  243. "name": "${APPLICATION_NAME}",
  244. "image": "${APPLICATION_NAME}",
  245. "imagePullPolicy": "Always",
  246. "env": [
  247. ],
  248. "ports": [
  249. {
  250. "name": "jolokia",
  251. "containerPort": 8778,
  252. "protocol": "TCP"
  253. },
  254. {
  255. "name": "http",
  256. "containerPort": 8080,
  257. "protocol": "TCP"
  258. },
  259. {
  260. "name": "https",
  261. "containerPort": 8443,
  262. "protocol": "TCP"
  263. }
  264. ]
  265. }
  266. ]
  267. }
  268. }
  269. }
  270. }
  271. ]
  272. }