Building RocketChat as an ansible playbook bundle on OpenShift Container platform (fix for ocp 3.7)

  • laurent 

The current apb-1.0.4-1.el7.noarch in OpenShift 3.7 enterprise from the rhel-7-server-ose-3.7-rpms channel is currently broken. When you try to list apb’s you will get the following error:

Now I will show you how you can fix this. It is important to follow the steps in the order. If not you will get another “missing configuration error if you install the apb directly from the repo I am adding below. Please also check if there is a new package downstream before you follow the fix instructions.

FIX apb

Step 1. Enable the rhel-7-server-ose-3.7-rpms

Step 2. Install the apb package. This will also pull in some dependencies which you need!

Step 3. disable the rhel-7-server-ose-3.7-rpms repo

Step 4. remove the apb you just installed. This will not remove the dependencies.

Step 5. Add the following repo to /etc/yum.repos.d/

Step 6. Install the update apb

Fix Done

Step 7. Go read this awesome blog post by Dylan Murray  Rocket Chat Ansible Playbook Bundle . We will not use the configs of it. Instead we will go and checkout the following git repository:

Make sure you are logged in as a user with cluster admin rights. In my case I created user during install called admin. This is how you can give admin rights to the user:

Step 8. cd into the /dockerhub directory

Step 9. Edit the apb.yml file as described in the tutorial I linked to.

Step 10. After you edited the roles deprovision-rocketchat-apb  provision-rocketchat-apb you can now build the apb

Step 11. next push the image

Step 11.  list the apb to make sure its there

Step 12. Login to OpenShift. Please do NOT launch it yet if you do not have dynamic storage provisioning enabled as the mongo-db needs a persistent volume and you need to adjust the broker-config yet to pull from the correct registry. Go to the openshift-ansible-service-broker project.

The installation for the ansible_service_broker in 3.7 OCP pulls the wrong image so your broker will not run. I submitted a fix here:

Make sure the broker is running and has the correct image.

Step 13. Edit the broker config of the apb

Step 14. Add the following to it and save.

Step  15. Re deploy the service broker. You should see a second pod coming up

Step 16. If everything os ok you should see this:

Step 17. If you have dynamic storage provisioning enabled you can now go ahead and build the rocketchat app. If you don’t and you have NFS storage like me, go create the pv

Step 18. Go and create the pv

Step 19. You are now officially ready to build the rocket chat app. Go to the service catalog and click on it

Step 20. Fill out all information needed. I would recommend to create a new project. Hit create.

Step 21. Go to your project and sit back and enjoy. If everything is build ok you will see the following screen.

Step 22. Click on the link to use the application

Step 23. If you want to remove the apb run apb list and use the uuid with oc delete as shown below.

A video of the entire process can be seen here:

Leave a Reply

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


This site uses Akismet to reduce spam. Learn how your comment data is processed.