sso70-basic.json 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "description": "Application template for SSO 7.0",
  7. "iconClass" : "icon-jboss",
  8. "tags" : "sso,keycloak,java,jboss,xpaas",
  9. "version" : "1.3"
  10. },
  11. "name": "sso70-basic"
  12. },
  13. "labels": {
  14. "template": "sso70-basic",
  15. "xpaas" : "1.3.0"
  16. },
  17. "parameters": [
  18. {
  19. "description": "The name for the application.",
  20. "name": "APPLICATION_NAME",
  21. "value": "sso",
  22. "required": true
  23. },
  24. {
  25. "description": "Custom hostname for http service route. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
  26. "name": "HOSTNAME_HTTP",
  27. "value": "",
  28. "required": false
  29. },
  30. {
  31. "description": "Custom hostname for https service route. Leave blank for default hostname, e.g.: <application-name>.<project>.<default-domain-suffix>",
  32. "name": "HOSTNAME_HTTPS",
  33. "value": "",
  34. "required": false
  35. },
  36. {
  37. "description": "The name of the secret containing the keystore file",
  38. "name": "HTTPS_SECRET",
  39. "value": "sso-app-secret",
  40. "required": false
  41. },
  42. {
  43. "description": "The name of the keystore file within the secret",
  44. "name": "HTTPS_KEYSTORE",
  45. "value": "keystore.jks",
  46. "required": false
  47. },
  48. {
  49. "description": "The name associated with the server certificate",
  50. "name": "HTTPS_NAME",
  51. "value": "jboss",
  52. "required": false
  53. },
  54. {
  55. "description": "The password for the keystore and certificate",
  56. "name": "HTTPS_PASSWORD",
  57. "value": "mykeystorepass",
  58. "required": false
  59. },
  60. {
  61. "description": "Sets xa-pool/min-pool-size for the configured datasource.",
  62. "name": "DB_MIN_POOL_SIZE",
  63. "required": false
  64. },
  65. {
  66. "description": "Sets xa-pool/max-pool-size for the configured datasource.",
  67. "name": "DB_MAX_POOL_SIZE",
  68. "required": false
  69. },
  70. {
  71. "description": "Sets transaction-isolation for the configured datasource.",
  72. "name": "DB_TX_ISOLATION",
  73. "required": false
  74. },
  75. {
  76. "description": "HornetQ cluster admin password",
  77. "name": "HORNETQ_CLUSTER_PASSWORD",
  78. "from": "[a-zA-Z0-9]{8}",
  79. "generate": "expression",
  80. "required": true
  81. },
  82. {
  83. "description": "Queue names",
  84. "name": "HORNETQ_QUEUES",
  85. "value": "",
  86. "required": false
  87. },
  88. {
  89. "description": "Topic names",
  90. "name": "HORNETQ_TOPICS",
  91. "value": "",
  92. "required": false
  93. },
  94. {
  95. "description": "The name of the secret containing the keystore file",
  96. "name": "JGROUPS_ENCRYPT_SECRET",
  97. "value": "eap-app-secret",
  98. "required": false
  99. },
  100. {
  101. "description": "The name of the keystore file within the secret",
  102. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  103. "value": "jgroups.jceks",
  104. "required": false
  105. },
  106. {
  107. "description": "The name associated with the server certificate",
  108. "name": "JGROUPS_ENCRYPT_NAME",
  109. "value": "secret-key",
  110. "required": false
  111. },
  112. {
  113. "description": "The password for the keystore and certificate",
  114. "name": "JGROUPS_ENCRYPT_PASSWORD",
  115. "value": "password",
  116. "required": false
  117. },
  118. {
  119. "description": "JGroups cluster password",
  120. "name": "JGROUPS_CLUSTER_PASSWORD",
  121. "from": "[a-zA-Z0-9]{8}",
  122. "generate": "expression",
  123. "required": true
  124. },
  125. {
  126. "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.",
  127. "name": "IMAGE_STREAM_NAMESPACE",
  128. "value": "openshift",
  129. "required": true
  130. }
  131. ],
  132. "objects": [
  133. {
  134. "kind": "Service",
  135. "apiVersion": "v1",
  136. "spec": {
  137. "ports": [
  138. {
  139. "port": 8080,
  140. "targetPort": 8080
  141. }
  142. ],
  143. "selector": {
  144. "deploymentConfig": "${APPLICATION_NAME}"
  145. }
  146. },
  147. "metadata": {
  148. "name": "${APPLICATION_NAME}",
  149. "labels": {
  150. "application": "${APPLICATION_NAME}"
  151. },
  152. "annotations": {
  153. "description": "The web server's http port."
  154. }
  155. }
  156. },
  157. {
  158. "kind": "Service",
  159. "apiVersion": "v1",
  160. "spec": {
  161. "ports": [
  162. {
  163. "port": 8443,
  164. "targetPort": 8443
  165. }
  166. ],
  167. "selector": {
  168. "deploymentConfig": "${APPLICATION_NAME}"
  169. }
  170. },
  171. "metadata": {
  172. "name": "secure-${APPLICATION_NAME}",
  173. "labels": {
  174. "application": "${APPLICATION_NAME}"
  175. },
  176. "annotations": {
  177. "description": "The web server's https port."
  178. }
  179. }
  180. },
  181. {
  182. "kind": "Service",
  183. "apiVersion": "v1",
  184. "spec": {
  185. "ports": [
  186. {
  187. "port": 5432,
  188. "targetPort": 5432
  189. }
  190. ],
  191. "selector": {
  192. "deploymentConfig": "${APPLICATION_NAME}-basic"
  193. }
  194. },
  195. "metadata": {
  196. "name": "${APPLICATION_NAME}-basic",
  197. "labels": {
  198. "application": "${APPLICATION_NAME}"
  199. },
  200. "annotations": {
  201. "description": "The database server's port."
  202. }
  203. }
  204. },
  205. {
  206. "kind": "Route",
  207. "apiVersion": "v1",
  208. "id": "${APPLICATION_NAME}-http",
  209. "metadata": {
  210. "name": "${APPLICATION_NAME}",
  211. "labels": {
  212. "application": "${APPLICATION_NAME}"
  213. },
  214. "annotations": {
  215. "description": "Route for application's http service."
  216. }
  217. },
  218. "spec": {
  219. "host": "${HOSTNAME_HTTP}",
  220. "to": {
  221. "name": "${APPLICATION_NAME}"
  222. }
  223. }
  224. },
  225. {
  226. "kind": "Route",
  227. "apiVersion": "v1",
  228. "id": "${APPLICATION_NAME}-https",
  229. "metadata": {
  230. "name": "secure-${APPLICATION_NAME}",
  231. "labels": {
  232. "application": "${APPLICATION_NAME}"
  233. },
  234. "annotations": {
  235. "description": "Route for application's https service."
  236. }
  237. },
  238. "spec": {
  239. "host": "${HOSTNAME_HTTPS}",
  240. "to": {
  241. "name": "secure-${APPLICATION_NAME}"
  242. },
  243. "tls": {
  244. "termination": "passthrough"
  245. }
  246. }
  247. },
  248. {
  249. "kind": "DeploymentConfig",
  250. "apiVersion": "v1",
  251. "metadata": {
  252. "name": "${APPLICATION_NAME}",
  253. "labels": {
  254. "application": "${APPLICATION_NAME}"
  255. }
  256. },
  257. "spec": {
  258. "strategy": {
  259. "type": "Recreate"
  260. },
  261. "triggers": [
  262. {
  263. "type": "ImageChange",
  264. "imageChangeParams": {
  265. "automatic": true,
  266. "containerNames": [
  267. "${APPLICATION_NAME}"
  268. ],
  269. "from": {
  270. "kind": "ImageStreamTag",
  271. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  272. "name": "redhat-sso70-openshift:1.3-TP"
  273. }
  274. }
  275. },
  276. {
  277. "type": "ConfigChange"
  278. }
  279. ],
  280. "replicas": 1,
  281. "selector": {
  282. "deploymentConfig": "${APPLICATION_NAME}"
  283. },
  284. "template": {
  285. "metadata": {
  286. "name": "${APPLICATION_NAME}",
  287. "labels": {
  288. "deploymentConfig": "${APPLICATION_NAME}",
  289. "application": "${APPLICATION_NAME}"
  290. }
  291. },
  292. "spec": {
  293. "serviceAccountName": "sso-service-account",
  294. "terminationGracePeriodSeconds": 60,
  295. "containers": [
  296. {
  297. "name": "${APPLICATION_NAME}",
  298. "image": "${APPLICATION_NAME}",
  299. "imagePullPolicy": "Always",
  300. "volumeMounts": [
  301. {
  302. "name": "eap-keystore-volume",
  303. "mountPath": "/etc/eap-secret-volume",
  304. "readOnly": true
  305. },
  306. {
  307. "name": "eap-jgroups-keystore-volume",
  308. "mountPath": "/etc/jgroups-encrypt-secret-volume",
  309. "readOnly": true
  310. }
  311. ],
  312. "livenessProbe": {
  313. "exec": {
  314. "command": [
  315. "/bin/bash",
  316. "-c",
  317. "/opt/eap/bin/livenessProbe.sh"
  318. ]
  319. }
  320. },
  321. "readinessProbe": {
  322. "exec": {
  323. "command": [
  324. "/bin/bash",
  325. "-c",
  326. "/opt/eap/bin/readinessProbe.sh"
  327. ]
  328. }
  329. },
  330. "ports": [
  331. {
  332. "name": "jolokia",
  333. "containerPort": 8778,
  334. "protocol": "TCP"
  335. },
  336. {
  337. "name": "http",
  338. "containerPort": 8080,
  339. "protocol": "TCP"
  340. },
  341. {
  342. "name": "https",
  343. "containerPort": 8443,
  344. "protocol": "TCP"
  345. }
  346. ],
  347. "env": [
  348. {
  349. "name": "DB_MIN_POOL_SIZE",
  350. "value": "${DB_MIN_POOL_SIZE}"
  351. },
  352. {
  353. "name": "DB_MAX_POOL_SIZE",
  354. "value": "${DB_MAX_POOL_SIZE}"
  355. },
  356. {
  357. "name": "DB_TX_ISOLATION",
  358. "value": "${DB_TX_ISOLATION}"
  359. },
  360. {
  361. "name": "OPENSHIFT_KUBE_PING_LABELS",
  362. "value": "application=${APPLICATION_NAME}"
  363. },
  364. {
  365. "name": "OPENSHIFT_KUBE_PING_NAMESPACE",
  366. "valueFrom": {
  367. "fieldRef": {
  368. "fieldPath": "metadata.namespace"
  369. }
  370. }
  371. },
  372. {
  373. "name": "EAP_HTTPS_KEYSTORE_DIR",
  374. "value": "/etc/eap-secret-volume"
  375. },
  376. {
  377. "name": "EAP_HTTPS_KEYSTORE",
  378. "value": "${HTTPS_KEYSTORE}"
  379. },
  380. {
  381. "name": "EAP_HTTPS_NAME",
  382. "value": "${HTTPS_NAME}"
  383. },
  384. {
  385. "name": "EAP_HTTPS_PASSWORD",
  386. "value": "${HTTPS_PASSWORD}"
  387. },
  388. {
  389. "name": "HORNETQ_CLUSTER_PASSWORD",
  390. "value": "${HORNETQ_CLUSTER_PASSWORD}"
  391. },
  392. {
  393. "name": "HORNETQ_QUEUES",
  394. "value": "${HORNETQ_QUEUES}"
  395. },
  396. {
  397. "name": "HORNETQ_TOPICS",
  398. "value": "${HORNETQ_TOPICS}"
  399. },
  400. {
  401. "name": "JGROUPS_ENCRYPT_SECRET",
  402. "value": "${JGROUPS_ENCRYPT_SECRET}"
  403. },
  404. {
  405. "name": "JGROUPS_ENCRYPT_KEYSTORE_DIR",
  406. "value": "/etc/jgroups-encrypt-secret-volume"
  407. },
  408. {
  409. "name": "JGROUPS_ENCRYPT_KEYSTORE",
  410. "value": "${JGROUPS_ENCRYPT_KEYSTORE}"
  411. },
  412. {
  413. "name": "JGROUPS_ENCRYPT_NAME",
  414. "value": "${JGROUPS_ENCRYPT_NAME}"
  415. },
  416. {
  417. "name": "JGROUPS_ENCRYPT_PASSWORD",
  418. "value": "${JGROUPS_ENCRYPT_PASSWORD}"
  419. },
  420. {
  421. "name": "JGROUPS_CLUSTER_PASSWORD",
  422. "value": "${JGROUPS_CLUSTER_PASSWORD}"
  423. }
  424. ]
  425. }
  426. ],
  427. "volumes": [
  428. {
  429. "name": "eap-keystore-volume",
  430. "secret": {
  431. "secretName": "${HTTPS_SECRET}"
  432. }
  433. },
  434. {
  435. "name": "eap-jgroups-keystore-volume",
  436. "secret": {
  437. "secretName": "${JGROUPS_ENCRYPT_SECRET}"
  438. }
  439. }
  440. ]
  441. }
  442. }
  443. }
  444. }
  445. ]
  446. }