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

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