eap-cd-amq-persistent-s2i.json 40 KB

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