Set up an external database on Red Hat Single Sign-On for Openshift
Environment
- Red Hat Single Sign-On (RH-SSO)
- 7.2 or later
- Red Hat Openshift Container Platform (OCP)
- 3 or later
- External Database instance
Issue
- Deploying while using an external database instance
- Example usage
- Externalize DB in image
Resolution
Refer to RH-SSO 7.4: Connecting to an external database.
For Red Hat Single Sign-On 7.3, refer to RH-SSO 7.3: Connecting to an external database. Note that the documentation has a broken link. It should point to Assigning an IP Address to the Service.
If you are using, Red Hat Single Sign-On 7.2, the following provides some workarounds that may assist you:
Disclaimer: Links contained herein to an external website(s) are provided for convenience only. Red Hat has not reviewed the links and is not responsible for the content or its availability. The inclusion of any link to an external website does not imply endorsement by Red Hat of the website or their entities, products or services. You agree that Red Hat is not responsible or liable for any loss or expenses that may result due to your use of (or reliance on) the external site or content.
Examples using PostgreSQL:
These should work for any database, though the variables can be changed.
- Using an external Postgresql database with RH-SSO for Openshift with a
README.md
detailing all the steps to use this configuration example.- This example uses the environment variables like the default RH-SSO PostgreSQL image.
- This case suffered from an issue CLOUD-3198 where strips off additional parameters from the connection string, though it has been corrected.
- Using the JBoss CLI to configure an external Postgresql database with RH-SSO for Openshift
- This example sets up a hook that runs a RH-SSO CLI script. It allows for the most customization, but it works very differently from the default images.
Root Cause
There was an issue where DB_URL
, when assigned, would be truncated if it had &
characters or it was not used properly. This has been corrected. More information can be found in this jira: https://issues.redhat.com/browse/KEYCLOAK-10184.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments