sso72-x509-https.json 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368
  1. {
  2. "kind": "Template",
  3. "apiVersion": "v1",
  4. "metadata": {
  5. "annotations": {
  6. "iconClass" : "icon-sso",
  7. "tags" : "sso,keycloak,jboss",
  8. "version": "1.4.14",
  9. "openshift.io/display-name": "Red Hat Single Sign-On 7.2 (Ephemeral)",
  10. "openshift.io/provider-display-name": "Red Hat, Inc.",
  11. "description": "An example RH-SSO 7 application. For more information about using this template, see https://github.com/jboss-openshift/application-templates.",
  12. "template.openshift.io/long-description": "This template defines resources needed to develop Red Hat Single Sign-On 7.2 server based deployment, securing RH-SSO communication using re-encrypt TLS.",
  13. "template.openshift.io/documentation-url": "https://access.redhat.com/documentation/en/red-hat-single-sign-on/",
  14. "template.openshift.io/support-url": "https://access.redhat.com"
  15. },
  16. "name": "sso72-x509-https"
  17. },
  18. "labels": {
  19. "template": "sso72-x509-https",
  20. "xpaas": "1.4.14"
  21. },
  22. "message": "A new RH-SSO service has been created in your project. The admin username/password for accessing the master realm via the RH-SSO console is ${SSO_ADMIN_USERNAME}/${SSO_ADMIN_PASSWORD}. The HTTPS keystore used for serving secure content, the JGroups keystore used for securing JGroups communications, and server truststore used for securing RH-SSO requests were automatically created via OpenShift's service serving x509 certificate secrets.",
  23. "parameters": [
  24. {
  25. "displayName": "Application Name",
  26. "description": "The name for the application.",
  27. "name": "APPLICATION_NAME",
  28. "value": "sso",
  29. "required": true
  30. },
  31. {
  32. "displayName": "JGroups Cluster Password",
  33. "description": "The password for the JGroups cluster.",
  34. "name": "JGROUPS_CLUSTER_PASSWORD",
  35. "from": "[a-zA-Z0-9]{32}",
  36. "generate": "expression",
  37. "required": true
  38. },
  39. {
  40. "displayName": "Datasource Minimum Pool Size",
  41. "description": "Sets xa-pool/min-pool-size for the configured datasource.",
  42. "name": "DB_MIN_POOL_SIZE",
  43. "required": false
  44. },
  45. {
  46. "displayName": "Datasource Maximum Pool Size",
  47. "description": "Sets xa-pool/max-pool-size for the configured datasource.",
  48. "name": "DB_MAX_POOL_SIZE",
  49. "required": false
  50. },
  51. {
  52. "displayName": "Datasource Transaction Isolation",
  53. "description": "Sets transaction-isolation for the configured datasource.",
  54. "name": "DB_TX_ISOLATION",
  55. "required": false
  56. },
  57. {
  58. "displayName": "ImageStream Namespace",
  59. "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.",
  60. "name": "IMAGE_STREAM_NAMESPACE",
  61. "value": "openshift",
  62. "required": true
  63. },
  64. {
  65. "displayName": "RH-SSO Administrator Username",
  66. "description": "RH-SSO Server administrator username",
  67. "name": "SSO_ADMIN_USERNAME",
  68. "from": "[a-zA-Z0-9]{8}",
  69. "generate": "expression",
  70. "required": true
  71. },
  72. {
  73. "displayName": "RH-SSO Administrator Password",
  74. "description": "RH-SSO Server admininistrator password",
  75. "name": "SSO_ADMIN_PASSWORD",
  76. "from": "[a-zA-Z0-9]{32}",
  77. "generate": "expression",
  78. "required": true
  79. },
  80. {
  81. "displayName": "RH-SSO Realm",
  82. "description": "Realm to be created in the RH-SSO server (e.g. demorealm).",
  83. "name": "SSO_REALM",
  84. "value": "",
  85. "required": false
  86. },
  87. {
  88. "displayName": "RH-SSO Service Username",
  89. "description": "The username used to access the RH-SSO service. This is used by clients to create the appliction client(s) within the specified RH-SSO realm.",
  90. "name": "SSO_SERVICE_USERNAME",
  91. "value": "",
  92. "required": false
  93. },
  94. {
  95. "displayName": "RH-SSO Service Password",
  96. "description": "The password for the RH-SSO service user.",
  97. "name": "SSO_SERVICE_PASSWORD",
  98. "value": "",
  99. "required": false
  100. },
  101. {
  102. "displayName": "Container Memory Limit",
  103. "description": "Container memory limit.",
  104. "name": "MEMORY_LIMIT",
  105. "value": "1Gi",
  106. "required": false
  107. }
  108. ],
  109. "objects": [
  110. {
  111. "kind": "Service",
  112. "apiVersion": "v1",
  113. "spec": {
  114. "ports": [
  115. {
  116. "port": 8443,
  117. "targetPort": 8443
  118. }
  119. ],
  120. "selector": {
  121. "deploymentConfig": "${APPLICATION_NAME}"
  122. }
  123. },
  124. "metadata": {
  125. "name": "${APPLICATION_NAME}",
  126. "labels": {
  127. "application": "${APPLICATION_NAME}"
  128. },
  129. "annotations": {
  130. "description": "The web server's https port.",
  131. "service.alpha.openshift.io/serving-cert-secret-name": "sso-x509-https-secret"
  132. }
  133. }
  134. },
  135. {
  136. "kind": "Service",
  137. "apiVersion": "v1",
  138. "spec": {
  139. "clusterIP": "None",
  140. "ports": [
  141. {
  142. "name": "ping",
  143. "port": 8888
  144. }
  145. ],
  146. "selector": {
  147. "deploymentConfig": "${APPLICATION_NAME}"
  148. }
  149. },
  150. "metadata": {
  151. "name": "${APPLICATION_NAME}-ping",
  152. "labels": {
  153. "application": "${APPLICATION_NAME}"
  154. },
  155. "annotations": {
  156. "service.alpha.kubernetes.io/tolerate-unready-endpoints": "true",
  157. "service.alpha.openshift.io/serving-cert-secret-name": "sso-x509-jgroups-secret",
  158. "description": "The JGroups ping port for clustering."
  159. }
  160. }
  161. },
  162. {
  163. "kind": "Route",
  164. "apiVersion": "v1",
  165. "id": "${APPLICATION_NAME}-https",
  166. "metadata": {
  167. "name": "${APPLICATION_NAME}",
  168. "labels": {
  169. "application": "${APPLICATION_NAME}"
  170. },
  171. "annotations": {
  172. "description": "Route for application's https service."
  173. }
  174. },
  175. "spec": {
  176. "to": {
  177. "name": "${APPLICATION_NAME}"
  178. },
  179. "tls": {
  180. "termination": "reencrypt"
  181. }
  182. }
  183. },
  184. {
  185. "kind": "DeploymentConfig",
  186. "apiVersion": "v1",
  187. "metadata": {
  188. "name": "${APPLICATION_NAME}",
  189. "labels": {
  190. "application": "${APPLICATION_NAME}"
  191. }
  192. },
  193. "spec": {
  194. "strategy": {
  195. "type": "Recreate"
  196. },
  197. "triggers": [
  198. {
  199. "type": "ImageChange",
  200. "imageChangeParams": {
  201. "automatic": true,
  202. "containerNames": [
  203. "${APPLICATION_NAME}"
  204. ],
  205. "from": {
  206. "kind": "ImageStreamTag",
  207. "namespace": "${IMAGE_STREAM_NAMESPACE}",
  208. "name": "redhat-sso72-openshift:1.2"
  209. }
  210. }
  211. },
  212. {
  213. "type": "ConfigChange"
  214. }
  215. ],
  216. "replicas": 1,
  217. "selector": {
  218. "deploymentConfig": "${APPLICATION_NAME}"
  219. },
  220. "template": {
  221. "metadata": {
  222. "name": "${APPLICATION_NAME}",
  223. "labels": {
  224. "deploymentConfig": "${APPLICATION_NAME}",
  225. "application": "${APPLICATION_NAME}"
  226. }
  227. },
  228. "spec": {
  229. "terminationGracePeriodSeconds": 75,
  230. "containers": [
  231. {
  232. "name": "${APPLICATION_NAME}",
  233. "image": "${APPLICATION_NAME}",
  234. "imagePullPolicy": "Always",
  235. "resources": {
  236. "limits": {
  237. "memory": "${MEMORY_LIMIT}"
  238. }
  239. },
  240. "volumeMounts": [
  241. {
  242. "name": "sso-x509-https-volume",
  243. "mountPath": "/etc/x509/https",
  244. "readOnly": true
  245. },
  246. {
  247. "name": "sso-x509-jgroups-volume",
  248. "mountPath": "/etc/x509/jgroups",
  249. "readOnly": true
  250. }
  251. ],
  252. "livenessProbe": {
  253. "exec": {
  254. "command": [
  255. "/bin/bash",
  256. "-c",
  257. "/opt/eap/bin/livenessProbe.sh"
  258. ]
  259. },
  260. "initialDelaySeconds": 60
  261. },
  262. "readinessProbe": {
  263. "exec": {
  264. "command": [
  265. "/bin/bash",
  266. "-c",
  267. "/opt/eap/bin/readinessProbe.sh"
  268. ]
  269. }
  270. },
  271. "ports": [
  272. {
  273. "name": "jolokia",
  274. "containerPort": 8778,
  275. "protocol": "TCP"
  276. },
  277. {
  278. "name": "http",
  279. "containerPort": 8080,
  280. "protocol": "TCP"
  281. },
  282. {
  283. "name": "https",
  284. "containerPort": 8443,
  285. "protocol": "TCP"
  286. },
  287. {
  288. "name": "ping",
  289. "containerPort": 8888,
  290. "protocol": "TCP"
  291. }
  292. ],
  293. "env": [
  294. {
  295. "name": "DB_MIN_POOL_SIZE",
  296. "value": "${DB_MIN_POOL_SIZE}"
  297. },
  298. {
  299. "name": "DB_MAX_POOL_SIZE",
  300. "value": "${DB_MAX_POOL_SIZE}"
  301. },
  302. {
  303. "name": "DB_TX_ISOLATION",
  304. "value": "${DB_TX_ISOLATION}"
  305. },
  306. {
  307. "name": "JGROUPS_PING_PROTOCOL",
  308. "value": "openshift.DNS_PING"
  309. },
  310. {
  311. "name": "OPENSHIFT_DNS_PING_SERVICE_NAME",
  312. "value": "${APPLICATION_NAME}-ping"
  313. },
  314. {
  315. "name": "OPENSHIFT_DNS_PING_SERVICE_PORT",
  316. "value": "8888"
  317. },
  318. {
  319. "name": "X509_CA_BUNDLE",
  320. "value": "/var/run/secrets/kubernetes.io/serviceaccount/service-ca.crt"
  321. },
  322. {
  323. "name": "JGROUPS_CLUSTER_PASSWORD",
  324. "value": "${JGROUPS_CLUSTER_PASSWORD}"
  325. },
  326. {
  327. "name": "SSO_ADMIN_USERNAME",
  328. "value": "${SSO_ADMIN_USERNAME}"
  329. },
  330. {
  331. "name": "SSO_ADMIN_PASSWORD",
  332. "value": "${SSO_ADMIN_PASSWORD}"
  333. },
  334. {
  335. "name": "SSO_REALM",
  336. "value": "${SSO_REALM}"
  337. },
  338. {
  339. "name": "SSO_SERVICE_USERNAME",
  340. "value": "${SSO_SERVICE_USERNAME}"
  341. },
  342. {
  343. "name": "SSO_SERVICE_PASSWORD",
  344. "value": "${SSO_SERVICE_PASSWORD}"
  345. }
  346. ]
  347. }
  348. ],
  349. "volumes": [
  350. {
  351. "name": "sso-x509-https-volume",
  352. "secret": {
  353. "secretName": "sso-x509-https-secret"
  354. }
  355. },
  356. {
  357. "name": "sso-x509-jgroups-volume",
  358. "secret": {
  359. "secretName": "sso-x509-jgroups-secret"
  360. }
  361. }
  362. ]
  363. }
  364. }
  365. }
  366. }
  367. ]
  368. }