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

Extending Red Hat Enterprise Virtualization with Vdsm hooks

oVirt is an open source management system for KVM-powered virtual machines. Red Hat Enterprise Virtualization (RHEV) derives from oVirt in the same fashion that Red Hat Enterprise Linux is derived from Fedora. oVirt’s (and RHEV’s) central management component, called oVirt-Engine, is written in Java and runs on top of JBoss. Engine controls dozens of nodes that may run many dozens of VMs each.

Besides sounding like an improper innuendo when pronounced in by Spanish-speaking people, “Vdsm” is Engine’s per-node agent. It’s written in python and is responsible to prepare storage and network connectivity for the virtual machine, as well as to track the life cycle of the VM.

Continue reading “Extending Red Hat Enterprise Virtualization with Vdsm hooks”

Share

DevNation developer event registration now open

The DevNation agenda is now live (www.devnation.org) and registration is open!  With over 250 submissions, 43 selected sessions, 12 birds-of-a-feather panels, full day training courses, a hackathon, and an evening event, we hope to make DevNation an amazing event targeting and featuring the Developer and DevOps communities. The conference has participation from Twitter, Netflix, Facebook, Hortonworks, ThoughtWorks, Docker, the Eclipse Foundation, the jQuery Foundation, the Java Community Process, Docker, countless others, and of course, Red Hat!
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

Profiling Python Programs

For RHEL6 and newer distributions tools are available to profile Python code and to generate dynamic call graphs of a program’s execution. Flat profiles can be obtained with the cProfile module and dynamic callgraphs can be obtained with pycallgraph.

The cProfile Python module records information about each of the python methods run. For older versions of Python that do not include the cProfile module you can use the higher overhead profile module. Profiling is fairly simple with the cProfile module.

Continue reading “Profiling Python Programs”

Share

Developer Toolset 2.1 beta now available – compiles to RHEL7 beta, adds new Git

Red Hat is pleased to announce the Beta availability of Red Hat Developer Toolset 2.1.

Red Hat Developer Toolset 2.1 beta delivers the following capabilities:

  • Users can compile on Red Hat Enterprise Linux 6 to run on Red Hat Enterprise Linux 6 and test on Red Hat Enterprise Linux 7 Beta. In addition, the Red Hat Developer Toolset retains functionality allowing users to compile on Red Hat Enterprise Linux 5 and deploy on Red Hat Enterprise Linux 5 or Red Hat Enterprise Linux 6.
  • Git 1.8.4. Git 1.8.4 provides developers using Red Hat Enterprise Linux 6 with a new release of the powerful distributed version control system designed to handle projects of any size with speed and efficiency.

    Continue reading “Developer Toolset 2.1 beta now available – compiles to RHEL7 beta, adds new Git”

Share