Posts

Showing posts from February, 2016

Deploying Yii Application in Openshift Origin

Image
This post would describe how we deploy a Yii application into Openshift Origin. It should also work in Openshift Enterprise and Openshift online. Challenges PHP-based application that runs in a Gear must not write to the application directory, because it is not writable. Openshift provides a Data Directory for each gear, which we could use for the purpose of writing assets and application runtime log. For the case of load-balanced application, error messages written to application log is also stored in multiple gears, making troubleshooting more complex than it is. Solution Use deploy action hook in order to create directories in the data directory and symbolic links to the application. Change the deploy script to be executable, in Windows systems without TortoiseGit we need to do some git magic. Create this file as .openshift/action_hooks/deploy in the application source code. If your application is hosted using 'php' directory in the source code : If your a

Adapting Openshift Origin for High load

Image
Openshift Origin is a Platform as a Service software platform which enables us to horizontally scale applications and also manage multiple applications in one cluster. One openshift node could contain many applications, the default settings allows for 100 gears (which could be 100 different applications or may be only 4 applications each with 25 gears). Each gear contains a separate apache instance. This post would describe adjustments that I have done on an Openshift M4 cluster that are deployed using the definitive guide . Maybe I really should upgrade the cluster to newer version, but we are currently running production load in this cluster. The Node architecture Load balancing in an Openshift application is done by haproxy. The general application architecture is shown below (replace Java with PHP for cases of PHP-based application) (ref : Openshift Blog : How haproxy scales apps ). The gear shown running code, for PHP applications, each consists of one Apache HTTPD instance