Bohuslav Kabrda

Recent Posts

How to add packages to Python 2.7 Software Collection

How to add packages to Python 2.7 Software Collection

As Software Collections are getting popular, there are more and more people asking how they can build their own collections and/or extend collections in RHSCL. In this article, I will demonstrate how to extend python27 collection from RHSCL 1.2, adding a simple Python extension library. (Note that the same steps can be applied to the python33 collection.) I’m going to work on a RHEL 6 machine throughout this whole tutorial. I’m assuming that readers have basic knowledge of RPM building and Software Collections concept.

Python logo         SoftwareCollections logo

Continue reading “How to add packages to Python 2.7 Software Collection”

Share

Building Software Collections on top of RHSCL

As Software Collections are getting popular, there are more and more people asking how they can build their own collections and/or extend collections in RHSCL. In this article, I will demonstrate how to extend python27 collection from RHSCL 1.1 (Beta), adding a simple Python extension library. I’m going to work on a RHEL 6 machine throughout this whole tutorial. I’m assuming that readers have basic knowledge of RPM building and Software Collections concept.

Continue reading “Building Software Collections on top of RHSCL”

Share

DevNation Forecast – Cloudy with a Chance of Software Collections

I just can’t wait for DevNation, can you? I mean, conferences that bring together such a great amount of great people talking about great projects are just great!

I think we all know the two big topics of present: clouds and containerization. But the DevNation schedule shows that much more is going on. Personally, I can’t wait to see “Eleven Ceylon Idioms” by Gavin King. I’ve kept my eye on Ceylon language from its beginning and I think it really has the potential to become a “big language”.

Continue reading “DevNation Forecast – Cloudy with a Chance of Software Collections”

Share

Using Python’s Virtualenv with RHSCL

I’ve been getting more and more questions about using Python’s virtualenv with python27 and python33 collections from RHSCL, so I decided to write a very short tutorial about this topic. The “tl;dr” version is: everything works perfectly fine as long as you remember to enable the collection first.

Update 2018: An updated article has been published, See How to install Python 3, pip, venv, virtualenv, and pipenv on Red Hat Enterprise Linux.

What is Virtualenv

Citing Virtualenv official documentation: “virtualenv is a tool to create isolated Python environments”. In short, Virtualenv allows you to setup multiple runtime environments with different sets of Python extension packages on a single machine. Unlike Ruby’s RVM (Ruby Virtual Machine), it can’t install the language interpreter itself – just the extension libraries.

Continue reading “Using Python’s Virtualenv with RHSCL”

Share

Migrate to Python 3 with RHSCL

Although most of Python enterprise applications still use Python 2 (e.g. Python 2.4 on RHEL 5 or Python 2.6 on RHEL 6), Python 3 has already become a mature variant and is worth considering. Why, you ask?

  • Python 3 series is being actively developed by upstream, while Python 2 now only gets security fixes and bug fixes. Python 2.7 is the latest minor release of the 2.X series and there will be no Python 2.8. This is very important since Python 3 will be getting new modules (check the new asyncio module coming in 3.4, for example) and optimizations, while Python 2 will just stay where it is and will be abandoned sooner or later.
  • Although the initial Python 3.0 release had worse performance than Python 2, upstream has kept improving it and Python 3.3 is comparable to Python 2.7 performance-wise.
  • Python 3 is already adopted by major libraries and frameworks: Django since version 1.5, SciPy since 0.9.0, mod_wsgi since 3.0, …

Migrating projects to Python 3 takes some time, but with RHSCL it’s as easy as it can get. Read on to get information about changes in the language itself and about the suggested approach to using RHSCL as a migration helper.

Continue reading “Migrate to Python 3 with RHSCL”

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

Ruby on Rails 3.2 on Red Hat Enterprise Linux 6 with Software Collections

While Red Hat Enterprise Linux is known for its stability and flexibility, you might not think of it first when looking for the latest version of your web application framework. If you’re a developer working with Ruby and Ruby on Rails, you probably want to take advantage of their new features. Sure, you can use RVM, but sometimes you just want to get supported system packages.

Software Collections (often abbreviated as SCL) allows you to run more recent versions of software than what ships with your current version of Red Hat Enterprise Linux. This article will show you how to start development of a Rails 3.2 application running on Ruby 1.9.3 – all on RHEL 6, using only RPM packages, alongside your default Ruby installation. This tutorial assumes that you are familiar with Ruby on Rails basics, such as creating a new application and using bundler. It is also beneficial (although not necessary) to understand how Software Collections work in general.

Continue reading “Ruby on Rails 3.2 on Red Hat Enterprise Linux 6 with Software Collections”

Share