Home › Monthly Archives › October 2011

CentOS/RHEL init script for uWSGI

I created this as part of the uWSGI package that I’m publishing later this week, but I thought this might also be useful to people not using the package, so here’s a separate post! Hopefully it saves somebody some work.

This script, inspired by many scripts before it for Mongrel and other app servers, looks through /etc/uwsgi and launches an instance for each .ini/.json/.xml/.yaml/.yml file it finds. It expects the directories /var/log/uwsgi and /var/run/uwsgi to exist.

You can find the script on my GitHub page for the RPM:

https://github.com/jgoldschrafe/rpm-uwsgi/blob/master/SOURCES/uwsgi.init

FHS-compliant Graphite packages for RHEL/CentOS 6

Well, it took me a number of hours of beating on it, but I wrestled Graphite into being FHS-compliant and packaged it up on the holyhandgrenade-testing repo. They’re largely untested and a bit rougher around the edges than I’d like, but they seem to work.

The current version in the repo is 0.9.7c, as it was much easier to rip apart the version I was already using. I’m hoping to have the latest 0.9.9 version up soon.

Update: The packages in the holyhandgrenade-testing repo are now up to date with version 0.9.9.

As with my other packages, you can track changes to the specs through the GitHub repos:

Note the following changes from the standard distribution:

  • Python libraries, including Django templates, are installed into the standard Python sitelib.
  • Static assets are in /usr/share/graphite-web.
  • Configuration files, including local_settings.py, are in /etc/graphite.
With a tiny bit of love, they could be backported to RHEL 5, but be aware that they require Python 2.6 or higher, so you’ll have to tweak the package name and the %{__python} macro to have it build appropriately.

Introducing the holyhandgrenade yum repo

You’ve probably figured out by now that I’m completely insane. I typically don’t let this leak out and affect other people, but it seems that a chunk of my home lab has found its way onto the Internet. As a result, now I have a yum repo.

It’s just for RHEL6 and derivatives right now, and only on x86_64 (is anyone still using i386?), but I’ll probably start cross-compiling for CentOS 5 if anyone has a need.

Right now, the holyhandgrenade repo contains Ruby Enterprise Edition (existing packages on the Internet don’t build for RHEL6) and all Rubygem prerequisites for Chef built as RPM against Ruby Enterprise Edition. RBEL is still needed for the things this repo doesn’t contain (CouchDB, RabbitMQ, etc.).

As a bonus, if you install Chef from this repo, it will actually work. As of this writing, that’s not the case with RBEL. Hooray!

You can install the repo with:

rpm -Uvh http://repo.holyhandgrenade.org/rhel/stable/6/x86_64/holyhandgrenade-release-1.0-2.el6.hhg.noarch.rpm

I was in a rush to get this live, so there’s no GPG signing of packages yet. That will happen soon, I promise.

I’ve also created separate GitHub projects for each package. You can view my GitHub page here.

Now I can start work on that Chef tutorial.