eap70-https-s2i.json 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536
  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.2"
  10. },
  11. "name": "eap70-https-s2i"
  12. },
  13. "labels": {
  14. "template": "eap70-https-s2i",
  15. "xpaas": "1.3.2"
  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 service account to use for the deployment. The service account should be configured to allow useage of the secret(s) specified by HTTPS_SECRET and JGROUPS_ENCRYPT_SECRET.",
  68. "name": "SERVICE_ACCOUNT_NAME",
  69. "value": "eap7-service-account",
  70. "required": true
  71. },
  72. {
  73. "description": "The name of the secret containing the keystore file",
  74. "name": "HTTPS_SECRET",
  75. "value": "eap7-app-secret",
  76. "required": true
  77. },
  78. {
  79. "description": "The name of the keystore file within the secret",
  80. "name": "HTTPS_KEYSTORE",
  81. "value": "keystore.jks",
  82. "required": false
  83. },
  84. {
  85. "description": "The type of the keystore file (JKS or JCEKS)",
  86. "name": "HTTPS_KEYSTORE_TYPE",
  87. "value": "",
  88. "required": false
  89. },
  90. {
  91. "description": "The name associated with the server certificate",
  92. "name": "HTTPS_NAME",
  93. "value": "",
  94. "required": false
  95. },
  96. {
  97. "description": "The password for the keystore and certificate",
  98. "name": "HTTPS_PASSWORD",
  99. "value": "",
  100. "required": false
  101. },
  102. {
  103. "description": "A-MQ cluster admin password",
  104. "name": "MQ_CLUSTER_PASSWORD",
  105. "from": "[a-zA-Z0-9]{8}",
  106. "generate": "expression",
  107. "required": true
  108. },
  109. {
  110. "description": "GitHub trigger secret",
  111. "name": "GITHUB_WEBHOOK_SECRET",
  112. "from": "[a-zA-Z0-9]{8}",
  113. "generate": "expression",
  114. "required": true
  115. },
  116. {
  117. "description": "Generic build trigger secret",
  118. "name": "GENERIC_WEBHOOK_SECRET",
  119. "from": "[a-zA-Z0-9]{8}",
  120. "generate": "expression",
  121. "required": true
  122. },
  123. {
  124. "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.",
  125. "name": "IMAGE_STREAM_NAMESPACE",
  126. "value": "openshift",
  127. "required": true
  128. },
  129. {
  130. "description": "The name of the secret containing the keystore file",
  131. "name": "JGROUPS_ENCRYPT_SECRET",
  132. "value": "eap7-app-secret",
  133. "required": false
  134. },
  135. {
  136. "description": "The name of the keystore file within the secret",
  137. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  138. "value": "jgroups.jceks",
  139. "required": false
  140. },
  141. {
  142. "description": "The name associated with the server certificate",
  143. "name": "JGROUPS_ENCRYPT_NAME",
  144. "value": "",
  145. "required": false
  146. },
  147. {
  148. "description": "The password for the keystore and certificate",
  149. "name": "JGROUPS_ENCRYPT_PASSWORD",
  150. "value": "",
  151. "required": false
  152. },
  153. {
  154. "description": "JGroups cluster password",
  155. "name": "JGROUPS_CLUSTER_PASSWORD",
  156. "from": "[a-zA-Z0-9]{8}",
  157. "generate": "expression",
  158. "required": true
  159. },
  160. {
  161. "description": "Controls whether exploded deployment content should be automatically deployed",
  162. "name": "AUTO_DEPLOY_EXPLODED",
  163. "value": "false",
  164. "required": false
  165. }
  166. ],
  167. "objects": [
  168. {
  169. "kind": "Service",
  170. "apiVersion": "v1",
  171. "spec": {
  172. "ports": [
  173. {
  174. "port": 8080,
  175. "targetPort": 8080
  176. }
  177. ],
  178. "selector": {
  179. "deploymentConfig": "${APPLICATION_NAME}"
  180. }
  181. },
  182. "metadata": {
  183. "name": "${APPLICATION_NAME}",
  184. "labels": {
  185. "application": "${APPLICATION_NAME}"
  186. },
  187. "annotations": {
  188. "description": "The web server's http port."
  189. }
  190. }
  191. },
  192. {
  193. "kind": "Service",
  194. "apiVersion": "v1",
  195. "spec": {
  196. "ports": [
  197. {
  198. "port": 8443,
  199. "targetPort": 8443
  200. }
  201. ],
  202. "selector": {
  203. "deploymentConfig": "${APPLICATION_NAME}"
  204. }
  205. },
  206. "metadata": {
  207. "name": "secure-${APPLICATION_NAME}",
  208. "labels": {
  209. "application": "${APPLICATION_NAME}"
  210. },
  211. "annotations": {
  212. "description": "The web server's https port."
  213. }
  214. }
  215. },
  216. {
  217. "kind": "Route",
  218. "apiVersion": "v1",
  219. "id": "${APPLICATION_NAME}-http",
  220. "metadata": {
  221. "name": "${APPLICATION_NAME}",
  222. "labels": {
  223. "application": "${APPLICATION_NAME}"
  224. },
  225. "annotations": {
  226. "description": "Route for application's http service."
  227. }
  228. },
  229. "spec": {
  230. "host": "${HOSTNAME_HTTP}",
  231. "to": {
  232. "name": "${APPLICATION_NAME}"
  233. }
  234. }
  235. },
  236. {
  237. "kind": "Route",
  238. "apiVersion": "v1",
  239. "id": "${APPLICATION_NAME}-https",
  240. "metadata": {
  241. "name": "secure-${APPLICATION_NAME}",
  242. "labels": {
  243. "application": "${APPLICATION_NAME}"
  244. },
  245. "annotations": {
  246. "description": "Route for application's https service."
  247. }
  248. },
  249. "spec": {
  250. "host": "${HOSTNAME_HTTPS}",
  251. "to": {
  252. "name": "secure-${APPLICATION_NAME}"
  253. },
  254. "tls": {
  255. "termination": "passthrough"
  256. }
  257. }
  258. },
  259. {
  260. "kind": "ImageStream",
  261. "apiVersion": "v1",
  262. "metadata": {
  263. "name": "${APPLICATION_NAME}",
  264. "labels": {
  265. "application": "${APPLICATION_NAME}"
  266. }
  267. }
  268. },
  269. {
  270. "kind": "BuildConfig",
  271. "apiVersion": "v1",
  272. "metadata": {
  273. "name": "${APPLICATION_NAME}",
  274. "labels": {
  275. "application": "${APPLICATION_NAME}"
  276. }
  277. },
  278. "spec": {
  279. "source": {
  280. "type": "Git",
  281. "git": {
  282. "uri": "${SOURCE_REPOSITORY_URL}",
  283. "ref": "${SOURCE_REPOSITORY_REF}"
  284. },
  285. "contextDir": "${CONTEXT_DIR}"
  286. },
  287. "strategy": {
  288. "type": "Source",
  289. "sourceStrategy": {
  290. "forcePull": true,
  291. "from": {
  292. "kind": "ImageStreamTag",
  293. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  294. "name": "jboss-eap70-openshift:1.4"
  295. }
  296. }
  297. },
  298. "output": {
  299. "to": {
  300. "kind": "ImageStreamTag",
  301. "name": "${APPLICATION_NAME}:latest"
  302. }
  303. },
  304. "triggers": [
  305. {
  306. "type": "GitHub",
  307. "github": {
  308. "secret": "${GITHUB_WEBHOOK_SECRET}"
  309. }
  310. },
  311. {
  312. "type": "Generic",
  313. "generic": {
  314. "secret": "${GENERIC_WEBHOOK_SECRET}"
  315. }
  316. },
  317. {
  318. "type": "ImageChange",
  319. "imageChange": {}
  320. },
  321. {
  322. "type": "ConfigChange"
  323. }
  324. ]
  325. }
  326. },
  327. {
  328. "kind": "DeploymentConfig",
  329. "apiVersion": "v1",
  330. "metadata": {
  331. "name": "${APPLICATION_NAME}",
  332. "labels": {
  333. "application": "${APPLICATION_NAME}"
  334. }
  335. },
  336. "spec": {
  337. "strategy": {
  338. "type": "Recreate"
  339. },
  340. "triggers": [
  341. {
  342. "type": "ImageChange",
  343. "imageChangeParams": {
  344. "automatic": true,
  345. "containerNames": [
  346. "${APPLICATION_NAME}"
  347. ],
  348. "from": {
  349. "kind": "ImageStreamTag",
  350. "name": "${APPLICATION_NAME}:latest"
  351. }
  352. }
  353. },
  354. {
  355. "type": "ConfigChange"
  356. }
  357. ],
  358. "replicas": 1,
  359. "selector": {
  360. "deploymentConfig": "${APPLICATION_NAME}"
  361. },
  362. "template": {
  363. "metadata": {
  364. "name": "${APPLICATION_NAME}",
  365. "labels": {
  366. "deploymentConfig": "${APPLICATION_NAME}",
  367. "application": "${APPLICATION_NAME}"
  368. }
  369. },
  370. "spec": {
  371. "serviceAccountName": "${SERVICE_ACCOUNT_NAME}",
  372. "terminationGracePeriodSeconds": 75,
  373. "containers": [
  374. {
  375. "name": "${APPLICATION_NAME}",
  376. "image": "${APPLICATION_NAME}",
  377. "imagePullPolicy": "Always",
  378. "volumeMounts": [
  379. {
  380. "name": "eap-keystore-volume",
  381. "mountPath": "/etc/eap-secret-volume",
  382. "readOnly": true
  383. },
  384. {
  385. "name": "eap-jgroups-keystore-volume",
  386. "mountPath": "/etc/jgroups-encrypt-secret-volume",
  387. "readOnly": true
  388. }
  389. ],
  390. "lifecycle": {
  391. "preStop": {
  392. "exec": {
  393. "command": [
  394. "/opt/eap/bin/jboss-cli.sh",
  395. "-c",
  396. ":shutdown(timeout=60)"
  397. ]
  398. }
  399. }
  400. },
  401. "livenessProbe": {
  402. "exec": {
  403. "command": [
  404. "/bin/bash",
  405. "-c",
  406. "/opt/eap/bin/livenessProbe.sh"
  407. ]
  408. }
  409. },
  410. "readinessProbe": {
  411. "exec": {
  412. "command": [
  413. "/bin/bash",
  414. "-c",
  415. "/opt/eap/bin/readinessProbe.sh"
  416. ]
  417. }
  418. },
  419. "ports": [
  420. {
  421. "name": "jolokia",
  422. "containerPort": 8778,
  423. "protocol": "TCP"
  424. },
  425. {
  426. "name": "http",
  427. "containerPort": 8080,
  428. "protocol": "TCP"
  429. },
  430. {
  431. "name": "https",
  432. "containerPort": 8443,
  433. "protocol": "TCP"
  434. },
  435. {
  436. "name": "ping",
  437. "containerPort": 8888,
  438. "protocol": "TCP"
  439. }
  440. ],
  441. "env": [
  442. {
  443. "name": "OPENSHIFT_KUBE_PING_LABELS",
  444. "value": "application=${APPLICATION_NAME}"
  445. },
  446. {
  447. "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
  448. "valueFrom": {
  449. "fieldRef": {
  450. "fieldPath": "metadata.namespace"
  451. }
  452. }
  453. },
  454. {
  455. "name": "HTTPS_KEYSTORE_DIR",
  456. "value": "/etc/eap-secret-volume"
  457. },
  458. {
  459. "name": "HTTPS_KEYSTORE",
  460. "value": "${HTTPS_KEYSTORE}"
  461. },
  462. {
  463. "name": "HTTPS_KEYSTORE_TYPE",
  464. "value": "${HTTPS_KEYSTORE_TYPE}"
  465. },
  466. {
  467. "name": "HTTPS_NAME",
  468. "value": "${HTTPS_NAME}"
  469. },
  470. {
  471. "name": "HTTPS_PASSWORD",
  472. "value": "${HTTPS_PASSWORD}"
  473. },
  474. {
  475. "name": "MQ_CLUSTER_PASSWORD",
  476. "value": "${MQ_CLUSTER_PASSWORD}"
  477. },
  478. {
  479. "name": "MQ_QUEUES",
  480. "value": "${MQ_QUEUES}"
  481. },
  482. {
  483. "name": "MQ_TOPICS",
  484. "value": "${MQ_TOPICS}"
  485. },
  486. {
  487. "name": "JGROUPS_ENCRYPT_SECRET",
  488. "value": "${JGROUPS_ENCRYPT_SECRET}"
  489. },
  490. {
  491. "name": "JGROUPS_ENCRYPT_KEYSTORE_DIR",
  492. "value": "/etc/jgroups-encrypt-secret-volume"
  493. },
  494. {
  495. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  496. "value": "${JGROUPS_ENCRYPT_KEYSTORE}"
  497. },
  498. {
  499. "name": "JGROUPS_ENCRYPT_NAME",
  500. "value": "${JGROUPS_ENCRYPT_NAME}"
  501. },
  502. {
  503. "name": "JGROUPS_ENCRYPT_PASSWORD",
  504. "value": "${JGROUPS_ENCRYPT_PASSWORD}"
  505. },
  506. {
  507. "name": "JGROUPS_CLUSTER_PASSWORD",
  508. "value": "${JGROUPS_CLUSTER_PASSWORD}"
  509. },
  510. {
  511. "name": "AUTO_DEPLOY_EXPLODED",
  512. "value": "${AUTO_DEPLOY_EXPLODED}"
  513. }
  514. ]
  515. }
  516. ],
  517. "volumes": [
  518. {
  519. "name": "eap-keystore-volume",
  520. "secret": {
  521. "secretName": "${HTTPS_SECRET}"
  522. }
  523. },
  524. {
  525. "name": "eap-jgroups-keystore-volume",
  526. "secret": {
  527. "secretName": "${JGROUPS_ENCRYPT_SECRET}"
  528. }
  529. }
  530. ]
  531. }
  532. }
  533. }
  534. }
  535. ]
  536. }