eap64-amq-persistent-s2i.json 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "description": "Application template for EAP 6 A-MQ applications with persistent storage built using S2I.",
  7. "iconClass": "icon-jboss",
  8. "tags": "eap,javaee,java,jboss,xpaas",
  9. "version": "1.4.0",
  10. "openshift.io/display-name": "Red Hat JBoss EAP 6.4 + A-MQ (Persistent with https)"
  11. },
  12. "name": "eap64-amq-persistent-s2i"
  13. },
  14. "labels": {
  15. "template": "eap64-amq-persistent-s2i",
  16. "xpaas": "1.4.0"
  17. },
  18. "message": "A new EAP 6 and A-MQ persistent based application with SSL support has been created in your project. The username/password for accessing the A-MQ service is ${MQ_USERNAME}/${MQ_PASSWORD}. 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.git",
  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": "helloworld-mdb",
  60. "required": false
  61. },
  62. {
  63. "displayName": "A-MQ Volume Size",
  64. "description": "Size of the volume used by A-MQ for persisting messages.",
  65. "name": "VOLUME_CAPACITY",
  66. "value": "512Mi",
  67. "required": true
  68. },
  69. {
  70. "displayName": "JMS Connection Factory JNDI Name",
  71. "description": "JNDI name for connection factory used by applications to connect to the broker, e.g. java:/ConnectionFactory",
  72. "name": "MQ_JNDI",
  73. "value": "java:/ConnectionFactory",
  74. "required": false
  75. },
  76. {
  77. "displayName": "Split Data?",
  78. "description": "Split the data directory for each node in a mesh.",
  79. "name": "AMQ_SPLIT",
  80. "value": "false",
  81. "required": false
  82. },
  83. {
  84. "displayName": "A-MQ Protocols",
  85. "description": "Broker protocols to configure, separated by commas. Allowed values are: `openwire`, `amqp`, `stomp` and `mqtt`. Only `openwire` is supported by EAP.",
  86. "name": "MQ_PROTOCOL",
  87. "value": "openwire",
  88. "required": false
  89. },
  90. {
  91. "displayName": "Queues",
  92. "description": "Queue names, separated by commas. These queues will be automatically created when the broker starts. Also, they will be made accessible as JNDI resources in EAP.",
  93. "name": "MQ_QUEUES",
  94. "value": "HELLOWORLDMDBQueue",
  95. "required": false
  96. },
  97. {
  98. "displayName": "Topics",
  99. "description": "Topic names, separated by commas. These topics will be automatically created when the broker starts. Also, they will be made accessible as JNDI resources in EAP.",
  100. "name": "MQ_TOPICS",
  101. "value": "HELLOWORLDMDBTopic",
  102. "required": false
  103. },
  104. {
  105. "displayName": "A-MQ Serializable Packages",
  106. "description": "List of packages that are allowed to be serialized for use in ObjectMessage, separated by commas. If your app doesn't use ObjectMessages, leave this blank. This is a security enforcement. For the rationale, see http://activemq.apache.org/objectmessage.html",
  107. "name": "MQ_SERIALIZABLE_PACKAGES",
  108. "value": "",
  109. "required": false
  110. },
  111. {
  112. "displayName": "Service Account Name",
  113. "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.",
  114. "name": "SERVICE_ACCOUNT_NAME",
  115. "value": "eap-service-account",
  116. "required": true
  117. },
  118. {
  119. "displayName": "Server Keystore Secret Name",
  120. "description": "The name of the secret containing the keystore file",
  121. "name": "HTTPS_SECRET",
  122. "value": "eap-app-secret",
  123. "required": false
  124. },
  125. {
  126. "displayName": "Server Keystore Filename",
  127. "description": "The name of the keystore file within the secret",
  128. "name": "HTTPS_KEYSTORE",
  129. "value": "keystore.jks",
  130. "required": false
  131. },
  132. {
  133. "displayName": "Server Keystore Type",
  134. "description": "The type of the keystore file (JKS or JCEKS)",
  135. "name": "HTTPS_KEYSTORE_TYPE",
  136. "value": "",
  137. "required": false
  138. },
  139. {
  140. "displayName": "Server Certificate Name",
  141. "description": "The name associated with the server certificate",
  142. "name": "HTTPS_NAME",
  143. "value": "",
  144. "required": false
  145. },
  146. {
  147. "displayName": "Server Keystore Password",
  148. "description": "The password for the keystore and certificate",
  149. "name": "HTTPS_PASSWORD",
  150. "value": "",
  151. "required": false
  152. },
  153. {
  154. "displayName": "A-MQ Username",
  155. "description": "User name for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
  156. "name": "MQ_USERNAME",
  157. "from": "user[a-zA-Z0-9]{3}",
  158. "generate": "expression",
  159. "required": false
  160. },
  161. {
  162. "displayName": "A-MQ Password",
  163. "description": "Password for standard broker user. It is required for connecting to the broker. If left empty, it will be generated.",
  164. "name": "MQ_PASSWORD",
  165. "from": "[a-zA-Z0-9]{8}",
  166. "generate": "expression",
  167. "required": false
  168. },
  169. {
  170. "displayName": "A-MQ Mesh Discovery Type",
  171. "description": "The discovery agent type to use for discovering mesh endpoints. 'dns' will use OpenShift's DNS service to resolve endpoints. 'kube' will use Kubernetes REST API to resolve service endpoints. If using 'kube' the service account for the pod must have the 'view' role, which can be added via 'oc policy add-role-to-user view system:serviceaccount:<namespace>:default' where <namespace> is the project namespace.",
  172. "name": "AMQ_MESH_DISCOVERY_TYPE",
  173. "value": "kube",
  174. "required": false
  175. },
  176. {
  177. "displayName": "A-MQ Storage Limit",
  178. "description": "The A-MQ storage usage limit",
  179. "name": "AMQ_STORAGE_USAGE_LIMIT",
  180. "value": "100 gb",
  181. "required": false
  182. },
  183. {
  184. "displayName": "Github Webhook Secret",
  185. "description": "GitHub trigger secret",
  186. "name": "GITHUB_WEBHOOK_SECRET",
  187. "from": "[a-zA-Z0-9]{8}",
  188. "generate": "expression",
  189. "required": true
  190. },
  191. {
  192. "displayName": "Generic Webhook Secret",
  193. "description": "Generic build trigger secret",
  194. "name": "GENERIC_WEBHOOK_SECRET",
  195. "from": "[a-zA-Z0-9]{8}",
  196. "generate": "expression",
  197. "required": true
  198. },
  199. {
  200. "displayName": "ImageStream Namespace",
  201. "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.",
  202. "name": "IMAGE_STREAM_NAMESPACE",
  203. "value": "openshift",
  204. "required": true
  205. },
  206. {
  207. "displayName": "JGroups Secret Name",
  208. "description": "The name of the secret containing the keystore file",
  209. "name": "JGROUPS_ENCRYPT_SECRET",
  210. "value": "eap-app-secret",
  211. "required": false
  212. },
  213. {
  214. "displayName": "JGroups Keystore Filename",
  215. "description": "The name of the keystore file within the secret",
  216. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  217. "value": "jgroups.jceks",
  218. "required": false
  219. },
  220. {
  221. "displayName": "JGroups Certificate Name",
  222. "description": "The name associated with the server certificate",
  223. "name": "JGROUPS_ENCRYPT_NAME",
  224. "value": "",
  225. "required": false
  226. },
  227. {
  228. "displayName": "JGroups Keystore Password",
  229. "description": "The password for the keystore and certificate",
  230. "name": "JGROUPS_ENCRYPT_PASSWORD",
  231. "value": "",
  232. "required": false
  233. },
  234. {
  235. "displayName": "JGroups Cluster Password",
  236. "description": "JGroups cluster password",
  237. "name": "JGROUPS_CLUSTER_PASSWORD",
  238. "from": "[a-zA-Z0-9]{8}",
  239. "generate": "expression",
  240. "required": true
  241. },
  242. {
  243. "displayName": "Deploy Exploded Archives",
  244. "description": "Controls whether exploded deployment content should be automatically deployed",
  245. "name": "AUTO_DEPLOY_EXPLODED",
  246. "value": "false",
  247. "required": false
  248. },
  249. {
  250. "displayName": "Maven mirror URL",
  251. "description": "Maven mirror to use for S2I builds",
  252. "name": "MAVEN_MIRROR_URL",
  253. "value": "",
  254. "required": false
  255. },
  256. {
  257. "description": "List of directories from which archives will be copied into the deployment folder. If unspecified, all archives in /target will be copied.",
  258. "name": "ARTIFACT_DIR",
  259. "value": "",
  260. "required": false
  261. }
  262. ],
  263. "objects": [
  264. {
  265. "kind": "Service",
  266. "apiVersion": "v1",
  267. "spec": {
  268. "ports": [
  269. {
  270. "port": 8080,
  271. "targetPort": 8080
  272. }
  273. ],
  274. "selector": {
  275. "deploymentConfig": "${APPLICATION_NAME}"
  276. }
  277. },
  278. "metadata": {
  279. "name": "${APPLICATION_NAME}",
  280. "labels": {
  281. "application": "${APPLICATION_NAME}"
  282. },
  283. "annotations": {
  284. "description": "The web server's HTTP port.",
  285. "service.alpha.openshift.io/dependencies": "[{\"name\": \"${APPLICATION_NAME}-amq-tcp\", \"kind\": \"Service\"}]"
  286. }
  287. }
  288. },
  289. {
  290. "kind": "Service",
  291. "apiVersion": "v1",
  292. "spec": {
  293. "ports": [
  294. {
  295. "port": 8443,
  296. "targetPort": 8443
  297. }
  298. ],
  299. "selector": {
  300. "deploymentConfig": "${APPLICATION_NAME}"
  301. }
  302. },
  303. "metadata": {
  304. "name": "secure-${APPLICATION_NAME}",
  305. "labels": {
  306. "application": "${APPLICATION_NAME}"
  307. },
  308. "annotations": {
  309. "description": "The web server's HTTPS port.",
  310. "service.alpha.openshift.io/dependencies": "[{\"name\": \"${APPLICATION_NAME}-amq-tcp\", \"kind\": \"Service\"}]"
  311. }
  312. }
  313. },
  314. {
  315. "kind": "Service",
  316. "apiVersion": "v1",
  317. "spec": {
  318. "ports": [
  319. {
  320. "port": 61616,
  321. "targetPort": 61616
  322. }
  323. ],
  324. "selector": {
  325. "deploymentConfig": "${APPLICATION_NAME}-amq"
  326. }
  327. },
  328. "metadata": {
  329. "name": "${APPLICATION_NAME}-amq-tcp",
  330. "labels": {
  331. "application": "${APPLICATION_NAME}"
  332. },
  333. "annotations": {
  334. "description": "The broker's OpenWire port."
  335. }
  336. }
  337. },
  338. {
  339. "kind": "Route",
  340. "apiVersion": "v1",
  341. "id": "${APPLICATION_NAME}-http",
  342. "metadata": {
  343. "name": "${APPLICATION_NAME}",
  344. "labels": {
  345. "application": "${APPLICATION_NAME}"
  346. },
  347. "annotations": {
  348. "description": "Route for application's HTTP service."
  349. }
  350. },
  351. "spec": {
  352. "host": "${HOSTNAME_HTTP}",
  353. "to": {
  354. "name": "${APPLICATION_NAME}"
  355. }
  356. }
  357. },
  358. {
  359. "kind": "Route",
  360. "apiVersion": "v1",
  361. "id": "${APPLICATION_NAME}-https",
  362. "metadata": {
  363. "name": "secure-${APPLICATION_NAME}",
  364. "labels": {
  365. "application": "${APPLICATION_NAME}"
  366. },
  367. "annotations": {
  368. "description": "Route for application's HTTPS service."
  369. }
  370. },
  371. "spec": {
  372. "host": "${HOSTNAME_HTTPS}",
  373. "to": {
  374. "name": "secure-${APPLICATION_NAME}"
  375. },
  376. "tls": {
  377. "termination": "passthrough"
  378. }
  379. }
  380. },
  381. {
  382. "kind": "ImageStream",
  383. "apiVersion": "v1",
  384. "metadata": {
  385. "name": "${APPLICATION_NAME}",
  386. "labels": {
  387. "application": "${APPLICATION_NAME}"
  388. }
  389. }
  390. },
  391. {
  392. "kind": "BuildConfig",
  393. "apiVersion": "v1",
  394. "metadata": {
  395. "name": "${APPLICATION_NAME}",
  396. "labels": {
  397. "application": "${APPLICATION_NAME}"
  398. }
  399. },
  400. "spec": {
  401. "source": {
  402. "type": "Git",
  403. "git": {
  404. "uri": "${SOURCE_REPOSITORY_URL}",
  405. "ref": "${SOURCE_REPOSITORY_REF}"
  406. },
  407. "contextDir": "${CONTEXT_DIR}"
  408. },
  409. "strategy": {
  410. "type": "Source",
  411. "sourceStrategy": {
  412. "env": [
  413. {
  414. "name": "MAVEN_MIRROR_URL",
  415. "value": "${MAVEN_MIRROR_URL}"
  416. },
  417. {
  418. "name": "ARTIFACT_DIR",
  419. "value": "${ARTIFACT_DIR}"
  420. }
  421. ],
  422. "forcePull": true,
  423. "from": {
  424. "kind": "ImageStreamTag",
  425. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  426. "name": "jboss-eap64-openshift:1.5"
  427. }
  428. }
  429. },
  430. "output": {
  431. "to": {
  432. "kind": "ImageStreamTag",
  433. "name": "${APPLICATION_NAME}:latest"
  434. }
  435. },
  436. "triggers": [
  437. {
  438. "type": "GitHub",
  439. "github": {
  440. "secret": "${GITHUB_WEBHOOK_SECRET}"
  441. }
  442. },
  443. {
  444. "type": "Generic",
  445. "generic": {
  446. "secret": "${GENERIC_WEBHOOK_SECRET}"
  447. }
  448. },
  449. {
  450. "type": "ImageChange",
  451. "imageChange": {}
  452. },
  453. {
  454. "type": "ConfigChange"
  455. }
  456. ]
  457. }
  458. },
  459. {
  460. "kind": "DeploymentConfig",
  461. "apiVersion": "v1",
  462. "metadata": {
  463. "name": "${APPLICATION_NAME}",
  464. "labels": {
  465. "application": "${APPLICATION_NAME}"
  466. }
  467. },
  468. "spec": {
  469. "strategy": {
  470. "type": "Recreate"
  471. },
  472. "triggers": [
  473. {
  474. "type": "ImageChange",
  475. "imageChangeParams": {
  476. "automatic": true,
  477. "containerNames": [
  478. "${APPLICATION_NAME}"
  479. ],
  480. "from": {
  481. "kind": "ImageStreamTag",
  482. "name": "${APPLICATION_NAME}:latest"
  483. }
  484. }
  485. },
  486. {
  487. "type": "ConfigChange"
  488. }
  489. ],
  490. "replicas": 1,
  491. "selector": {
  492. "deploymentConfig": "${APPLICATION_NAME}"
  493. },
  494. "template": {
  495. "metadata": {
  496. "name": "${APPLICATION_NAME}",
  497. "labels": {
  498. "deploymentConfig": "${APPLICATION_NAME}",
  499. "application": "${APPLICATION_NAME}"
  500. }
  501. },
  502. "spec": {
  503. "serviceAccountName": "${SERVICE_ACCOUNT_NAME}",
  504. "terminationGracePeriodSeconds": 60,
  505. "containers": [
  506. {
  507. "name": "${APPLICATION_NAME}",
  508. "image": "${APPLICATION_NAME}",
  509. "imagePullPolicy": "Always",
  510. "volumeMounts": [
  511. {
  512. "name": "eap-keystore-volume",
  513. "mountPath": "/etc/eap-secret-volume",
  514. "readOnly": true
  515. },
  516. {
  517. "name": "eap-jgroups-keystore-volume",
  518. "mountPath": "/etc/jgroups-encrypt-secret-volume",
  519. "readOnly": true
  520. }
  521. ],
  522. "livenessProbe": {
  523. "exec": {
  524. "command": [
  525. "/bin/bash",
  526. "-c",
  527. "/opt/eap/bin/livenessProbe.sh"
  528. ]
  529. }
  530. },
  531. "readinessProbe": {
  532. "exec": {
  533. "command": [
  534. "/bin/bash",
  535. "-c",
  536. "/opt/eap/bin/readinessProbe.sh"
  537. ]
  538. }
  539. },
  540. "ports": [
  541. {
  542. "name": "jolokia",
  543. "containerPort": 8778,
  544. "protocol": "TCP"
  545. },
  546. {
  547. "name": "http",
  548. "containerPort": 8080,
  549. "protocol": "TCP"
  550. },
  551. {
  552. "name": "https",
  553. "containerPort": 8443,
  554. "protocol": "TCP"
  555. },
  556. {
  557. "name": "ping",
  558. "containerPort": 8888,
  559. "protocol": "TCP"
  560. }
  561. ],
  562. "env": [
  563. {
  564. "name": "MQ_SERVICE_PREFIX_MAPPING",
  565. "value": "${APPLICATION_NAME}-amq=MQ"
  566. },
  567. {
  568. "name": "MQ_JNDI",
  569. "value": "${MQ_JNDI}"
  570. },
  571. {
  572. "name": "MQ_USERNAME",
  573. "value": "${MQ_USERNAME}"
  574. },
  575. {
  576. "name": "MQ_PASSWORD",
  577. "value": "${MQ_PASSWORD}"
  578. },
  579. {
  580. "name": "MQ_PROTOCOL",
  581. "value": "tcp"
  582. },
  583. {
  584. "name": "MQ_QUEUES",
  585. "value": "${MQ_QUEUES}"
  586. },
  587. {
  588. "name": "MQ_TOPICS",
  589. "value": "${MQ_TOPICS}"
  590. },
  591. {
  592. "name": "MQ_SERIALIZABLE_PACKAGES",
  593. "value": "${MQ_SERIALIZABLE_PACKAGES}"
  594. },
  595. {
  596. "name": "OPENSHIFT_KUBE_PING_LABELS",
  597. "value": "application=${APPLICATION_NAME}"
  598. },
  599. {
  600. "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
  601. "valueFrom": {
  602. "fieldRef": {
  603. "fieldPath": "metadata.namespace"
  604. }
  605. }
  606. },
  607. {
  608. "name": "HTTPS_KEYSTORE_DIR",
  609. "value": "/etc/eap-secret-volume"
  610. },
  611. {
  612. "name": "HTTPS_KEYSTORE",
  613. "value": "${HTTPS_KEYSTORE}"
  614. },
  615. {
  616. "name": "HTTPS_KEYSTORE_TYPE",
  617. "value": "${HTTPS_KEYSTORE_TYPE}"
  618. },
  619. {
  620. "name": "HTTPS_NAME",
  621. "value": "${HTTPS_NAME}"
  622. },
  623. {
  624. "name": "HTTPS_PASSWORD",
  625. "value": "${HTTPS_PASSWORD}"
  626. },
  627. {
  628. "name": "JGROUPS_ENCRYPT_SECRET",
  629. "value": "${JGROUPS_ENCRYPT_SECRET}"
  630. },
  631. {
  632. "name": "JGROUPS_ENCRYPT_KEYSTORE_DIR",
  633. "value": "/etc/jgroups-encrypt-secret-volume"
  634. },
  635. {
  636. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  637. "value": "${JGROUPS_ENCRYPT_KEYSTORE}"
  638. },
  639. {
  640. "name": "JGROUPS_ENCRYPT_NAME",
  641. "value": "${JGROUPS_ENCRYPT_NAME}"
  642. },
  643. {
  644. "name": "JGROUPS_ENCRYPT_PASSWORD",
  645. "value": "${JGROUPS_ENCRYPT_PASSWORD}"
  646. },
  647. {
  648. "name": "JGROUPS_CLUSTER_PASSWORD",
  649. "value": "${JGROUPS_CLUSTER_PASSWORD}"
  650. },
  651. {
  652. "name": "AUTO_DEPLOY_EXPLODED",
  653. "value": "${AUTO_DEPLOY_EXPLODED}"
  654. }
  655. ]
  656. }
  657. ],
  658. "volumes": [
  659. {
  660. "name": "eap-keystore-volume",
  661. "secret": {
  662. "secretName": "${HTTPS_SECRET}"
  663. }
  664. },
  665. {
  666. "name": "eap-jgroups-keystore-volume",
  667. "secret": {
  668. "secretName": "${JGROUPS_ENCRYPT_SECRET}"
  669. }
  670. }
  671. ]
  672. }
  673. }
  674. }
  675. },
  676. {
  677. "kind": "DeploymentConfig",
  678. "apiVersion": "v1",
  679. "metadata": {
  680. "name": "${APPLICATION_NAME}-amq",
  681. "labels": {
  682. "application": "${APPLICATION_NAME}"
  683. }
  684. },
  685. "spec": {
  686. "strategy": {
  687. "type": "Rolling",
  688. "rollingParams": {
  689. "maxSurge": 0
  690. }
  691. },
  692. "triggers": [
  693. {
  694. "type": "ImageChange",
  695. "imageChangeParams": {
  696. "automatic": true,
  697. "containerNames": [
  698. "${APPLICATION_NAME}-amq"
  699. ],
  700. "from": {
  701. "kind": "ImageStreamTag",
  702. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  703. "name": "jboss-amq-62:1.4"
  704. }
  705. }
  706. },
  707. {
  708. "type": "ConfigChange"
  709. }
  710. ],
  711. "replicas": 1,
  712. "selector": {
  713. "deploymentConfig": "${APPLICATION_NAME}-amq"
  714. },
  715. "template": {
  716. "metadata": {
  717. "name": "${APPLICATION_NAME}-amq",
  718. "labels": {
  719. "deploymentConfig": "${APPLICATION_NAME}-amq",
  720. "application": "${APPLICATION_NAME}"
  721. }
  722. },
  723. "spec": {
  724. "terminationGracePeriodSeconds": 60,
  725. "containers": [
  726. {
  727. "name": "${APPLICATION_NAME}-amq",
  728. "image": "jboss-amq-62",
  729. "imagePullPolicy": "Always",
  730. "readinessProbe": {
  731. "exec": {
  732. "command": [
  733. "/bin/bash",
  734. "-c",
  735. "/opt/amq/bin/readinessProbe.sh"
  736. ]
  737. }
  738. },
  739. "ports": [
  740. {
  741. "name": "jolokia",
  742. "containerPort": 8778,
  743. "protocol": "TCP"
  744. },
  745. {
  746. "name": "amqp",
  747. "containerPort": 5672,
  748. "protocol": "TCP"
  749. },
  750. {
  751. "name": "amqp-ssl",
  752. "containerPort": 5671,
  753. "protocol": "TCP"
  754. },
  755. {
  756. "name": "mqtt",
  757. "containerPort": 1883,
  758. "protocol": "TCP"
  759. },
  760. {
  761. "name": "stomp",
  762. "containerPort": 61613,
  763. "protocol": "TCP"
  764. },
  765. {
  766. "name": "stomp-ssl",
  767. "containerPort": 61612,
  768. "protocol": "TCP"
  769. },
  770. {
  771. "name": "tcp",
  772. "containerPort": 61616,
  773. "protocol": "TCP"
  774. },
  775. {
  776. "name": "tcp-ssl",
  777. "containerPort": 61617,
  778. "protocol": "TCP"
  779. }
  780. ],
  781. "volumeMounts": [
  782. {
  783. "mountPath": "/opt/amq/data/kahadb",
  784. "name": "${APPLICATION_NAME}-amq-pvol"
  785. }
  786. ],
  787. "env": [
  788. {
  789. "name": "AMQ_USER",
  790. "value": "${MQ_USERNAME}"
  791. },
  792. {
  793. "name": "AMQ_PASSWORD",
  794. "value": "${MQ_PASSWORD}"
  795. },
  796. {
  797. "name": "AMQ_TRANSPORTS",
  798. "value": "${MQ_PROTOCOL}"
  799. },
  800. {
  801. "name": "AMQ_QUEUES",
  802. "value": "${MQ_QUEUES}"
  803. },
  804. {
  805. "name": "AMQ_TOPICS",
  806. "value": "${MQ_TOPICS}"
  807. },
  808. {
  809. "name": "MQ_SERIALIZABLE_PACKAGES",
  810. "value": "${MQ_SERIALIZABLE_PACKAGES}"
  811. },
  812. {
  813. "name": "AMQ_SPLIT",
  814. "value": "${AMQ_SPLIT}"
  815. },
  816. {
  817. "name": "AMQ_MESH_DISCOVERY_TYPE",
  818. "value": "${AMQ_MESH_DISCOVERY_TYPE}"
  819. },
  820. {
  821. "name": "AMQ_MESH_SERVICE_NAME",
  822. "value": "${APPLICATION_NAME}-amq-tcp"
  823. },
  824. {
  825. "name": "AMQ_MESH_SERVICE_NAMESPACE",
  826. "valueFrom": {
  827. "fieldRef": {
  828. "fieldPath": "metadata.namespace"
  829. }
  830. }
  831. },
  832. {
  833. "name": "AMQ_STORAGE_USAGE_LIMIT",
  834. "value": "${AMQ_STORAGE_USAGE_LIMIT}"
  835. }
  836. ]
  837. }
  838. ],
  839. "volumes": [
  840. {
  841. "name": "${APPLICATION_NAME}-amq-pvol",
  842. "persistentVolumeClaim": {
  843. "claimName": "${APPLICATION_NAME}-amq-claim"
  844. }
  845. }
  846. ]
  847. }
  848. }
  849. }
  850. },
  851. {
  852. "apiVersion": "v1",
  853. "kind": "PersistentVolumeClaim",
  854. "metadata": {
  855. "name": "${APPLICATION_NAME}-amq-claim",
  856. "labels": {
  857. "application": "${APPLICATION_NAME}"
  858. }
  859. },
  860. "spec": {
  861. "accessModes": [
  862. "ReadWriteOnce"
  863. ],
  864. "resources": {
  865. "requests": {
  866. "storage": "${VOLUME_CAPACITY}"
  867. }
  868. }
  869. }
  870. }
  871. ]
  872. }