eap70-https-s2i.json 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "iconClass": "icon-jboss",
  7. "description": "Application template for EAP 7 applications built using S2I.",
  8. "tags": "eap,javaee,java,jboss,xpaas",
  9. "version": "1.3.1"
  10. },
  11. "name": "eap70-https-s2i"
  12. },
  13. "labels": {
  14. "template": "eap70-https-s2i",
  15. "xpaas": "1.3.1"
  16. },
  17. "parameters": [
  18. {
  19. "description": "The name for the application.",
  20. "name": "APPLICATION_NAME",
  21. "value": "eap-app",
  22. "required": true
  23. },
  24. {
  25. "description": "Custom hostname for http service route. Leave blank for default hostname, e.g.: <application-name>-<project>.<default-domain-suffix>",
  26. "name": "HOSTNAME_HTTP",
  27. "value": "",
  28. "required": false
  29. },
  30. {
  31. "description": "Custom hostname for https service route. Leave blank for default hostname, e.g.: secure-<application-name>-<project>.<default-domain-suffix>",
  32. "name": "HOSTNAME_HTTPS",
  33. "value": "",
  34. "required": false
  35. },
  36. {
  37. "description": "Git source URI for application",
  38. "name": "SOURCE_REPOSITORY_URL",
  39. "value": "https://github.com/jboss-developer/jboss-eap-quickstarts",
  40. "required": true
  41. },
  42. {
  43. "description": "Git branch/tag reference",
  44. "name": "SOURCE_REPOSITORY_REF",
  45. "value": "7.0.0.GA",
  46. "required": false
  47. },
  48. {
  49. "description": "Path within Git project to build; empty for root project directory.",
  50. "name": "CONTEXT_DIR",
  51. "value": "kitchensink",
  52. "required": false
  53. },
  54. {
  55. "description": "Queue names",
  56. "name": "MQ_QUEUES",
  57. "value": "",
  58. "required": false
  59. },
  60. {
  61. "description": "Topic names",
  62. "name": "MQ_TOPICS",
  63. "value": "",
  64. "required": false
  65. },
  66. {
  67. "description": "The name of the secret containing the keystore file",
  68. "name": "HTTPS_SECRET",
  69. "value": "eap7-app-secret",
  70. "required": true
  71. },
  72. {
  73. "description": "The name of the keystore file within the secret",
  74. "name": "HTTPS_KEYSTORE",
  75. "value": "keystore.jks",
  76. "required": false
  77. },
  78. {
  79. "description": "The name associated with the server certificate",
  80. "name": "HTTPS_NAME",
  81. "value": "",
  82. "required": false
  83. },
  84. {
  85. "description": "The password for the keystore and certificate",
  86. "name": "HTTPS_PASSWORD",
  87. "value": "",
  88. "required": false
  89. },
  90. {
  91. "description": "A-MQ cluster admin password",
  92. "name": "MQ_CLUSTER_PASSWORD",
  93. "from": "[a-zA-Z0-9]{8}",
  94. "generate": "expression",
  95. "required": true
  96. },
  97. {
  98. "description": "GitHub trigger secret",
  99. "name": "GITHUB_WEBHOOK_SECRET",
  100. "from": "[a-zA-Z0-9]{8}",
  101. "generate": "expression",
  102. "required": true
  103. },
  104. {
  105. "description": "Generic build trigger secret",
  106. "name": "GENERIC_WEBHOOK_SECRET",
  107. "from": "[a-zA-Z0-9]{8}",
  108. "generate": "expression",
  109. "required": true
  110. },
  111. {
  112. "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.",
  113. "name": "IMAGE_STREAM_NAMESPACE",
  114. "value": "openshift",
  115. "required": true
  116. },
  117. {
  118. "description": "The name of the secret containing the keystore file",
  119. "name": "JGROUPS_ENCRYPT_SECRET",
  120. "value": "eap7-app-secret",
  121. "required": false
  122. },
  123. {
  124. "description": "The name of the keystore file within the secret",
  125. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  126. "value": "jgroups.jceks",
  127. "required": false
  128. },
  129. {
  130. "description": "The name associated with the server certificate",
  131. "name": "JGROUPS_ENCRYPT_NAME",
  132. "value": "",
  133. "required": false
  134. },
  135. {
  136. "description": "The password for the keystore and certificate",
  137. "name": "JGROUPS_ENCRYPT_PASSWORD",
  138. "value": "",
  139. "required": false
  140. },
  141. {
  142. "description": "JGroups cluster password",
  143. "name": "JGROUPS_CLUSTER_PASSWORD",
  144. "from": "[a-zA-Z0-9]{8}",
  145. "generate": "expression",
  146. "required": true
  147. }
  148. ],
  149. "objects": [
  150. {
  151. "kind": "Service",
  152. "apiVersion": "v1",
  153. "spec": {
  154. "ports": [
  155. {
  156. "port": 8080,
  157. "targetPort": 8080
  158. }
  159. ],
  160. "selector": {
  161. "deploymentConfig": "${APPLICATION_NAME}"
  162. }
  163. },
  164. "metadata": {
  165. "name": "${APPLICATION_NAME}",
  166. "labels": {
  167. "application": "${APPLICATION_NAME}"
  168. },
  169. "annotations": {
  170. "description": "The web server's http port."
  171. }
  172. }
  173. },
  174. {
  175. "kind": "Service",
  176. "apiVersion": "v1",
  177. "spec": {
  178. "ports": [
  179. {
  180. "port": 8443,
  181. "targetPort": 8443
  182. }
  183. ],
  184. "selector": {
  185. "deploymentConfig": "${APPLICATION_NAME}"
  186. }
  187. },
  188. "metadata": {
  189. "name": "secure-${APPLICATION_NAME}",
  190. "labels": {
  191. "application": "${APPLICATION_NAME}"
  192. },
  193. "annotations": {
  194. "description": "The web server's https port."
  195. }
  196. }
  197. },
  198. {
  199. "kind": "Route",
  200. "apiVersion": "v1",
  201. "id": "${APPLICATION_NAME}-http",
  202. "metadata": {
  203. "name": "${APPLICATION_NAME}",
  204. "labels": {
  205. "application": "${APPLICATION_NAME}"
  206. },
  207. "annotations": {
  208. "description": "Route for application's http service."
  209. }
  210. },
  211. "spec": {
  212. "host": "${HOSTNAME_HTTP}",
  213. "to": {
  214. "name": "${APPLICATION_NAME}"
  215. }
  216. }
  217. },
  218. {
  219. "kind": "Route",
  220. "apiVersion": "v1",
  221. "id": "${APPLICATION_NAME}-https",
  222. "metadata": {
  223. "name": "secure-${APPLICATION_NAME}",
  224. "labels": {
  225. "application": "${APPLICATION_NAME}"
  226. },
  227. "annotations": {
  228. "description": "Route for application's https service."
  229. }
  230. },
  231. "spec": {
  232. "host": "${HOSTNAME_HTTPS}",
  233. "to": {
  234. "name": "secure-${APPLICATION_NAME}"
  235. },
  236. "tls": {
  237. "termination": "passthrough"
  238. }
  239. }
  240. },
  241. {
  242. "kind": "ImageStream",
  243. "apiVersion": "v1",
  244. "metadata": {
  245. "name": "${APPLICATION_NAME}",
  246. "labels": {
  247. "application": "${APPLICATION_NAME}"
  248. }
  249. }
  250. },
  251. {
  252. "kind": "BuildConfig",
  253. "apiVersion": "v1",
  254. "metadata": {
  255. "name": "${APPLICATION_NAME}",
  256. "labels": {
  257. "application": "${APPLICATION_NAME}"
  258. }
  259. },
  260. "spec": {
  261. "source": {
  262. "type": "Git",
  263. "git": {
  264. "uri": "${SOURCE_REPOSITORY_URL}",
  265. "ref": "${SOURCE_REPOSITORY_REF}"
  266. },
  267. "contextDir": "${CONTEXT_DIR}"
  268. },
  269. "strategy": {
  270. "type": "Source",
  271. "sourceStrategy": {
  272. "forcePull": true,
  273. "from": {
  274. "kind": "ImageStreamTag",
  275. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  276. "name": "jboss-eap70-openshift:1.3"
  277. }
  278. }
  279. },
  280. "output": {
  281. "to": {
  282. "kind": "ImageStreamTag",
  283. "name": "${APPLICATION_NAME}:latest"
  284. }
  285. },
  286. "triggers": [
  287. {
  288. "type": "GitHub",
  289. "github": {
  290. "secret": "${GITHUB_WEBHOOK_SECRET}"
  291. }
  292. },
  293. {
  294. "type": "Generic",
  295. "generic": {
  296. "secret": "${GENERIC_WEBHOOK_SECRET}"
  297. }
  298. },
  299. {
  300. "type": "ImageChange",
  301. "imageChange": {}
  302. },
  303. {
  304. "type": "ConfigChange"
  305. }
  306. ]
  307. }
  308. },
  309. {
  310. "kind": "DeploymentConfig",
  311. "apiVersion": "v1",
  312. "metadata": {
  313. "name": "${APPLICATION_NAME}",
  314. "labels": {
  315. "application": "${APPLICATION_NAME}"
  316. }
  317. },
  318. "spec": {
  319. "strategy": {
  320. "type": "Recreate"
  321. },
  322. "triggers": [
  323. {
  324. "type": "ImageChange",
  325. "imageChangeParams": {
  326. "automatic": true,
  327. "containerNames": [
  328. "${APPLICATION_NAME}"
  329. ],
  330. "from": {
  331. "kind": "ImageStream",
  332. "name": "${APPLICATION_NAME}"
  333. }
  334. }
  335. },
  336. {
  337. "type": "ConfigChange"
  338. }
  339. ],
  340. "replicas": 1,
  341. "selector": {
  342. "deploymentConfig": "${APPLICATION_NAME}"
  343. },
  344. "template": {
  345. "metadata": {
  346. "name": "${APPLICATION_NAME}",
  347. "labels": {
  348. "deploymentConfig": "${APPLICATION_NAME}",
  349. "application": "${APPLICATION_NAME}"
  350. }
  351. },
  352. "spec": {
  353. "serviceAccountName": "eap7-service-account",
  354. "terminationGracePeriodSeconds": 60,
  355. "containers": [
  356. {
  357. "name": "${APPLICATION_NAME}",
  358. "image": "${APPLICATION_NAME}",
  359. "imagePullPolicy": "Always",
  360. "volumeMounts": [
  361. {
  362. "name": "eap-keystore-volume",
  363. "mountPath": "/etc/eap-secret-volume",
  364. "readOnly": true
  365. },
  366. {
  367. "name": "eap-jgroups-keystore-volume",
  368. "mountPath": "/etc/jgroups-encrypt-secret-volume",
  369. "readOnly": true
  370. }
  371. ],
  372. "livenessProbe": {
  373. "exec": {
  374. "command": [
  375. "/bin/bash",
  376. "-c",
  377. "/opt/eap/bin/livenessProbe.sh"
  378. ]
  379. }
  380. },
  381. "readinessProbe": {
  382. "exec": {
  383. "command": [
  384. "/bin/bash",
  385. "-c",
  386. "/opt/eap/bin/readinessProbe.sh"
  387. ]
  388. }
  389. },
  390. "ports": [
  391. {
  392. "name": "jolokia",
  393. "containerPort": 8778,
  394. "protocol": "TCP"
  395. },
  396. {
  397. "name": "http",
  398. "containerPort": 8080,
  399. "protocol": "TCP"
  400. },
  401. {
  402. "name": "https",
  403. "containerPort": 8443,
  404. "protocol": "TCP"
  405. },
  406. {
  407. "name": "ping",
  408. "containerPort": 8888,
  409. "protocol": "TCP"
  410. }
  411. ],
  412. "env": [
  413. {
  414. "name": "OPENSHIFT_KUBE_PING_LABELS",
  415. "value": "application=${APPLICATION_NAME}"
  416. },
  417. {
  418. "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
  419. "valueFrom": {
  420. "fieldRef": {
  421. "fieldPath": "metadata.namespace"
  422. }
  423. }
  424. },
  425. {
  426. "name": "HTTPS_KEYSTORE_DIR",
  427. "value": "/etc/eap-secret-volume"
  428. },
  429. {
  430. "name": "HTTPS_KEYSTORE",
  431. "value": "${HTTPS_KEYSTORE}"
  432. },
  433. {
  434. "name": "HTTPS_NAME",
  435. "value": "${HTTPS_NAME}"
  436. },
  437. {
  438. "name": "HTTPS_PASSWORD",
  439. "value": "${HTTPS_PASSWORD}"
  440. },
  441. {
  442. "name": "MQ_CLUSTER_PASSWORD",
  443. "value": "${MQ_CLUSTER_PASSWORD}"
  444. },
  445. {
  446. "name": "MQ_QUEUES",
  447. "value": "${MQ_QUEUES}"
  448. },
  449. {
  450. "name": "MQ_TOPICS",
  451. "value": "${MQ_TOPICS}"
  452. },
  453. {
  454. "name": "JGROUPS_ENCRYPT_SECRET",
  455. "value": "${JGROUPS_ENCRYPT_SECRET}"
  456. },
  457. {
  458. "name": "JGROUPS_ENCRYPT_KEYSTORE_DIR",
  459. "value": "/etc/jgroups-encrypt-secret-volume"
  460. },
  461. {
  462. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  463. "value": "${JGROUPS_ENCRYPT_KEYSTORE}"
  464. },
  465. {
  466. "name": "JGROUPS_ENCRYPT_NAME",
  467. "value": "${JGROUPS_ENCRYPT_NAME}"
  468. },
  469. {
  470. "name": "JGROUPS_ENCRYPT_PASSWORD",
  471. "value": "${JGROUPS_ENCRYPT_PASSWORD}"
  472. },
  473. {
  474. "name": "JGROUPS_CLUSTER_PASSWORD",
  475. "value": "${JGROUPS_CLUSTER_PASSWORD}"
  476. }
  477. ]
  478. }
  479. ],
  480. "volumes": [
  481. {
  482. "name": "eap-keystore-volume",
  483. "secret": {
  484. "secretName": "${HTTPS_SECRET}"
  485. }
  486. },
  487. {
  488. "name": "eap-jgroups-keystore-volume",
  489. "secret": {
  490. "secretName": "${JGROUPS_ENCRYPT_SECRET}"
  491. }
  492. }
  493. ]
  494. }
  495. }
  496. }
  497. }
  498. ]
  499. }