eap64-https-s2i.json 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "iconClass": "icon-eap",
  7. "tags": "eap,javaee,java,jboss,hidden",
  8. "version": "1.4.8",
  9. "openshift.io/display-name": "JBoss EAP 6.4 (with https)",
  10. "openshift.io/provider-display-name": "Red Hat, Inc.",
  11. "description": "An example EAP 6 application. 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 Enterprise Application Server 6.4 based application, including a build configuration, application deployment configuration and secure communication using https.",
  13. "template.openshift.io/documentation-url": "https://access.redhat.com/documentation/en/red-hat-jboss-enterprise-application-platform/",
  14. "template.openshift.io/support-url": "https://access.redhat.com"
  15. },
  16. "name": "eap64-https-s2i"
  17. },
  18. "labels": {
  19. "template": "eap64-https-s2i",
  20. "xpaas": "1.4.8"
  21. },
  22. "message": "A new EAP 6 based application with SSL support has been created in your project. Please be sure to create the following secrets: \"${HTTPS_SECRET}\" containing the ${HTTPS_KEYSTORE} file used for serving secure content; \"${JGROUPS_ENCRYPT_SECRET}\" containing the ${JGROUPS_ENCRYPT_KEYSTORE} file used for securing JGroups communications.",
  23. "parameters": [
  24. {
  25. "displayName": "Application Name",
  26. "description": "The name for the application.",
  27. "name": "APPLICATION_NAME",
  28. "value": "eap-app",
  29. "required": true
  30. },
  31. {
  32. "displayName": "Custom http Route Hostname",
  33. "description": "Custom hostname for http service route. Leave blank for default hostname, e.g.: <application-name>-<project>.<default-domain-suffix>",
  34. "name": "HOSTNAME_HTTP",
  35. "value": "",
  36. "required": false
  37. },
  38. {
  39. "displayName": "Custom https Route Hostname",
  40. "description": "Custom hostname for https service route. Leave blank for default hostname, e.g.: secure-<application-name>-<project>.<default-domain-suffix>",
  41. "name": "HOSTNAME_HTTPS",
  42. "value": "",
  43. "required": false
  44. },
  45. {
  46. "displayName": "Git Repository URL",
  47. "description": "Git source URI for application",
  48. "name": "SOURCE_REPOSITORY_URL",
  49. "value": "https://github.com/jboss-developer/jboss-eap-quickstarts",
  50. "required": true
  51. },
  52. {
  53. "displayName": "Git Reference",
  54. "description": "Git branch/tag reference",
  55. "name": "SOURCE_REPOSITORY_REF",
  56. "value": "6.4.x",
  57. "required": false
  58. },
  59. {
  60. "displayName": "Context Directory",
  61. "description": "Path within Git project to build; empty for root project directory.",
  62. "name": "CONTEXT_DIR",
  63. "value": "kitchensink",
  64. "required": false
  65. },
  66. {
  67. "displayName": "Queues",
  68. "description": "Queue names",
  69. "name": "HORNETQ_QUEUES",
  70. "value": "",
  71. "required": false
  72. },
  73. {
  74. "displayName": "Topics",
  75. "description": "Topic names",
  76. "name": "HORNETQ_TOPICS",
  77. "value": "",
  78. "required": false
  79. },
  80. {
  81. "displayName": "Server Keystore Secret Name",
  82. "description": "The name of the secret containing the keystore file",
  83. "name": "HTTPS_SECRET",
  84. "value": "eap-app-secret",
  85. "required": true
  86. },
  87. {
  88. "displayName": "Server Keystore Filename",
  89. "description": "The name of the keystore file within the secret",
  90. "name": "HTTPS_KEYSTORE",
  91. "value": "keystore.jks",
  92. "required": false
  93. },
  94. {
  95. "displayName": "Server Keystore Type",
  96. "description": "The type of the keystore file (JKS or JCEKS)",
  97. "name": "HTTPS_KEYSTORE_TYPE",
  98. "value": "",
  99. "required": false
  100. },
  101. {
  102. "displayName": "Server Certificate Name",
  103. "description": "The name associated with the server certificate",
  104. "name": "HTTPS_NAME",
  105. "value": "",
  106. "required": false
  107. },
  108. {
  109. "displayName": "Server Keystore Password",
  110. "description": "The password for the keystore and certificate",
  111. "name": "HTTPS_PASSWORD",
  112. "value": "",
  113. "required": false
  114. },
  115. {
  116. "displayName": "HornetQ Password",
  117. "description": "HornetQ cluster admin password",
  118. "name": "HORNETQ_CLUSTER_PASSWORD",
  119. "from": "[a-zA-Z0-9]{8}",
  120. "generate": "expression",
  121. "required": true
  122. },
  123. {
  124. "displayName": "Github Webhook Secret",
  125. "description": "GitHub trigger secret",
  126. "name": "GITHUB_WEBHOOK_SECRET",
  127. "from": "[a-zA-Z0-9]{8}",
  128. "generate": "expression",
  129. "required": true
  130. },
  131. {
  132. "displayName": "Generic Webhook Secret",
  133. "description": "Generic build trigger secret",
  134. "name": "GENERIC_WEBHOOK_SECRET",
  135. "from": "[a-zA-Z0-9]{8}",
  136. "generate": "expression",
  137. "required": true
  138. },
  139. {
  140. "displayName": "ImageStream Namespace",
  141. "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.",
  142. "name": "IMAGE_STREAM_NAMESPACE",
  143. "value": "openshift",
  144. "required": true
  145. },
  146. {
  147. "displayName": "JGroups Secret Name",
  148. "description": "The name of the secret containing the keystore file",
  149. "name": "JGROUPS_ENCRYPT_SECRET",
  150. "value": "eap-app-secret",
  151. "required": false
  152. },
  153. {
  154. "displayName": "JGroups Keystore Filename",
  155. "description": "The name of the keystore file within the secret",
  156. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  157. "value": "jgroups.jceks",
  158. "required": false
  159. },
  160. {
  161. "displayName": "JGroups Certificate Name",
  162. "description": "The name associated with the server certificate",
  163. "name": "JGROUPS_ENCRYPT_NAME",
  164. "value": "",
  165. "required": false
  166. },
  167. {
  168. "displayName": "JGroups Keystore Password",
  169. "description": "The password for the keystore and certificate",
  170. "name": "JGROUPS_ENCRYPT_PASSWORD",
  171. "value": "",
  172. "required": false
  173. },
  174. {
  175. "displayName": "JGroups Cluster Password",
  176. "description": "JGroups cluster password",
  177. "name": "JGROUPS_CLUSTER_PASSWORD",
  178. "from": "[a-zA-Z0-9]{8}",
  179. "generate": "expression",
  180. "required": true
  181. },
  182. {
  183. "displayName": "Deploy Exploded Archives",
  184. "description": "Controls whether exploded deployment content should be automatically deployed",
  185. "name": "AUTO_DEPLOY_EXPLODED",
  186. "value": "false",
  187. "required": false
  188. },
  189. {
  190. "displayName": "Maven mirror URL",
  191. "description": "Maven mirror to use for S2I builds",
  192. "name": "MAVEN_MIRROR_URL",
  193. "value": "",
  194. "required": false
  195. },
  196. {
  197. "description": "List of directories from which archives will be copied into the deployment folder. If unspecified, all archives in /target will be copied.",
  198. "name": "ARTIFACT_DIR",
  199. "value": "",
  200. "required": false
  201. },
  202. {
  203. "description": "Container memory limit",
  204. "name": "MEMORY_LIMIT",
  205. "value": "1Gi",
  206. "required": false
  207. }
  208. ],
  209. "objects": [
  210. {
  211. "kind": "Service",
  212. "apiVersion": "v1",
  213. "spec": {
  214. "ports": [
  215. {
  216. "port": 8080,
  217. "targetPort": 8080
  218. }
  219. ],
  220. "selector": {
  221. "deploymentConfig": "${APPLICATION_NAME}"
  222. }
  223. },
  224. "metadata": {
  225. "name": "${APPLICATION_NAME}",
  226. "labels": {
  227. "application": "${APPLICATION_NAME}"
  228. },
  229. "annotations": {
  230. "description": "The web server's http port."
  231. }
  232. }
  233. },
  234. {
  235. "kind": "Service",
  236. "apiVersion": "v1",
  237. "spec": {
  238. "ports": [
  239. {
  240. "port": 8443,
  241. "targetPort": 8443
  242. }
  243. ],
  244. "selector": {
  245. "deploymentConfig": "${APPLICATION_NAME}"
  246. }
  247. },
  248. "metadata": {
  249. "name": "secure-${APPLICATION_NAME}",
  250. "labels": {
  251. "application": "${APPLICATION_NAME}"
  252. },
  253. "annotations": {
  254. "description": "The web server's https port."
  255. }
  256. }
  257. },
  258. {
  259. "kind": "Service",
  260. "apiVersion": "v1",
  261. "spec": {
  262. "clusterIP": "None",
  263. "ports": [
  264. {
  265. "name": "ping",
  266. "port": 8888
  267. }
  268. ],
  269. "selector": {
  270. "deploymentConfig": "${APPLICATION_NAME}"
  271. }
  272. },
  273. "metadata": {
  274. "name": "${APPLICATION_NAME}-ping",
  275. "labels": {
  276. "application": "${APPLICATION_NAME}"
  277. },
  278. "annotations": {
  279. "service.alpha.kubernetes.io/tolerate-unready-endpoints": "true",
  280. "description": "The JGroups ping port for clustering."
  281. }
  282. }
  283. },
  284. {
  285. "kind": "Route",
  286. "apiVersion": "v1",
  287. "id": "${APPLICATION_NAME}-http",
  288. "metadata": {
  289. "name": "${APPLICATION_NAME}",
  290. "labels": {
  291. "application": "${APPLICATION_NAME}"
  292. },
  293. "annotations": {
  294. "description": "Route for application's http service."
  295. }
  296. },
  297. "spec": {
  298. "host": "${HOSTNAME_HTTP}",
  299. "to": {
  300. "name": "${APPLICATION_NAME}"
  301. }
  302. }
  303. },
  304. {
  305. "kind": "Route",
  306. "apiVersion": "v1",
  307. "id": "${APPLICATION_NAME}-https",
  308. "metadata": {
  309. "name": "secure-${APPLICATION_NAME}",
  310. "labels": {
  311. "application": "${APPLICATION_NAME}"
  312. },
  313. "annotations": {
  314. "description": "Route for application's https service."
  315. }
  316. },
  317. "spec": {
  318. "host": "${HOSTNAME_HTTPS}",
  319. "to": {
  320. "name": "secure-${APPLICATION_NAME}"
  321. },
  322. "tls": {
  323. "termination": "passthrough"
  324. }
  325. }
  326. },
  327. {
  328. "kind": "ImageStream",
  329. "apiVersion": "v1",
  330. "metadata": {
  331. "name": "${APPLICATION_NAME}",
  332. "labels": {
  333. "application": "${APPLICATION_NAME}"
  334. }
  335. }
  336. },
  337. {
  338. "kind": "BuildConfig",
  339. "apiVersion": "v1",
  340. "metadata": {
  341. "name": "${APPLICATION_NAME}",
  342. "labels": {
  343. "application": "${APPLICATION_NAME}"
  344. }
  345. },
  346. "spec": {
  347. "source": {
  348. "type": "Git",
  349. "git": {
  350. "uri": "${SOURCE_REPOSITORY_URL}",
  351. "ref": "${SOURCE_REPOSITORY_REF}"
  352. },
  353. "contextDir": "${CONTEXT_DIR}"
  354. },
  355. "strategy": {
  356. "type": "Source",
  357. "sourceStrategy": {
  358. "env": [
  359. {
  360. "name": "MAVEN_MIRROR_URL",
  361. "value": "${MAVEN_MIRROR_URL}"
  362. },
  363. {
  364. "name": "ARTIFACT_DIR",
  365. "value": "${ARTIFACT_DIR}"
  366. }
  367. ],
  368. "forcePull": true,
  369. "from": {
  370. "kind": "ImageStreamTag",
  371. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  372. "name": "jboss-eap64-openshift:1.7"
  373. }
  374. }
  375. },
  376. "output": {
  377. "to": {
  378. "kind": "ImageStreamTag",
  379. "name": "${APPLICATION_NAME}:latest"
  380. }
  381. },
  382. "triggers": [
  383. {
  384. "type": "GitHub",
  385. "github": {
  386. "secret": "${GITHUB_WEBHOOK_SECRET}"
  387. }
  388. },
  389. {
  390. "type": "Generic",
  391. "generic": {
  392. "secret": "${GENERIC_WEBHOOK_SECRET}"
  393. }
  394. },
  395. {
  396. "type": "ImageChange",
  397. "imageChange": {}
  398. },
  399. {
  400. "type": "ConfigChange"
  401. }
  402. ]
  403. }
  404. },
  405. {
  406. "kind": "DeploymentConfig",
  407. "apiVersion": "v1",
  408. "metadata": {
  409. "name": "${APPLICATION_NAME}",
  410. "labels": {
  411. "application": "${APPLICATION_NAME}"
  412. }
  413. },
  414. "spec": {
  415. "strategy": {
  416. "type": "Recreate"
  417. },
  418. "triggers": [
  419. {
  420. "type": "ImageChange",
  421. "imageChangeParams": {
  422. "automatic": true,
  423. "containerNames": [
  424. "${APPLICATION_NAME}"
  425. ],
  426. "from": {
  427. "kind": "ImageStreamTag",
  428. "name": "${APPLICATION_NAME}:latest"
  429. }
  430. }
  431. },
  432. {
  433. "type": "ConfigChange"
  434. }
  435. ],
  436. "replicas": 1,
  437. "selector": {
  438. "deploymentConfig": "${APPLICATION_NAME}"
  439. },
  440. "template": {
  441. "metadata": {
  442. "name": "${APPLICATION_NAME}",
  443. "labels": {
  444. "deploymentConfig": "${APPLICATION_NAME}",
  445. "application": "${APPLICATION_NAME}"
  446. }
  447. },
  448. "spec": {
  449. "terminationGracePeriodSeconds": 60,
  450. "containers": [
  451. {
  452. "name": "${APPLICATION_NAME}",
  453. "image": "${APPLICATION_NAME}",
  454. "imagePullPolicy": "Always",
  455. "resources": {
  456. "limits": {
  457. "memory": "${MEMORY_LIMIT}"
  458. }
  459. },
  460. "volumeMounts": [
  461. {
  462. "name": "eap-keystore-volume",
  463. "mountPath": "/etc/eap-secret-volume",
  464. "readOnly": true
  465. },
  466. {
  467. "name": "eap-jgroups-keystore-volume",
  468. "mountPath": "/etc/jgroups-encrypt-secret-volume",
  469. "readOnly": true
  470. }
  471. ],
  472. "livenessProbe": {
  473. "exec": {
  474. "command": [
  475. "/bin/bash",
  476. "-c",
  477. "/opt/eap/bin/livenessProbe.sh"
  478. ]
  479. },
  480. "initialDelaySeconds": 60
  481. },
  482. "readinessProbe": {
  483. "exec": {
  484. "command": [
  485. "/bin/bash",
  486. "-c",
  487. "/opt/eap/bin/readinessProbe.sh"
  488. ]
  489. }
  490. },
  491. "ports": [
  492. {
  493. "name": "jolokia",
  494. "containerPort": 8778,
  495. "protocol": "TCP"
  496. },
  497. {
  498. "name": "http",
  499. "containerPort": 8080,
  500. "protocol": "TCP"
  501. },
  502. {
  503. "name": "https",
  504. "containerPort": 8443,
  505. "protocol": "TCP"
  506. },
  507. {
  508. "name": "ping",
  509. "containerPort": 8888,
  510. "protocol": "TCP"
  511. }
  512. ],
  513. "env": [
  514. {
  515. "name": "JGROUPS_PING_PROTOCOL",
  516. "value": "openshift.DNS_PING"
  517. },
  518. {
  519. "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
  520. "value": "${APPLICATION_NAME}-ping"
  521. },
  522. {
  523. "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
  524. "value": "8888"
  525. },
  526. {
  527. "name": "HTTPS_KEYSTORE_DIR",
  528. "value": "/etc/eap-secret-volume"
  529. },
  530. {
  531. "name": "HTTPS_KEYSTORE",
  532. "value": "${HTTPS_KEYSTORE}"
  533. },
  534. {
  535. "name": "HTTPS_KEYSTORE_TYPE",
  536. "value": "${HTTPS_KEYSTORE_TYPE}"
  537. },
  538. {
  539. "name": "HTTPS_NAME",
  540. "value": "${HTTPS_NAME}"
  541. },
  542. {
  543. "name": "HTTPS_PASSWORD",
  544. "value": "${HTTPS_PASSWORD}"
  545. },
  546. {
  547. "name": "HORNETQ_CLUSTER_PASSWORD",
  548. "value": "${HORNETQ_CLUSTER_PASSWORD}"
  549. },
  550. {
  551. "name": "HORNETQ_QUEUES",
  552. "value": "${HORNETQ_QUEUES}"
  553. },
  554. {
  555. "name": "HORNETQ_TOPICS",
  556. "value": "${HORNETQ_TOPICS}"
  557. },
  558. {
  559. "name": "JGROUPS_ENCRYPT_SECRET",
  560. "value": "${JGROUPS_ENCRYPT_SECRET}"
  561. },
  562. {
  563. "name": "JGROUPS_ENCRYPT_KEYSTORE_DIR",
  564. "value": "/etc/jgroups-encrypt-secret-volume"
  565. },
  566. {
  567. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  568. "value": "${JGROUPS_ENCRYPT_KEYSTORE}"
  569. },
  570. {
  571. "name": "JGROUPS_ENCRYPT_NAME",
  572. "value": "${JGROUPS_ENCRYPT_NAME}"
  573. },
  574. {
  575. "name": "JGROUPS_ENCRYPT_PASSWORD",
  576. "value": "${JGROUPS_ENCRYPT_PASSWORD}"
  577. },
  578. {
  579. "name": "JGROUPS_CLUSTER_PASSWORD",
  580. "value": "${JGROUPS_CLUSTER_PASSWORD}"
  581. },
  582. {
  583. "name": "AUTO_DEPLOY_EXPLODED",
  584. "value": "${AUTO_DEPLOY_EXPLODED}"
  585. }
  586. ]
  587. }
  588. ],
  589. "volumes": [
  590. {
  591. "name": "eap-keystore-volume",
  592. "secret": {
  593. "secretName": "${HTTPS_SECRET}"
  594. }
  595. },
  596. {
  597. "name": "eap-jgroups-keystore-volume",
  598. "secret": {
  599. "secretName": "${JGROUPS_ENCRYPT_SECRET}"
  600. }
  601. }
  602. ]
  603. }
  604. }
  605. }
  606. }
  607. ]
  608. }