eap-cd-tx-recovery-s2i.json 41 KB

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