on eggs and baskets

Posted by Dick on October 29, 2005

Like any other geek, I take a certain pride in
running my own servers.

For the last few years I’ve accumulated 4 pcs -
2 servers, a laptop and an eMac – and a shitload of services:

  • net access
    • wireless lan
    • web proxy
  • mail
    • IMAP server
    • LDAP address book
    • spamassassin
    • exim
    • https webmail IMAP frontend for external access
    • clients : thunderbird, mutt and https squirrelmail for external access
  • blogs/websites
    • mine: rails, ruby, typo, postgresql, lighttpd
    • sfas (3 of them): php, php modules, wordpress, mysql, apache2
    • upload mechanisms
  • basics
    • LDAP
    • LDAP replication
    • DNS
    • 2ndary DNS
    • DHCP
    • Power and cabling
  • a boatload of other stuff I installed on a whim or am currently playing with

Lots of toys. But:

  • it all needs configuring, securing, toddler-proofing, maintaining and backing up.
  • all in the living room – servers are mini-itx: pretty small and quiet, but they still have fans.
  • it’s all used daily and it matters if it breaks – it’s hard to ‘play with’ anything
    • my current job already lets me manage a rats nest of systems (and with cooler hardware)
    • I just have 2 sysadmin jobs now
  • redundancy costs money and effort, so I avoid it
    • a distributed system with no redundancy just means there are more components to fail

Then I got a run of bad luck – I lost two drives, a PSU, the WLAN got flaky and the IMAP server went tits up.
I’d taken a wrong turn somewhere.

this is how the snowball rolls

I’ve loved del.icio.us since I found it, and quickly saw bloglines was
the only sane way to read RSS from 2 locations. I was semi-comfortable with keeping
bits of my life on Other Peoples Boxes.

With a dead IMAP store, mail backed up on the smtp gateway. I
temporarily forwarded to gmail while I got the server back.

Been there ever since. SFA only ever accessed IMAP via squirrelmail anyway.
I have a huge amount of mail store which someone else backs up, and I don’t need to bother spam filtering
(I can get rid of : spamd, my https apache hosts, spamassassin, mutt, thunderbird, squirrelmail and ldap) .

I’ve been meaning to get onto textdrive anyway, so signed up for a $12/month plan and moved
this blog.
(I can get rid of : typo, lighttpd, postgresql – no, not ruby, I’m not insane)

textdrive will host mail domains for me, so I can forward to gmail via them.
(I can get rid of exim)

Moved one of the wordpress blogs so far, and the last is imminent.

At that point, I will replace my aging rattly gateway with a silent linksys wrt54g,
(and go 54Mbps with WPA just in time for the NTL speed increase ),
sell all the boxen and spend the money on gumstix. I’ll still have toys, they’ll just belong to me instead of the other way round.

The only thing more satisfying than running your own servers is switching them off :)

and she blew, blew, blew, blew, blew

Posted by Dick on October 26, 2005

In other news, The Queen of Changes has decided to punish my arrogance by bumping rails to 0.14.2 on textdrive.
If you get

undefined method `zero?' for true:TrueClass

on publishing, change
app/views/admin/content/show.rhtml:15 :

:s/@article.published.zero?/@article.published?/

which looks to me like something low level changed – either rails or ARs mysql adapter.
This time I checked trac properly and found it wasn’t just me .

Less trivially, Rails 0.14.1 b0rked live search on typo 2.5.6 – patchage has been almost instant, but sadly for trunk only.

I was wary of going to svn when I don’t control the version of the webapp database/webapp framework/OS/webserver it runs on.
But since Rails hasn’t solidified yet, you can’t be suprised at the occasional need to be able to tweak apps as it shifts underfoot.
With gems, you can always tie to a particular version if needed.

So anyway, if the blog suddenly vanishes you’ll know why.

a new hope

Posted by Dick on October 26, 2005

Gritted my teeth for another game of ’hack wordpress 1.2s flickr gallery onto wordpress 1.5’ last night, and was delighted to find someone decided to drown that sick puppy in the river .

Since I’m quick enough to slag off
code that infuriates me, I want to point out that the new wordpress flickr gallery, FAlbum , is fantastic. Bursting with features, and installs easily with a top-notch admin control panel to tweak it.

Now we just need to pick a theme that doesn’t suck and we’re set.

gruesome twosome

Posted by Dick on October 17, 2005

The more time I spend with them, the more I hate Tweedledum and Tweedledummer

Had another go at updating stitch last night – we just reenabled comments and are getting literally hundreds of spams a day now. Mama used to be the same but it’s been spam-free since getting textdriven last month, hence the urge to move stitch too.

Last time I tried, I stalled on one plugin that refused to play with 1.5. Needless to say this one is essential.

This time I thought I’d clone the site to stitch2, then play with the crash test dummy instance.
I thought this would be simpler than moving it to textdrive and bouncing dyndns records around. Not so.

Mysql and wordpress each had a go at fucking things up.

mysql tries it on: dump live db → test db.

mysqldump --databases livedb | mysql -u whoover testdb -p

mysqldump—databases thoughtfully sticks a ‘use livedb’ at the top of the file, so the above
actually says ‘delete the live db and reload it’. Thank $DEITY for pitiful referential integrity checking or the live site would be a smoking heap.

(you could argue that since —databases is meant to handle multiple dbs it makes sense to switch to the right db before dropping tables. File that one under ‘pilot error’.)

wordpress’ turn: siteurl

So got past that, pointed wp-config.php at the (populated) new db and ran the upgrade. The stylesheet fell off. On closer investigation, all useful links are absolute – clicking on permalinks sends you to the old vhost. If the stylesheet hadn’t moved it would have been hard to spot this. You have to

update stitch_options set \
option_value = 'http://testurl' \
where option_name = 'siteurl';

to make it worth bothering with a test instance at all.

(This one is baffling – php knows what url it was called as, right? If you generate urls based on that, you know the browser can find you again. So leaving aside the unnecassary db lookup, why would you ever want to do anything else?)

nice try, bitches

So at least I’ve got a test site up now. I have resorted to grepping through mysqldumps and the docroot to double check there aren’t any more references to the old domain. I am fully expecting to screw up the old site anyway..

clavdivs

Posted by Dick on October 13, 2005

I love the Interweb. Did you know:

Today is the 1951st anniversary of everyone’s favourite despot
being bumped off by poisoned mushrooms prepared by his niece/wife.

I, Claudius was the first book I read that made me wish I’d studied history. The TV series
is just as much fun, and makes it a lot easier to tell which characters are in a scene.

Apparently the romans only had about VII names per gender, so they stuck them together to make unique strings:

tcn: Morning, Tiberius Claudius Drusus Nero Germanicus.

tcdng: Morning, Tiberius Claudius Nero. Have you seen Nero Claudius Drusus today?

tcn: I think he’s having breakfast with Nero Claudius Drusus Germanicus.

tcdng: Tell him to stay off the mushrooms.