The Complete Magazine on Open Source

Creating Apps on Live Cloud Platforms: IBM Bluemix and Red Hat OpenShift

, / 271 0

Cloud computing cloud stoarge data visual

Cloud platforms are becoming rather popular with developers for various well known reasons. Through the use of virtual machines, developers can avail of the various cloud services providers offer. This article serves as a primer on creating apps on IBM Bluemix and Red Hat OpenShift.

Nowadays, most computing services that are hosted by a number of cloud service providers are available on demand. Currently, a number of key areas in cloud computing are being researched due to the escalating needs in the digital services domain.


Figure 1: The IBM Bluemix online platform


Figure 2: IBM Bluemix in a Platform as a service (PAAS) mode


Figure 3: Selecting the IoT application from IBM Bluemix

Virtualisation and hypervisors
Virtualisation is the key technology that works at the back end of cloud services and digital infrastructure. In actual implementation, the cloud is deployed using virtualisation. Whenever there is a need for a remote system by any user, dynamically created virtual machines are provided to the end user or developer at the other remote location with the credentials of the machine at the cloud data centre.
A virtual machine (VM) refers to the software implementation of any computing device, machine or computer which executes the instructions or programs exactly as the physical machine would. When a user or developer works on a virtual machine, the resources, including all programs installed on the remote machine, are accessible using a specific set of protocols. Here, for the end user of the cloud service, the virtual machine acts like the actual machine.
Widely used virtualisation software includes VMware Workstation, VMlite Workstation, Virtual Box, Hyper-V, Microsoft Virtual PC, Xen and KVM (Kernel Based Virtual Machine).


Figure 4: Specifying the app name in IBM Bluemix


Figure 5: View the app details


Figure 6: Configuring the IoT app in Node RED

Hypervisor technology
A hypervisor or virtual machine monitor (VMM) is a piece of computer software, firmware or hardware that creates and runs virtual machines. A computer on which a hypervisor is running one or more virtual machines is defined as a host machine. Each virtual machine is called a guest machine. The hypervisor presents the guest operating systems with a virtual operating platform and manages the execution of these systems. Multiple instances of a variety of operating systems may share the virtualised hardware resources.

Table 1

IBM Bluemix –
IBM Bluemix is a leading cloud service provider offering a number of services including Big Data analytics, mobile applications, NoSQL databases, the Internet of Things (IoT), natural language processing, sentiment analysis, and a lot of related high performance computing services.
The IBM Bluemix Platform can be accessed using the ‘freemium’ model, and there is the provision to use boilerplates. The latter simplifies the creation and updation of live code, enabling even beginners to use IBM cloud services without any difficulty.
In IBM Bluemix, there is a detailed catalogue of a number of cloud services including the programming platform for PHP, Java, Ruby, Python and many other languages. Bluemix can be used as a PaaS for hosting and running multiple applications.
After logging in, click on the Catalog button to view and select different platforms and services provided by IBM Bluemix.


Figure 7: Setting up the IoT sensor


Figure 8: Analysing and logging the status of the sensor on changing the temperature


Figure 9: OpenShift login panel


Figure 10: Creating the first application panel in the OpenShift platform

Creating an Internet of Things (IoT) application in Bluemix
Let’s create an IoT application in IBM Bluemix. On the Catalog page, click ‘Internet of Things Application Foundation Starter’. This is a simulation scenario for sensing the temperature.
As in Figure 4, the app name is to be specified while creating the live cloud application. Using this unique name, the application is identified and executed on the cloud servers.
You can get a view of the temperature sensor simulator at
In Figure 7, the device ID is mapped with the actual device. Let’s assume there is a particular machine and we want to sense its temperature using IoT. In this case, the unique machine ID is mentioned in Node RED so that the application can sense the live temperature or any other required parameter.
In Figure 8, the live logging and analysis of the temperature can be viewed. Suppose the machine under analysis is moved beyond the threshold temperature, the IoT application will sense and display the appropriate message mentioned in the code.


Figure 11: Selecting the PHP platform in OpenShift temperature


Figure 12: Setting up the URL and related parameters of the app in OpenShift

Creating PHP applications in IBM Bluemix
IBM Bluemix provides a PHP starter application template to cloud users so that their own code can be added and pushed back to the cloud server. This starter application template is the boilerplate for PHP Web application development in Bluemix.
Initially, a new PHP starter application is activated and starter code is downloaded. After that, the App name and host are provided by the user. For further implementation, the cf (Cloud Foundry) command line tool is used. cf is the CLI (command line interface) that can be used to deploy and control the applications on Bluemix.
To log in to the Bluemix environment, type:

$ cf login -a  -o <myor name> -s <myspacename>

After making changes to the code, deploy the application again. For deploying the modified application to Bluemix, the cf command is used:

$ cf push myappname -p <PathToApplication> -m 512M

Accessing the application
Once the application is deployed, open the URL in a browser to check that it is running.


Figure 13: Git instructions for app creation and updation in OpenShift


Figure 14: Deleting the app from the OpenShift platform

Creating a PHP application in Red Hat OpenShift
OpenShift ( has gained a lot of popularity with developers as it has enormous speed, which makes the quick spinning up of a new development stack possible.
To start using the OpenShift platform, the very first step a developer should take is to open an account that provides access to create and deploy applications.
After creating the new account, there is the option to create a new application. In the online platform, the complete code can also be uploaded using Git so that the pre-built application can be launched on the OpenShift platform.
To work on a new application, the OpenShift platform presents a number of options which the developer may use. If a Python application is to be developed, OpenShift offers an online platform to program and execute Python code.
After the basic settings and selection of the public URL, a new application is created on which the code can be deployed and executed.
The changes in the existing code can be made using Git. For this, the Git tool is required to be installed so that the modifications and uploading can be done.
In OpenShift, the creation and deletion of an application is very easy. The application created earlier can be deleted any time, after use.