Romain Pelisse

Recent Posts

Un module Puppet pour tuned-adm (Français)

Il y a quelques mois, j’ai développé et publié une petite extension Puppet pour tuned-adm. En effet, cette commande est une fonctionnalité assez appréciable de RHEL, et il m’a semblé donc pertinent d’évoquer cette dernière sur Red Hat developer blog.

Tour d’horizon de ‘tuned-adm’

Pour faire court, cette commande va s’occuper des nombreux fins réglages du système d’exploitation pour vous, selon l’usage que vous souhaitez faire de ce dernier. Par exemple, si vous utilisez le système comme un simple serveur, vous pourrez utiliser le profil prédéfini ‘throughput-performance’. Si vous utilisez votre système sur un portable, à des fins de bureautique, vous opterez probablement pour le profil ‘powersave’, qui optimise le noyau pour réduire autant que possible la consommation de la batterie.

Pour vous donner une meilleure idée des profils disponibles, il suffit d’exécuter sur son système la commande suivante:

Continue reading “Un module Puppet pour tuned-adm (Français)”

Share

JCache and Infinispan – standardize your application's cache

With the adoption growth of Infinispan, its community has been resurrecting works on the quite old, but stalled, JSR-107, aka JCache. The first step was obviously the released of the JSR 1.0 version, a few month back, and most recently in December with Infinispan 7.0.2.Final is a certified JSR-107 1.0 implementation. It’s actually quite useful news, as it allows you to build webapps or even JEE apps using a standard API to access Infinispan.

Using JCache API is pretty straightforward, fairly well documented, and to summarize consists of:

  • add a dependency to infinispan-jcache artifact

Continue reading “JCache and Infinispan – standardize your application's cache”

Share

Using RHQ (JON) to monitor Java apps

While there is not yet a RHQ plugin for Glassfish, it is already possible to monitor an instance of Glassfish (GF), using the existing JMX Server resource template. Let’s see how this unfolds…

Set up

Foreword: While not difficult, setting this up on a laptop requires running a LOT of Java processes, on top of a database. As the latter needs to be a somewhat older version of PostgreSQL (8.4), you might even end up running it on VM using virt-manager. That is to say, at the end of the day, you do need a little bit of memory and CPU power…

Here what do we need to run exactly:

Continue reading “Using RHQ (JON) to monitor Java apps”

Share

XML editing with Bash script

Photo by seeweb

Countless products uses XML files, whether it is for data persistence, serialization or mere configuration. This is even more true when it comes to the Red Hat middleware portfolio, the JBoss projects having always been keen on using this format for configuration files – on top of the ones specified by JEE such as the famous (or infamous ?) web.xml.  While the XML format has some definitive qualities, it is not the easiest format to parse, and this often causes issues when integrating product inside an RPM or designing an automated installation procedure.

As I’ve been working on such automation for most of my career, I’ve picked up a bunch of nifty tricks and also designed some useful practices that I wanted to share on this blog.

Continue reading “XML editing with Bash script”

Share

VM Truckloader first release … why and how to use it!

I’ve recently released a tool called vm-truck-loader to automate virtual machine creation with VMware vCenter. Using a simple CSV file, and leveraging the API exposed by vCenter, this Java based command line tool enables you to design a fully automated deployment process, and can be a key to implement a proper Standard Operating Environment around vCenter. In this regard, I thought I’d do a quick entry on this blog, to briefly describe what the tool can do.

Instrumenting virtual machine creation

Continue reading “VM Truckloader first release … why and how to use it!”

Share

Separating IDE workspaces from code repositories

As I’ve been using Git, SVN (with git-svn) and Hg for quite a long time now, I’ve adapted my way to handle the local repositories created with those tools. Especially, I quickly found out that it is quite crucial to separate those repositories from your IDE workspaces. Some explanation of why and how are in this entry.


(Photo credit by motjetom)

Continue reading “Separating IDE workspaces from code repositories”

Share

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