eap64-basic-s2i.json 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "iconClass": "icon-jboss",
  7. "description": "Application template for EAP 6 applications built using S2I.",
  8. "tags": "eap,javaee,java,jboss,xpaas",
  9. "version": "1.4.0",
  10. "openshift.io/display-name": "Red Hat JBoss EAP 6.4 (no https)"
  11. },
  12. "name": "eap64-basic-s2i"
  13. },
  14. "labels": {
  15. "template": "eap64-basic-s2i",
  16. "xpaas": "1.4.0"
  17. },
  18. "message": "A new EAP 6 based application has been created in your project.",
  19. "parameters": [
  20. {
  21. "displayName": "Application Name",
  22. "description": "The name for the application.",
  23. "name": "APPLICATION_NAME",
  24. "value": "eap-app",
  25. "required": true
  26. },
  27. {
  28. "displayName": "Custom http Route Hostname",
  29. "description": "Custom hostname for http service route. Leave blank for default hostname, e.g.: <application-name>-<project>.<default-domain-suffix>",
  30. "name": "HOSTNAME_HTTP",
  31. "value": "",
  32. "required": false
  33. },
  34. {
  35. "displayName": "Git Repository URL",
  36. "description": "Git source URI for application",
  37. "name": "SOURCE_REPOSITORY_URL",
  38. "value": "https://github.com/jboss-developer/jboss-eap-quickstarts",
  39. "required": true
  40. },
  41. {
  42. "displayName": "Git Reference",
  43. "description": "Git branch/tag reference",
  44. "name": "SOURCE_REPOSITORY_REF",
  45. "value": "6.4.x",
  46. "required": false
  47. },
  48. {
  49. "displayName": "Context Directory",
  50. "description": "Path within Git project to build; empty for root project directory.",
  51. "name": "CONTEXT_DIR",
  52. "value": "kitchensink",
  53. "required": false
  54. },
  55. {
  56. "displayName": "Queues",
  57. "description": "Queue names",
  58. "name": "HORNETQ_QUEUES",
  59. "value": "",
  60. "required": false
  61. },
  62. {
  63. "displayName": "Topics",
  64. "description": "Topic names",
  65. "name": "HORNETQ_TOPICS",
  66. "value": "",
  67. "required": false
  68. },
  69. {
  70. "displayName": "HornetQ Password",
  71. "description": "HornetQ cluster admin password",
  72. "name": "HORNETQ_CLUSTER_PASSWORD",
  73. "from": "[a-zA-Z0-9]{8}",
  74. "generate": "expression",
  75. "required": true
  76. },
  77. {
  78. "displayName": "Github Webhook Secret",
  79. "description": "GitHub trigger secret",
  80. "name": "GITHUB_WEBHOOK_SECRET",
  81. "from": "[a-zA-Z0-9]{8}",
  82. "generate": "expression",
  83. "required": true
  84. },
  85. {
  86. "displayName": "Generic Webhook Secret",
  87. "description": "Generic build trigger secret",
  88. "name": "GENERIC_WEBHOOK_SECRET",
  89. "from": "[a-zA-Z0-9]{8}",
  90. "generate": "expression",
  91. "required": true
  92. },
  93. {
  94. "displayName": "ImageStream Namespace",
  95. "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.",
  96. "name": "IMAGE_STREAM_NAMESPACE",
  97. "value": "openshift",
  98. "required": true
  99. },
  100. {
  101. "displayName": "JGroups Cluster Password",
  102. "description": "JGroups cluster password",
  103. "name": "JGROUPS_CLUSTER_PASSWORD",
  104. "from": "[a-zA-Z0-9]{8}",
  105. "generate": "expression",
  106. "required": true
  107. },
  108. {
  109. "displayName": "Deploy Exploded Archives",
  110. "description": "Controls whether exploded deployment content should be automatically deployed",
  111. "name": "AUTO_DEPLOY_EXPLODED",
  112. "value": "false",
  113. "required": false
  114. },
  115. {
  116. "displayName": "Maven mirror URL",
  117. "description": "Maven mirror to use for S2I builds",
  118. "name": "MAVEN_MIRROR_URL",
  119. "value": "",
  120. "required": false
  121. },
  122. {
  123. "description": "List of directories from which archives will be copied into the deployment folder. If unspecified, all archives in /target will be copied.",
  124. "name": "ARTIFACT_DIR",
  125. "value": "",
  126. "required": false
  127. }
  128. ],
  129. "objects": [
  130. {
  131. "kind": "Service",
  132. "apiVersion": "v1",
  133. "spec": {
  134. "ports": [
  135. {
  136. "port": 8080,
  137. "targetPort": 8080
  138. }
  139. ],
  140. "selector": {
  141. "deploymentConfig": "${APPLICATION_NAME}"
  142. }
  143. },
  144. "metadata": {
  145. "name": "${APPLICATION_NAME}",
  146. "labels": {
  147. "application": "${APPLICATION_NAME}"
  148. },
  149. "annotations": {
  150. "description": "The web server's http port."
  151. }
  152. }
  153. },
  154. {
  155. "kind": "Route",
  156. "apiVersion": "v1",
  157. "id": "${APPLICATION_NAME}-http",
  158. "metadata": {
  159. "name": "${APPLICATION_NAME}",
  160. "labels": {
  161. "application": "${APPLICATION_NAME}"
  162. },
  163. "annotations": {
  164. "description": "Route for application's http service."
  165. }
  166. },
  167. "spec": {
  168. "host": "${HOSTNAME_HTTP}",
  169. "to": {
  170. "name": "${APPLICATION_NAME}"
  171. }
  172. }
  173. },
  174. {
  175. "kind": "ImageStream",
  176. "apiVersion": "v1",
  177. "metadata": {
  178. "name": "${APPLICATION_NAME}",
  179. "labels": {
  180. "application": "${APPLICATION_NAME}"
  181. }
  182. }
  183. },
  184. {
  185. "kind": "BuildConfig",
  186. "apiVersion": "v1",
  187. "metadata": {
  188. "name": "${APPLICATION_NAME}",
  189. "labels": {
  190. "application": "${APPLICATION_NAME}"
  191. }
  192. },
  193. "spec": {
  194. "source": {
  195. "type": "Git",
  196. "git": {
  197. "uri": "${SOURCE_REPOSITORY_URL}",
  198. "ref": "${SOURCE_REPOSITORY_REF}"
  199. },
  200. "contextDir": "${CONTEXT_DIR}"
  201. },
  202. "strategy": {
  203. "type": "Source",
  204. "sourceStrategy": {
  205. "env": [
  206. {
  207. "name": "MAVEN_MIRROR_URL",
  208. "value": "${MAVEN_MIRROR_URL}"
  209. },
  210. {
  211. "name": "ARTIFACT_DIR",
  212. "value": "${ARTIFACT_DIR}"
  213. }
  214. ],
  215. "forcePull": true,
  216. "from": {
  217. "kind": "ImageStreamTag",
  218. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  219. "name": "jboss-eap64-openshift:1.5"
  220. }
  221. }
  222. },
  223. "output": {
  224. "to": {
  225. "kind": "ImageStreamTag",
  226. "name": "${APPLICATION_NAME}:latest"
  227. }
  228. },
  229. "triggers": [
  230. {
  231. "type": "GitHub",
  232. "github": {
  233. "secret": "${GITHUB_WEBHOOK_SECRET}"
  234. }
  235. },
  236. {
  237. "type": "Generic",
  238. "generic": {
  239. "secret": "${GENERIC_WEBHOOK_SECRET}"
  240. }
  241. },
  242. {
  243. "type": "ImageChange",
  244. "imageChange": {}
  245. },
  246. {
  247. "type": "ConfigChange"
  248. }
  249. ]
  250. }
  251. },
  252. {
  253. "kind": "DeploymentConfig",
  254. "apiVersion": "v1",
  255. "metadata": {
  256. "name": "${APPLICATION_NAME}",
  257. "labels": {
  258. "application": "${APPLICATION_NAME}"
  259. }
  260. },
  261. "spec": {
  262. "strategy": {
  263. "type": "Recreate"
  264. },
  265. "triggers": [
  266. {
  267. "type": "ImageChange",
  268. "imageChangeParams": {
  269. "automatic": true,
  270. "containerNames": [
  271. "${APPLICATION_NAME}"
  272. ],
  273. "from": {
  274. "kind": "ImageStreamTag",
  275. "name": "${APPLICATION_NAME}:latest"
  276. }
  277. }
  278. },
  279. {
  280. "type": "ConfigChange"
  281. }
  282. ],
  283. "replicas": 1,
  284. "selector": {
  285. "deploymentConfig": "${APPLICATION_NAME}"
  286. },
  287. "template": {
  288. "metadata": {
  289. "name": "${APPLICATION_NAME}",
  290. "labels": {
  291. "deploymentConfig": "${APPLICATION_NAME}",
  292. "application": "${APPLICATION_NAME}"
  293. }
  294. },
  295. "spec": {
  296. "terminationGracePeriodSeconds": 60,
  297. "containers": [
  298. {
  299. "name": "${APPLICATION_NAME}",
  300. "image": "${APPLICATION_NAME}",
  301. "imagePullPolicy": "Always",
  302. "livenessProbe": {
  303. "exec": {
  304. "command": [
  305. "/bin/bash",
  306. "-c",
  307. "/opt/eap/bin/livenessProbe.sh"
  308. ]
  309. }
  310. },
  311. "readinessProbe": {
  312. "exec": {
  313. "command": [
  314. "/bin/bash",
  315. "-c",
  316. "/opt/eap/bin/readinessProbe.sh"
  317. ]
  318. }
  319. },
  320. "ports": [
  321. {
  322. "name": "jolokia",
  323. "containerPort": 8778,
  324. "protocol": "TCP"
  325. },
  326. {
  327. "name": "http",
  328. "containerPort": 8080,
  329. "protocol": "TCP"
  330. },
  331. {
  332. "name": "ping",
  333. "containerPort": 8888,
  334. "protocol": "TCP"
  335. }
  336. ],
  337. "env": [
  338. {
  339. "name": "OPENSHIFT_KUBE_PING_LABELS",
  340. "value": "application=${APPLICATION_NAME}"
  341. },
  342. {
  343. "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
  344. "valueFrom": {
  345. "fieldRef": {
  346. "fieldPath": "metadata.namespace"
  347. }
  348. }
  349. },
  350. {
  351. "name": "HORNETQ_CLUSTER_PASSWORD",
  352. "value": "${HORNETQ_CLUSTER_PASSWORD}"
  353. },
  354. {
  355. "name": "HORNETQ_QUEUES",
  356. "value": "${HORNETQ_QUEUES}"
  357. },
  358. {
  359. "name": "HORNETQ_TOPICS",
  360. "value": "${HORNETQ_TOPICS}"
  361. },
  362. {
  363. "name": "JGROUPS_CLUSTER_PASSWORD",
  364. "value": "${JGROUPS_CLUSTER_PASSWORD}"
  365. },
  366. {
  367. "name": "AUTO_DEPLOY_EXPLODED",
  368. "value": "${AUTO_DEPLOY_EXPLODED}"
  369. }
  370. ]
  371. }
  372. ]
  373. }
  374. }
  375. }
  376. }
  377. ]
  378. }