python

Red Hat Software Collections 1.0 Beta Now Available

You may have seen references to “software collections” in this blog, but this is different.  “Red Hat Software Collections”, now in beta for the first time, is a collection of refreshed and supported web/dynamic languages and databases for Red Hat Enterprise Linux.   Now you can have two versions of software on one OS, or refresh these languages and databases more frequently.  See this list below!

Continue reading Red Hat Software Collections 1.0 Beta Now Available

Share

Learning Django with OpenShift

Background

The goal of this article is use the OpenShift Platform as a Service (PaaS) as a learning platform for Django. Most of the technical articles out there about running Django on OpenShift assume the user already understands how to administer Django environments and projects. This article is written from the perspective of someone who has done some python programming and wants to learn some Django without doing a bunch of setup work.

Since each OpenShift Gear “…is a container with a set of resources that allows users to run their applications”, a user can ssh in to test, troubleshoot, debug and learn. This turns out to be quite convenient for learning Django.

Django Quickstart

First, we must deploy an OpenShift application. The deployment is completely automated with the Django Quickstart. Once completed, the web interface will return all of the connection information necessary for Django, Git, and SSH. Estimate 5 minutes.

https://www.openshift.com/quickstarts/django -> Deploy Now

Screenshot-Django-Quickstart

Continue reading “Learning Django with OpenShift”

Share

Unleashing Power of WebSockets on RHEL 6

WebSockets are a rising technology that solves one of the great needs of web development – full duplex communication between a browser (or a different client) and a server.

Let’s imagine a simple scenario – live web chat. In the past, you’d probably use AJAX and polling to make new posts appear in realtime. The downside is that implementing all that is not entirely easy and it tends to put a lot of strain on the server.

This article will show you how to implement a simple web chat using WebSockets, thus eliminating the above problems. We will be using the Tornado web server with the Flask framework, producing a pure Python solution. To get the maximum out of Python 2.x, we will utilize the python27 Software Collection (SCL). We will also need a newer version of Firefox that supports WebSocket technology, so that we can test from the RHEL 6 machine that we’re developing on.

Continue reading “Unleashing Power of WebSockets on RHEL 6”

Share

Setting up Django and Python 2.7 on Red Hat Enterprise 6 the easy way

Recently, I needed to get Django installed with Python 2.7 on Red Hat Enterprise Linux 6. As this is not a directly supported activity, I wanted to document how I went about it. As you might imagine, the generally expected method for install would be to grab the Python 2.7 source tree and then build it. Obviously, that can be a lot of work; is not particularly repeatable; and, potentially, exposes you to more security flaws. As a result, I decided to try to leverage a “new’ish” technology developed (in the open) by Red Hat called Software Collections. An in depth discussion of Software Collections is for another post, for now we just need to know that Software Collections are rpms that contain all (or most) of their supporting libraries, install under /opt, are updatable through yum, and, the core software collections code (scl-utils) is supported by Red Hat. A number of collections have been created and released by the community at http://bit.ly/fedora-scl.

OK, getting started. I created a new VM using a RHEL 6.3 image on an instance of RHOS (Red Hat Open Stack),

Continue reading “Setting up Django and Python 2.7 on Red Hat Enterprise 6 the easy way”

Share

Software Collections on Red Hat Enterprise Linux

Did you ever wish you had newer versions of the software on your Red Hat Enterprise Linux machines? You are probably not alone. Providing new versions of software in rpm is hard, because rpm supports only one version installed on your computer at a time. Multiple versions on one machine can conflict with each other or create unpredictable behaviour in applications that you might not have considered dependencies.

Last year, we developed Software Collections to allow you to install newer versions of software in rpm safely into /opt and switch between new and old releases. This allows your Red Hat Enterprise Linux system applications to continue to run with the old version, while new apps can work with the new version. A good example of this is Python; many essential packages are written in Python. How can you update to the latest release of Python without causing half your system to break? Through Software Collections, you can install a newer version of Python – for example python-3.3 – into /opt avoiding conflicts in files and strange behaviour of apps that depend on an older version of Python.

Continue reading “Software Collections on Red Hat Enterprise Linux”

Share