Running Keycloak on OpenShift 3

Shoubhik Bose
2 min readJun 16, 2017

--

Deployment of an SSO Server made easy

Keycloak is an open source identity and access management solution and is a part of Red Hat Community of projects. We use Keycloak for Single Sign On ( SSO ) in OpenShift.io . In this post, I will show you how to deploy a Keycloak Server on OpenShift Online.

All credits to Hector for his work on getting Keycloak deployment-ready on OpenShift for OpenShift.io

Prerequisites

I’ve used a hosted OpenShift cluster to deploy Keycloak but you could use a self-hosted or local OpenShift cluster using MiniShift. Login using the command line tool oc

Create a new project

The keycloak application and its database will be installed ‘inside’ this OpenShift project. You can create a new project by doing a oc new-project keycloak-blog after logging in.

Write a template for the database

Insert the template into your OpenShift project

Create a new ‘app’ using the template

Write a template for the web app

Create the template inside your project

Consume the above template to create an app

here, keycloak-server is the name of the template found inside the file as metadata.

On your browser, open OpenShift Dashboard and ‘enter’ the ‘keycloak blog project’.

The external route for the service has been created and the URL is visible on the top right. Click on the URL and see the web app in action!

In the upcoming blog, I will show you how to configure Keycloak to give your app what it needs to be able to login using 3rd party Identity providers like Github.

--

--