Symbiosis is the collective name given to a group of Debian GNU/Linux packages which implement simple virtual hosting. It is developed by my employers Bytemark.
Symbiosis is basically a collection of configuration snippets, code, and libraries which works to offer virtual hosting in a reliable consistent and easy to understand fashion.
You implement hosting for a new domain by merely creating a directory tree. So for example you might configure the hosting for the domain example.com by running:
mkdir -p /srv/example.com/public/htdocs
echo "hello, world" >> /srv/example.com/public/htdocs/index.html
mkdir -p /srv/example.com/mailboxes/webmaster
echo "super-secret" > /srv/example.com/mailboxes/webmaster/password
mkdir -p /srv/example.com/config
echo "3l33t" > /srv/example.com/mailboxes/config/ftp-password
There you are, now http://www.example.com/ and http://example.com/ will work, and you may login to check mail with the email address email@example.com via POP3, IMAP, IMAPS, or POP3S. Finally you can FTP with username example.com and be dropped into the public directory.
The mail handling is very flexible, and the webhosting supports wonderful things.
I don't generally talk about work-stuff explicitly, but we've just made a major new release of the Symbiosis system such that it works upon Squeeze and has lots of IPv6 support out of the box. (Email, DNS, HTTP, Firewalling, FTP etc.)
All in all it is simple, well-documented, and open-source with a reasonably large user-base. More external testers, users, and developers would be a wonderful thing..
Mutt Mailboxes & Idle Hooks?
Mutt is wonderful but I'm starting to get annoyed by its lack of auto-mailbox discovery.
Assuming you use procmail you might deliver mail to ~/Maildir/.foo/ and mutt won't notice that if the directory is created once it starts.
(This is because generally mailboxes are defined via "mailboxes =one =two ..", even if you use a shell snippet it won't get updated unless you re-read configuration, or re-exec mutt).
I wish it were possible to use inotify/dnotify/something magic such that everything beneath ~/Maildir would just work.
(Re-reading mailboxes manually is one solution but it is .. nasty?)
I'm thinking that of all the possible solutions one of the most potentially interesting would be to define a new hook: "idle-hook command .."
That way "command" would be executed every time the client is idle. (This is a distinct state unrelated to IMAP IDLE times.)
Nopte: There is already "mail_check" & "timeout" options. Even running a defined command immediately following the code for mail_check would be reasonable.
I continue to use, love, and enjoy my node.js-based reverse HTTP proxy, and pub discussions seemed to suggest it is a great idea (due to flexibility) but it will never take on because people don't trust node.
I'm almost tempted to re-code it in LUA & C. But I can't help but think that would be a waste of time which would not increase adoption - after all most people use "simple" reverse proxies, and they are well suited by Apache, nginx, or even varnish.
Still no rush I suppose.
In more personal news after living in this flat for 7 years, or so, I'm getting a new bathroom designed and deployed. Good times.
In the meantime I've been steadily watching Stargate SG-1 having recently purchased a box-set of series 1-10. I've just started series six this evening, and I'm enjoying it a lot.
ObQuote: "You have been recruited by the Star League to defend the frontier against Xur and the Ko-Dan armada. " - The Last Starfighter (1984). First film I ever saw at a cinema as a child.
Tags: bytemark, mutt, node.js, random, symbiosis
7 March 2012 21:50
This evening I sat down and migrated my personal virtual machine from a 32-bit installation of Debian GNU/Linux to a 64-bit installation.
I've been meaning to make this change for a good few months, but it took me until this evening until I decided it was as good a time as any.
Mostly the process is painless:
- Ensure you have a 64-bit kernel, with support for 32-bit binaries too.
- Install the 32-bit compatibility libraries, such that your old binaries work.
- Overwrite your binaries and libraries in-place so you have a 64-bit base system.
- Patch it up afterwards.
I overwrote a lot of the libraries and binaries on the system such that I had a working 64-bit apt-get, dpkg, sash, etc, and associated libraries. Then once I had that I could use those tools to pull the resto of the system up to date.
One thing I hadn't counted on is that I needed to have a 64-bit version of bzip such that "apt-get update" didn't complain about errors. I suspect I could have fixed that by re-configuring my system to disable compression. Still it was easily solved.
Along the way I also shot myself in the foot by having a local caching DNS resolver, listening on 127.0.0.1, which broke. With no DNS I couldn't use apt-get - but once the problem was identified it was trivial to fix.
Anyway all seems OK now. My websites are up, email is flowing and I guess anything else can wait until the morning.
ObQuote: "Somebody's coming up. Somebody serious." - Leon
Tags: amd64, debian, kvm, squeeze
10 March 2012 21:50
Recently I accidentally flooded Planet Debian with my blog feed. This was an accident caused by some of my older blog entries not having valid "Date:" headers. (I use chronicle which parses simple text files to build a blog, and if there is no Date: header present in entries it uses the CTIME of the file(s).)
So why did my CTIMEs get lost? Short version I had a drive failure and a PSU failure which lead to me rebuilding a few things and cloning a fresh copy of my blog to ~/hg/blog/.
My host is now once again OK, but during the pain the on-board sound started to die. Horribly crackly and sounding bad. I figure the PSU might have caused some collateral damage, but so far thats the only sign I see.
I disabled the on-board sound and ordered a cheap USB sound device which now provides me with perfect sound under the Squeeze release of Debian GNU/Linux.
In the past I've ranted about GNU/Linux sound. So I think it is only fair to say this time things worked perfectly - I plugged in the device, it was visible in the output of dmesg, and /proc/asound/cards and suddenly everything just worked. Playing music (mpd + sonata) worked immediately, and when I decided to try playing a movie with xine just for fun sound was mixed appropriately - such that I could hear both "song" + "movie" at the same time. Woo.
(I'm not sure if I should try using pulse-audio, or similar black magic. Right now I've just got ALSA running.)
Anyway as part of the re-deployment of my desktop I generated and pass-phrased a new SSH key, and then deployed that with my slaughter tool. My various websites all run under their own UID on my remote host, and a reverse-proxy redirects connections. So far example I have a Unix "s-stolen" user for the site stolen-souls.com, a s-tasteful user for the site tasteful.xxx, etc. (Right now I cannot remember why I gave each "webserver user" an "s-" prefix, but it made sense at the time!)
Anyway once I'd fixed up SSH keys I went on a spree of tidying up and built a bunch of meta-packages to make it a little more straightforward to re-deploy hosts in the future. I'm quite pleased with the way those turned out to be useful.
Finally I decided to do something radical. I installed the bluetile window manager, which allows you to toggle between "tiling" and "normal" modes. This is my first foray into tiling window managers, but it seems to be going well. I've got the hang of resizing via the keyboard and tweaked a couple of virtual desktops so I can work well both at home and on my work machine. (I suspect I will eventually migrate to awesome, or similar, this is very much a deliberate "ease myself into it" step.)
ObQuote: "Being Swedish, the walk from the bathroom to her room didn't need to be a modest one. " - Cashback.
Tags: alsa, chronicle, random, slaughter, squeeze, usb
21 March 2012 21:50
Via Axel Beckert I learned today that GNU Screen is 25 years old, and although development is slow it has not ceased.
Back in 2008 I started to post about some annoyances with GNU
Screen. At the time I posted a simple patch to implement the unbindall primitive. I posted some other patches and fixed a couple of bugs, but although there was some positive feedback initially over time that ceased completely. Regretably I didn't have the feeling there was the need to maintain a fork properly, so I quietly sighed, cried, and ceased.
In 2009 my code was moved upstream into the GNU Screen repository (+documentation update).
We're now in 2012. It looks like there might be a stable release of GNU Screen in the near future, which makes my code live "for real", but in the meantime the recent snapshot upload to Debian Experimental makes it available to the brave.
2008 - 2012. Four years to make my change visible to end-users. If I didn't use screen every day, and still have my own local version, I'd have forgotten about that entirely.
Still I guess this makes today a happy day!
ObQuote: "Thanks. For a while there I thought you were keeping it a secret. " - Escape To Victory
Tags: debian, screen, tscreen
25 March 2012 21:50
Until recently I've had a Canon EOS 1000D, my starter-camera, and a Canon EOS 40D which is my real-camera.
The 40D is older, but it probably counts as a "semi-pro" body, albeit
an old mid-range one. From an image size point of view there isn't too
much to tell them apart - both produce 10MP images. But from a hardware
and ease of use sense the 40D has several key features which made it a compelling upgrade:
- Dual controls. So we can use one wheel for shutter speed, and one for aperture size.
- Better feeling body, which is slightly larger and more solid.
- Top display for instantly obvious settings.
Anyway both these cameras have been my friends for the past year or
two, although I did buy a toy camera for those times when I didn't want to carry the DLSR around.
I've made sure I only bought "posh" lens, including the fabulous and
horrifically expensive 70-200 f/2.8 MK 2 lens (Just short of £2000) and
I'd been wanting to use those on a full-frame camera.
Now it is upgrade time once more and I've just bought the EOS 5D MK II - a full-frame camera which means I don't have to worry about crop-factors any more.
So far I've only had it a couple of days but I'm in love. The output images are 21MP so I get far fewer to a (CF) card. But the detail is sublime.
Future portraits and photos of people will be wonderful -
although I hope they already are to a large degree!
This upgrade was a hard choice. The 5D is a full-frame, but a little
slow. (Faster than my 40D by a hairs-bredth) The alternative would
have been a 7D which is fast, and wonderful, but still uses a cropped sensor. Given that I have fast lenses and don't do sports (often) the 5D seemed like the sanest approach.
For my reference - my Canon serial numbers:
|EOS 5D MK II||4131916951|
ObQuote: "Courage is only required when facing that which you fear. " -Stargate: The Ark Of Truth
Tags: canon, photography, random, serial numbers