Deploying a RocketChat server on Openshift

On a recent customer project I needed to set up some collaborative tools to allow me to work remotely with my clients. Neither Red Hat-hosted, nor client-hosted tooling was suitable so we looked to the usual hosted services such as GitHub, Google Drive and BlueJeans.

However, we drew a blank on a secure chat server. Various options, such as Google Hangouts were considered and discarded. Finally I turned to RocketChat, which we use very successfully in Red Hat Consulting.

The obvious place to deploy RocketChat would be in an AWS instance, however a better solution is to use the containerised version. There are various instructions on deploying containerised RocketChat on different container platforms, but no simple instructions on how to deploy on OpenShift. How easy is it to deploy a fully-secured RocketChat server on OpenShift Online?

Very easy it turns out, in fact once you have logged in to OpenShift (using the oc login command) you can do it with just 4 commands:

oc new-project rocketchat
oc new-app mongodb:latest -e MONGODB_ADMIN_PASSWORD=adminpassword \
-e MONGODB_USER=rocketchat -e MONGODB_PASSWORD=userpassword \
-e MONGODB_DATABASE=rocketchat
oc new-app rocketchat/rocket.chat:latest \
-e MONGO_URL=mongodb://rocketchat:userpassword@mongodb.rocketchat.svc:27017/rocketchat
oc create route edge --service=rocketchat

Walking through what this does:
1. We create a new namespace in which to host our application
2. We deploy a Mongo database, setting some startup parameters
3. We deploy the RocketChat container, passing in the location of the mongodb. Note how we use the SkyDNS hostname of the service that has been automatically created for the Mongo database.
4. Finally we create an edge-terminated TLS public route to the automatically-created rocketchat service.

And it really is that simple, no messing about with certificates or nginx, no deploying of AWS servers – a highly available, secured RocketChat server deployed in under a minute!

Spread the love

Leave a Reply

Your email address will not be published. Required fields are marked *