Deploying WordPress on RedHat Openshift 3 Within 15 Minutes

Spread the love

This post based on my own experience using Openshift DevOps. If you don’t know what Openshift, it is a computer software product from Red Hat for container-based software deployment and management [1]. You can develop some applications using this service, including PHP and MySQL as base of WordPress CMS building. So it’s so closed to realize WordPress installation without third party tools like Softaculous or Webuzo[3].

Creating Project and Database

The 1st step is simply creating Project. Just fill your project a name, display name, and also description if you want. But you have to remember that your project names must be unique across the OpenShift 3 cluster you are using.

The 2nd step is deploying a persistent MySQL database to hold all of the information required for our site. In this step, there are some form fields to filled in :

  • MySQL Connection Username
  • MySQL Connection Password
  • MySQL root user Password
  • MySQL Database Name

Always remember to keep those information above on your notes, because it will used on next step.

Deploying wordpress

The last step is crucial, because Openshift 3 not provide WordPress deployment as their default services. You’ll need WordPress source project to do this, and source project from Github is the best choice. Just open your browser and open this URL

https://github.com/budisanto/WordPress

and click the Fork button in the right hand corner.

Go back to OpenShift Online 3 and select Add to Project, search for “PHP” and select 7.0, the latest version. After you have clicked on Select, you will need to give your application a name as well as provide the Git Repository you want to use. I used “wordpress” for the name and the Git Repository that I forked earlier in this step.

Change the Deployment Strategy

By default, OpenShift will use a Rolling deployment strategy when making changes to an application. In subsequent steps we will attach persistent storage to the WordPress application, so we need to switch to the Recreate deployment strategy to work with the type of persistent storage available.

From the left hand menu, select Deployments, then wordpress. In the “Actions” menu, select Edit.

Under “Deployment Strategy” change “Strategy Type” from “Rolling” to “Recreate”. Keep any parameters the same and save the configuration.

<to be continued..>

Resources :

[1] https://en.wikipedia.org/wiki/OpenShift
[2] https://docs.openshift.com/enterprise/3.0/dev_guide/deployments.html
[3] https://alternativeto.net/software/softaculous/

About author :

Budi Santoso

Leave a Reply

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