eap6-https-sti.json 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408
  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 STI."
  8. },
  9. "name": "eap6-basic-sti"
  10. },
  11. "labels": {
  12. "template": "eap6-basic-sti"
  13. },
  14. "parameters": [
  15. {
  16. "description": "EAP Release version, e.g. 6.4, etc.",
  17. "name": "EAP_RELEASE",
  18. "value": "6.4"
  19. },
  20. {
  21. "description": "The name for the application.",
  22. "name": "APPLICATION_NAME",
  23. "value": "eap-app"
  24. },
  25. {
  26. "description": "Custom hostname for service routes. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
  27. "name": "APPLICATION_HOSTNAME",
  28. "value": ""
  29. },
  30. {
  31. "description": "Git source URI for application",
  32. "name": "GIT_URI",
  33. "value": "https://github.com/jboss-developer/jboss-eap-quickstarts"
  34. },
  35. {
  36. "description": "Git branch/tag reference",
  37. "name": "GIT_REF",
  38. "value": "6.4.x"
  39. },
  40. {
  41. "description": "Path within Git project to build; empty for root project directory.",
  42. "name": "GIT_CONTEXT_DIR",
  43. "value": "kitchensink"
  44. },
  45. {
  46. "description": "Queue names",
  47. "name": "HORNETQ_QUEUES",
  48. "value": ""
  49. },
  50. {
  51. "description": "Topic names",
  52. "name": "HORNETQ_TOPICS",
  53. "value": ""
  54. },
  55. {
  56. "description": "The name of the secret containing the keystore file",
  57. "name": "EAP_HTTPS_SECRET",
  58. "value": "eap-app-secret"
  59. },
  60. {
  61. "description": "The name of the keystore file within the secret",
  62. "name": "EAP_HTTPS_KEYSTORE",
  63. "value": "keystore.jks"
  64. },
  65. {
  66. "description": "The name associated with the server certificate",
  67. "name": "EAP_HTTPS_NAME",
  68. "value": ""
  69. },
  70. {
  71. "description": "The password for the keystore and certificate",
  72. "name": "EAP_HTTPS_PASSWORD",
  73. "value": ""
  74. },
  75. {
  76. "description": "HornetQ cluster admin password",
  77. "name": "HORNETQ_CLUSTER_PASSWORD",
  78. "from": "[a-zA-Z0-9]{8}",
  79. "generate": "expression"
  80. },
  81. {
  82. "description": "Github trigger secret",
  83. "name": "GITHUB_TRIGGER_SECRET",
  84. "from": "[a-zA-Z0-9]{8}",
  85. "generate": "expression"
  86. },
  87. {
  88. "description": "Generic build trigger secret",
  89. "name": "GENERIC_TRIGGER_SECRET",
  90. "from": "[a-zA-Z0-9]{8}",
  91. "generate": "expression"
  92. }
  93. ],
  94. "objects": [
  95. {
  96. "kind": "Service",
  97. "apiVersion": "v1",
  98. "spec": {
  99. "ports": [
  100. {
  101. "port": 8080,
  102. "targetPort": 8080
  103. }
  104. ],
  105. "selector": {
  106. "deploymentConfig": "${APPLICATION_NAME}"
  107. }
  108. },
  109. "metadata": {
  110. "name": "${APPLICATION_NAME}",
  111. "labels": {
  112. "application": "${APPLICATION_NAME}"
  113. },
  114. "annotations": {
  115. "description": "The web server's http port."
  116. }
  117. }
  118. },
  119. {
  120. "kind": "Service",
  121. "apiVersion": "v1",
  122. "spec": {
  123. "ports": [
  124. {
  125. "port": 8443,
  126. "targetPort": 8443
  127. }
  128. ],
  129. "selector": {
  130. "deploymentConfig": "${APPLICATION_NAME}"
  131. }
  132. },
  133. "metadata": {
  134. "name": "secure-${APPLICATION_NAME}",
  135. "labels": {
  136. "application": "${APPLICATION_NAME}"
  137. },
  138. "annotations": {
  139. "description": "The web server's https port."
  140. }
  141. }
  142. },
  143. {
  144. "kind": "Service",
  145. "apiVersion": "v1",
  146. "spec": {
  147. "ports": [
  148. {
  149. "port": 8888,
  150. "targetPort": 8888
  151. }
  152. ],
  153. "portalIP": "None",
  154. "selector": {
  155. "deploymentConfig": "${APPLICATION_NAME}"
  156. }
  157. },
  158. "metadata": {
  159. "name": "${APPLICATION_NAME}-ping",
  160. "labels": {
  161. "application": "${APPLICATION_NAME}"
  162. },
  163. "annotations": {
  164. "description": "Ping service for clustered applications."
  165. }
  166. }
  167. },
  168. {
  169. "kind": "Route",
  170. "apiVersion": "v1",
  171. "id": "${APPLICATION_NAME}-http-route",
  172. "metadata": {
  173. "name": "${APPLICATION_NAME}-http-route",
  174. "labels": {
  175. "application": "${APPLICATION_NAME}"
  176. },
  177. "annotations": {
  178. "description": "Route for application's http service."
  179. }
  180. },
  181. "spec": {
  182. "host": "${APPLICATION_HOSTNAME}",
  183. "to": {
  184. "name": "${APPLICATION_NAME}"
  185. }
  186. }
  187. },
  188. {
  189. "kind": "Route",
  190. "apiVersion": "v1",
  191. "id": "${APPLICATION_NAME}-https-route",
  192. "metadata": {
  193. "name": "${APPLICATION_NAME}-https-route",
  194. "labels": {
  195. "application": "${APPLICATION_NAME}"
  196. },
  197. "annotations": {
  198. "description": "Route for application's https service."
  199. }
  200. },
  201. "spec": {
  202. "host": "${APPLICATION_HOSTNAME}",
  203. "to": {
  204. "name": "secure-${APPLICATION_NAME}"
  205. },
  206. "tls": {
  207. "termination" : "passthrough"
  208. }
  209. }
  210. },
  211. {
  212. "kind": "ImageStream",
  213. "apiVersion": "v1",
  214. "metadata": {
  215. "name": "${APPLICATION_NAME}",
  216. "labels": {
  217. "application": "${APPLICATION_NAME}"
  218. }
  219. }
  220. },
  221. {
  222. "kind": "BuildConfig",
  223. "apiVersion": "v1",
  224. "metadata": {
  225. "name": "${APPLICATION_NAME}",
  226. "labels": {
  227. "application": "${APPLICATION_NAME}"
  228. }
  229. },
  230. "spec": {
  231. "source": {
  232. "type": "Git",
  233. "git": {
  234. "uri": "${GIT_URI}",
  235. "ref": "${GIT_REF}"
  236. },
  237. "contextDir":"${GIT_CONTEXT_DIR}"
  238. },
  239. "strategy": {
  240. "type": "Source",
  241. "sourceStrategy": {
  242. "from": {
  243. "kind": "ImageStreamTag",
  244. "namespace": "openshift",
  245. "name": "jboss-eap6-openshift:${EAP_RELEASE}"
  246. }
  247. }
  248. },
  249. "output": {
  250. "to": {
  251. "kind": "ImageStreamTag",
  252. "name": "${APPLICATION_NAME}:latest"
  253. }
  254. },
  255. "triggers": [
  256. {
  257. "type": "GitHub",
  258. "github": {
  259. "secret": "${GITHUB_TRIGGER_SECRET}"
  260. }
  261. },
  262. {
  263. "type": "Generic",
  264. "generic": {
  265. "secret": "${GENERIC_TRIGGER_SECRET}"
  266. }
  267. },
  268. {
  269. "type": "ImageChange",
  270. "imageChange": {}
  271. }
  272. ]
  273. }
  274. },
  275. {
  276. "kind": "DeploymentConfig",
  277. "apiVersion": "v1",
  278. "metadata": {
  279. "name": "${APPLICATION_NAME}",
  280. "labels": {
  281. "application": "${APPLICATION_NAME}"
  282. }
  283. },
  284. "spec": {
  285. "strategy": {
  286. "type": "Recreate"
  287. },
  288. "triggers": [
  289. {
  290. "type": "ImageChange",
  291. "imageChangeParams": {
  292. "automatic": true,
  293. "containerNames": [
  294. "${APPLICATION_NAME}"
  295. ],
  296. "from": {
  297. "kind": "ImageStream",
  298. "name": "${APPLICATION_NAME}"
  299. }
  300. }
  301. }
  302. ],
  303. "replicas": 1,
  304. "selector": {
  305. "deploymentConfig": "${APPLICATION_NAME}"
  306. },
  307. "template": {
  308. "metadata": {
  309. "name": "${APPLICATION_NAME}",
  310. "labels": {
  311. "deploymentConfig": "${APPLICATION_NAME}",
  312. "application": "${APPLICATION_NAME}"
  313. }
  314. },
  315. "spec": {
  316. "serviceAccount": "eap-service-account",
  317. "containers": [
  318. {
  319. "name": "${APPLICATION_NAME}",
  320. "image": "${APPLICATION_NAME}",
  321. "imagePullPolicy": "Always",
  322. "volumeMounts": [
  323. {
  324. "name": "eap-keystore-volume",
  325. "mountPath": "/etc/eap-secret-volume",
  326. "readOnly": true
  327. }
  328. ],
  329. "readinessProbe": {
  330. "exec": {
  331. "command": [
  332. "/bin/bash",
  333. "-c",
  334. "/opt/eap/bin/readinessProbe.sh"
  335. ]
  336. }
  337. },
  338. "ports": [
  339. {
  340. "name": "http",
  341. "containerPort": 8080,
  342. "protocol": "TCP"
  343. },
  344. {
  345. "name": "https",
  346. "containerPort": 8443,
  347. "protocol": "TCP"
  348. },
  349. {
  350. "name": "ping",
  351. "containerPort": 8888,
  352. "protocol": "TCP"
  353. }
  354. ],
  355. "env": [
  356. {
  357. "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
  358. "value": "${APPLICATION_NAME}-ping"
  359. },
  360. {
  361. "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
  362. "value": "8888"
  363. },
  364. {
  365. "name": "EAP_HTTPS_KEYSTORE_DIR",
  366. "value": "/etc/eap-secret-volume"
  367. },
  368. {
  369. "name": "EAP_HTTPS_KEYSTORE",
  370. "value": "${EAP_HTTPS_KEYSTORE}"
  371. },
  372. {
  373. "name": "EAP_HTTPS_NAME",
  374. "value": "${EAP_HTTPS_NAME}"
  375. },
  376. {
  377. "name": "EAP_HTTPS_PASSWORD",
  378. "value": "${EAP_HTTPS_PASSWORD}"
  379. },
  380. {
  381. "name": "HORNETQ_CLUSTER_PASSWORD",
  382. "value": "${HORNETQ_CLUSTER_PASSWORD}"
  383. },
  384. {
  385. "name": "HORNETQ_QUEUES",
  386. "value": "${HORNETQ_QUEUES}"
  387. },
  388. {
  389. "name": "HORNETQ_TOPICS",
  390. "value": "${HORNETQ_TOPICS}"
  391. }
  392. ]
  393. }
  394. ],
  395. "volumes": [
  396. {
  397. "name": "eap-keystore-volume",
  398. "secret": {
  399. "secretName": "${EAP_HTTPS_SECRET}"
  400. }
  401. }
  402. ]
  403. }
  404. }
  405. }
  406. }
  407. ]
  408. }