Posts

Showing posts from 2018

How to Build Your Own Openshift Builder Image (PHP 5.6 with oci, pdo_oci, rfc)

Image
This post is written to show how to build Openshift PHP builder image that are using Oracle database connections, specifically using PDO-OCI extension. OCI8 connection is also being prepared.  Checkout  The git repository I prepared in github have a branch for our specific purpose : 'pdo_oci8' aws@broker ~ $  git clone https://github.com/yudhiwidyatama/s2i-php-container.git aws@broker ~ $ cd s2i-php-container/ aws@broker s2i-php-container $ git checkout pdo_oci8 Branch pdo_oci8 set up to track remote branch pdo_oci8 from origin. Switched to a new branch 'pdo_oci8' Checking the 5.6/root directory, there is a file that shows the required Oracle instant client rpm files.  aws@broker  s2i-php-container $  cd 5.6 aws@broker  5.6 $  cd root aws@broker  root $  ls opt    stage1.list.txt aws@broker  root $  cat stage1.list.txt   -rw-r--r-- 1 root root 62587782 Oct 29 11:40 oracle-instantclient12.1-basic-12.1.0.2.0-1.

How To Build your Own Openshift Builder Images (saprfc extension for PHP 5.6)

Image
This post shows the steps required to build your own Openshift Builder images. This might be needed when you need to connect to Oracle database using PDO extension, or there is additional command you want to be available in your application pods. If you simply need additional extension that are readily available, there is an alternative simpler step involving the use of S2I assemble script (see  http://inventorsparadox.blogspot.com/2018/04/installing-apcu-extension-in-openshift.html ). But if the extension need nontrivial dependencies, please read the remaining of this blog post. Tools of the trade We are going to need Docker toolset available. For Mac users, you could use  Docker for Mac . For Windows users, there is Docker for Windows . I will show the screenshot from Docker running on CentOS Linux. You also going to need git (https://git-scm.com/download/win or  https://git-scm.com/download/mac).  Clone the source repository First clone the source code repository:

Installing APCu Extension in Openshift Origin PHP Build Image

Image
Background Openshift Origin is an open-source software developed by Red Hat, that aims to make operating Kubernetes cluster simpler. In Openshift, a base build docker image is used and merged with application source codes to create deployment docker images. Sometimes a software that we need doesn't get included in base build image, which will hamper Openshift adoption. Base rules These are a few facts related to docker images, that enables the approach in this blog post : A. Linux binary from the same operating system release could be copied and used in another Linux OS. In this case we need to create a dummy image with the same OS version of the docker images and copy the relevant PHP extension binary from the image. B. Some directories are writable during the build process, some are not. When running a build, we do not have full privileges, we are running under a pre-configured default user. When application pods are running it will be running under another configure