eap64-https-s2i.json 23 KB

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