OpenShift is a PaaS (platform as a service) and written by Red Hat. The Source code is licensed under Apache License 2.0 and available on Github. OpenShift also uses many open source tools for automation and orchestration: docker containers, Ansible for configuration, Jenkins, Git for version control and many others. In this article you can read how to deploy the applications and see in action basic work with OpenShift. And maybe some peoples ask now “Can I run OpenShift in my own server?”. Answer – yes, of course – several OpenShift packages are ready to use in Fedora and RHEL/Centos.
Clients and API
// for deb-based Linux distributions: $ sudo yum install rubygems && sudo gem install rhc // or # dnf install rubygem-rhc
In the beginning just run in terminal:
$ rhc setup.
The OpenShift REST API is very helpful for automation and described on Red Hat Documenation with working examples in curl, Python and Ruby. I also need to say that quality of Red Had documentation is very, very good – this is fact, no advertisement.
Git repository with source code, region and scaling available in the advanced options.
Wait ~1 minute, go to https://wp-linuxhomefront.rhcloud.com and edit the name, admin email, description of your website.
Owncloud can also be installed with the same way from web console, but I want to demonstrate
rhc – console tool for OpenShift. After installation (check Clients and API chapter for details) run these commands in your terminal:
// enter your login and password $ rhc setup // create instance with PHP and MySql $ rhc app create owncloud php-5.4 mysql-5.5 cron-1.4 // add Owncloud kickstart and push it $ cd owncloud $ git remote add upstream -m master git://github.com/openshift/owncloud-openshift-quickstart.git $ git pull -s recursive -X theirs upstream master && git push
Check new application at http://owncloud-linuxhomefront.rhcloud.com and login with
linuxhomefront is the domain name just for example, you need to select your domain name. More information about
rhc you can find here.
Restrictions Of The Free and Paid Plans
Red Hat OpenShift has the three plans: Free, Bronze and Silver. Free plan you can run up to three scalable small applications (gears) with maximum 3 x 1 GB storage. Every gear will be stopped after 12 hour inactivity. I recommend to use the Bronze plan – 3 small non-stop gears free (of 16 max) with custom SSL certificate. More details about prices is here.
Work With Data
For example, we need a custom theme for WordPress. We can do this in two ways:
- WordPress web panel – go to the themes catalog and push “Install” button
- git (recommended):
// clone source code of your application $ rhc git-clone -a myapp
// download theme
$ cd myapp/.openshift/themes/
$ wget -c https://wordpress.org/theme.zip && unzip theme.zip
// push changes to OpenShift repository
$ cd myapp $ git add . && git commit -m “Added theme X” && git push
List of supported programming languages, frameworks and applications:
- Zend Server 6.1
- Codiad Web IDE
- Anchor CMS
- Bolt CMS
- Baical CardDAV+CalDAV Server
- Tiny Tiny RSS
- JBoss Application Server
- JBoss Data Virtualisation
- WildFly Application Server
- Aero Gear Push
- Ceylon & Closure
- Java EE full profile on JBoss
- Ruby on Rails
OpenShift is a great platform that can give you access to various technologies in one click without vendor lock-in – all component is open source. In my opinion the biggest concurrent is Heroku, but it supports fewer technologies, only PostgrSQL databases and contain proprietary software. You don’t need the special calculator for your pays like in the Amazon (recommend to check our review here). And yes, this web site is also hosted on OpenShift 🙂