Puppet Faces: defaults and ‘puppet node clean’

Puppet Faces are an extendable API for tricking out your Puppet instances. (“Faces” is just short for “Interfaces”.) Just a couple days ago I wrote about my survey of puppet + ec2 provisioning tools.

The problem I’m trying to solve, which I don’t feel like I’ve solved well, is how to give a type to a new system at bootstrap time, without using DNS. The type variable maps to a node manifest group, and determines the personality of a host – is it a database, webserver or development instance?
Continue reading

Going from Vagrant and Puppet into EC2: A short survey of 5 tools (and two I didn’t bother trying)

I thought this would be easy.

I started using Vagrant, and was productive with it in about a day. Really a couple hours. Most of my time was spent downloading the correct version of VirtualBox, looking for starter images and then a small amount of time experimenting with the Vagrantfile scripting language (for multiple VMs).

And we made some Puppet configs.
Continue reading

Customizing the RPMs from pgrpms.org

To pick up where Devrim left off in customizing RPMs, here are some more tips for getting your very own RPMs built:

  • Create a VM with your favorite operating system (I’m using versions of CentOS). I need both 32-bit OS and 64-bit OS. This is much easier to manage with separate, local VMs.
  • Install spectool (available here), and SVN
  • The other dependancies were: gcc glibc-devel bison flex python-devel tcl-devel readline-devel zlib-devel openssl-devel krb5-devel e2fsprocs-devel libxml2-devel libxslt-devel pam-devel
  • Edit the postgresql-$VERSION.spec file to your liking: If you’re adding patches, you need to add them in TWO places – first in the Patch#: group, and then again below where the %patch# series starts. Finally, if you’re adding an entirely new package (say in 8.2, pg_standby in contrib), you’ll need to also add the binary (or library, or whatever) to the appropriate %files clause later in the spec file. It’s also a good idea to modify ‘Release’. Here’s a sample diff of my spec file:


--- postgresql-8.2.spec (revision 188)
+++ postgresql-8.2.spec (working copy)
@@ -74,7 +74,7 @@
Summary: PostgreSQL client programs and libraries
Name: postgresql
Version: 8.2.17
-Release: 1PGDG%{?dist}
+Release: 1test%{?dist}
License: BSD
Group: Applications/Databases
Url: http://www.postgresql.org/
@@ -95,7 +95,9 @@
Patch4: postgresql-test.patch
Patch6: postgresql-perl-rpath.patch
Patch8: postgresql-prefer-ncurses.patch
+Patch7: postgresql-pgstat-dir.patch
Patch9: postgresql-use-zoneinfo.patch
+Patch10: pg_standby.patch

Buildrequires: perl glibc-devel bison flex
Requires: /sbin/ldconfig initscripts
@@ -282,7 +284,9 @@
%patch4 -p1
%patch6 -p1
%patch8 -p1
+%patch7 -p1
%patch9 -p1
+%patch10 -p1

pushd doc
tar -zcf postgres.tar.gz *.html stylesheet.css
@@ -604,6 +608,7 @@
%{_bindir}/pg_controldata
%{_bindir}/pg_ctl
%{_bindir}/pg_resetxlog
+%{_bindir}/pg_standby
%{_bindir}/postgres
%{_bindir}/postmaster
%{_mandir}/man1/initdb.*

How have you customized RPMs using this repo? Share your .spec files!

ptop – meeting summary from last nights pdxpug

Last night’s meeting was about ptop and Mark Wong’s efforts to make an interactive, command-line tool for monitoring the current status of a PostgreSQL database.

For our meeting, Mark set up a test operating system on a USB drive, and bravely demo’d his new software.

Mark got the idea for ptop a few months ago, and went looking for the source code to top to get started. After a few days of hacking, he had a some useful features he wanted to share. So, he’s set up a project and started gathering developers:

http://pgfoundry.org/projects/ptop

The features currently supported include displaying:

  • Current queries
  • Query plans
  • Locks
  • User table statistics
  • User index statistics

Continue reading

non-profits and systems administration

Wouldn’t it be great if the non-profit world could embrace free software? In my head, I’ve seen a giant Venn diagram labeled “VALUES” with Open Source/Free Software overlapping significantly with the of non-profits. Here’s a small one:

nonprofit open source venn diagram
I think that non-profits are certainly not ignorant of open source. In Oregon, our legislators tried to pass a bill that required F/OSS alternatives to commercial software to be considered for every software purchase. Then, the story goes, the guys from Redmond came down and talked them out of it. NOSI has been around for a few years, and I come across forums or blogs like techsoup daily.

The problem is implementation and systems support. Administration is where the car goes off the rails for non-profits. Qualified open source admins are not necessarily available to non-profits – I’m not sure exactly why, but I’d bet cost is a big reason.

Non-profits often receive equipment and software donations from the community, with little technical experience to maintain them. Most of the donations are commercial software with expensive licenses. There are a few tech support groups popping up that cater to non-profits (lower prices, focus on maintaining – not upgrading).

We have FreeGeek here in Portland. But there are still many non-profits who don’t or can’t use their services. I wish that there was a “server-in-a-box” setup that office managers would feel comfortable maintaining. Filesharing is so ubiquitous and necessary, it is unreasonable to expect that every office that needs filesharing will have a “qualified” systems administrator to maintain the server.

I guess my question is – is there a set of software apps that could be given to small- to mid- size non-profits as a replacement for commercial/non-free software?

Off the top of my head, I would want:

* Ubuntu Linux for client/server
* Firefox for a web browser
* Zimbra or Chandler/Cosmo for email and calendaring
* WebDav and SMB filesharing
* Subversion auto-versioning support on sharepoints
* Something like once:radix for a Filemaker-like database interface
* Accounting software?
That would all be pretty tough for a non-profit to maintain. I wonder about packaging those things together. Would it be worth it?

And then, once it was put together, how do we create a system where non-profits either have access to qualified sysadmins or can administrate everything themselves?

I’ve done a little research into non-profit/tech forums and organizations, but not nearly enough to know everything about what’s already out there. I’m very interested in pursuing this idea, maybe just for the sake of the few non-profits I work with.