Infrastructure

Using Git with SVN


Factory

(Photo credit by Crystalline Radical)

Nowadays, while most people in our industry know about DVCS tools, such as Git and Mercurial, and what they can do, not all are aware that git can be used with SVN. It is, of course, quite a shame as on top of being the best way to learn how to use git – this feature also enables one to use all the nice tricks of DVCS (offline commit, local history rewriting, commit search, bisect…) while still being stuck with a remote SVN server…

Some years ago, I had already done a quick overview of this feature in my personal blog, so I decided to update and move content here – especially, as I’ve, even recently, run into fellow Red Hatters who did not know about it also !

This HowTo was, and still is, driven by uses cases, which is a good thing because most of those use cases match what any developer do on a daily basis with SVN. Hopefully, this will help readers relate to the tool, but will also make this blog entry a nifty reference page for later on. (In this regard, the DZone Refcardz on Git will also be an excellent reference material).

Cloning

As for SVN, the very first step one will do with git-svn, is to get the sources from the remote server. If with SVN, one only checks out the latest version of the source code – hence calling this step a checkout, with a DVCS one retrieves the entire project history. Therefore, this step is no longer called a checkout but a clone.

Continue reading “Using Git with SVN”

Share

A Puppet Module for tuned-adm

Some months ago, I developed and released a small Puppet module for tuned-adm. As this tool is a nice feature of RHEL, I think it is only fair from me to advertise about it here, on the Red Hat developer blog.

Quick overview of ‘tuned-adm’

(Photo credit: Accretion Disc)

To make this brief, this command will take care of tuning the operating system for you, based on the usage you want to make of it. For instance, if you want this system to be a regular server, you’ll use the ‘throughput-performance’ profile, while if you are running your Linux kernel on a laptop, you might prefer the ‘powersave’ profile, to protect your battery, and make it last longer.

To have a better idea of what options are available on your system, you can simply run the following command:

$ tuned-adm list
Available profiles:
- virtual-guest
- latency-performance
- powersave
- balanced
- throughput-performance
- virtual-host
Current active profile: /usr/lib/tuned/powersave/tuned.conf

And with the command ‘active’, you can quickly check, which profile has been activated:

Continue reading “A Puppet Module for tuned-adm”

Share

Red Hat Developer Exchange day – slides available

The day before Red Hat Summit in Boston, we hosted a Red Hat Developer Exchange day – a one day technical event which covered some great topics across four tracks:  DevOps, Programming on OpenShift, Languages and Tools, and Get more out of Red Hat Tools.  The feedback on these was consistently great, so we hope you find them useful too!

Track: DevOps

Track: Programming on OpenShift

Continue reading “Red Hat Developer Exchange day – slides available”

Share

NUMA – Verifying it’s not hurting your application performance [video]

As I mentioned here, Joe Mario and I delivered this session at Red Hat’s Developer Exchange session in Boston.  There were a lot of great questions and we hope you’ll find this video-recorded session useful.

Abstract:

Now that you followed all the steps to make your application NUMA-aware, how do you know if you got it right, or if you shifted your performance problem elsewhere?

In this session, Don and Joe will:

  • discuss initial high level steps to verify correct memory and cpu-process placement, including:
    • showing how performance can easily suffer with incorrect placement.
    • describing available options to correct placement.
  • discuss the open source tools, both available now and in development, which use the hardware’s performance counters to more accurately pinpoint:
    • where your program is making costly remote NUMA memory accesses,
    • identifying if and where other programs are inflicting NUMA-related performance penalties on your program,
    • how much those remote accesses are hurting your performance.
  • discuss various approaches for resolving these low-level issues.

Continue reading “NUMA – Verifying it’s not hurting your application performance “

Share

Sys Admins: Developers Asking for Unsupported ToolChains?

If you have ever worked as a system administrator, you are familiar with developers constantly wanting to use the latest toolchains even to the point of wanting to roll their own packages. Of course, the challenge is, if you are running a production environment, introducing change is always risky. If the change being introduced is from an unknown source, the risk is even higher. As a result, many admins rely on companies like Red Hat to provide them some assurances regarding the quality of the components underpinning the applications. However, a company like Red Hat also has an interest in only supporting tools that are known to be stable and fault-free (as much as anything can be). Sometimes this doesn’t meet the developers’ needs. As a result, Red Hat has introduced (currently in Beta) the Red Hat Software Collections bundle to try to find a happy medium.

All that being said, and arguably said before in press releases and the like :), there is another interesting use case for the software collections concept. Specifically, what about when the developers and the business have essentially abandoned an application? In other words, the application delivers on its promises to customers already, and, at this point in time, there is no desire to invest further resources in the application. Well, what does that mean for you System Admins? Well, generally, it means you get caught holding the bag having to maintain an older toolchain just to support the application.

Continue reading “Sys Admins: Developers Asking for Unsupported ToolChains?”

Share

Software Collections Quickstart

As I discussed in an article entitled Red Enterprise Linux Release Speed, developers sometimes have a problem with how slow Red Hat’s Enterprise Linux releases new versions of software. Well, the good news is, Software Collections are here. Software Collections provide Red Hat Enterprise Linux users with newer versions of programming languages and server daemons like python, perl, ruby, php, mysql, mariadb, etc.

This is a quick start guide to help you get comfortable with both programming languages and server daemons provided as software collections.

Installation

First, add the right channel to your system

rhn-channel -u fatherlinux --add --channel=rhel-x86_64-server-6-rhscl-1-beta

To discover what packages are available, do a quick list, and grep for rhscl.

yum list available | grep rhscl
mariadb55.x86_64                      1-6.el6               rhel-x86_64-server-6-rhscl-1-beta
mariadb55-mariadb.x86_64              5.5.30-9.el6          rhel-x86_64-server-6-rhscl-1-beta
mariadb55-mariadb-bench.x86_64        5.5.30-9.el6          rhel-x86_64-server-6-rhscl-1-beta
mariadb55-mariadb-devel.x86_64        5.5.30-9.el6          rhel-x86_64-server-6-rhscl-1-beta
mariadb55-mariadb-libs.x86_64         5.5.30-9.el6          rhel-x86_64-server-6-rhscl-1-beta
mariadb55-mariadb-server.x86_64       5.5.30-9.el6          rhel-x86_64-server-6-rhscl-1-beta
mariadb55-mariadb-test.x86_64         5.5.30-9.el6          rhel-x86_64-server-6-rhscl-1-beta
....

Now, let’s install a few interesting packages

Continue reading “Software Collections Quickstart”

Share

Drupal 7, PHP 5.4 and MySQL via Software Collections

In order to test out the new Red Hat Software Collections (RHSCL, announcement) version of PHP 5.4, I decided to build out a Drupal 7 install using the php54 collection and the mysql55 collection.

Overall, the activity was pretty much like a normal Drupal install. However, to use software collections you have to do a few things differently. Also, if you haven’t used a software collection for a “service” (e.g. MySQL) before, the service setup is also a little different than the native versions.

First and foremost, add the channels for RHSCL either via subscription manager or rhn. The name of the channel (for the beta) is rhel-server-rhscl-6-beta-rpms. After that, you need to install the software collections. So, something like:

#yum install php54 mysql55

You could also just install all the dependencies in the same line, but I wanted to pull them out to be able to comment on them a little bit more. I also tend to install some of the semi-optional components because I think Drupal works better that way.

First off, the easiest thing to install, which is also not really related to software collections, is gd (not called “GIF Draw” 🙂 ). Very simple, just install gd from the normal RHEL repositories.

#yum install gd

Next, we need the “driver” libraries for php to various other things. All the ones we need are included in the “php54 Software Collection” but are not installed by the simple install of the php54 package as they are not required for basic php. php54-php-gd is the connection from php to the gd library. php54-php-mbstring is a library for unicode, technically not a “driver” but an optional library. Finally, we need to connect to mysql so we install php54-php-mysqlnd.

#yum install php54-php-gd php54-php-mbstring php54-php-mysqlnd

Last but not least, we need to install the php “driver” for httpd. Now, I call this one out

Continue reading “Drupal 7, PHP 5.4 and MySQL via Software Collections”

Share

PHP 5.4 on RHEL-6 using RHSCL

Official announcement : Red Hat Software Collections 1.0 Beta Now Available

More information on Software Collections

Stability addicts can keep quiet, PHP 5.3.3 is still the standard version provided with RHEL-6.

We’ll soon have an official and supported way to install PHP version 5.4, beside the system version, without any effect on installed components. The announcement tells us the life cycle will be 3 years.

Warning:  it’s a beta version, published for evaluation purposes.

Installation

Activation of the distribution channel (requires a valid subscription) from the RHN web interface or from command line:

Continue reading “PHP 5.4 on RHEL-6 using RHSCL”

Share

Managing OpenStack with The Foreman

OpenStack is picking up a lot of steam these days, but getting it installed can be a hassle. Lots of puppet-based installers have popped up to automate this arduous task. Using Foreman, however, administrators can not only configure and install OpenStack using puppet, but provision & add new compute nodes at their fancy.

The Foreman is a Ruby on Rails application that does configuration management with puppet and provisioning. We’ll use both of these features to make using & administering OpenStack easier. Our installer leverages PackStack, which includes great puppet modules for setting up OpenStack. Combining these to setup and manage OpenStack Grizzly is a breeze!

Requirements

  1. At least three machines running RHEL 6.4 with an active subscription to RHEL OpenStack Platform or Red Hat Cloud Infrastructure.. We recommend your OpenStack Compute & Controller nodes run on bare metal.
  2. Each machine needs to have a resolvable FQDN
  3. Each machine needs to be subscribed to a proper RHEL subscription
  4. The Foreman server should have its firewall configured to allow inbound network traffic on TCP ports 80, 443 and 8140 for Foreman and Puppet to function correctly
  5. The host running Foreman may be running selinux in Enforcing mode, but you must first install the ruby193-foreman-selinux package. Both the OpenStack controller and compute nodes can also run in enforcing mode if you install the openstack-selinux package. You must also manually set a boolean on the controller node: setsebool -P httpd_can_network_connect on

Continue reading “Managing OpenStack with The Foreman”

Share