Random Musings

O for a muse of fire, that would ascend the brightest heaven of invention!


All Posts

  • haproxy tricks

    haproxy is one of my favourite *nix tools. I use it in all sorts of odd places, to shuffle HTTP traffic from place to place, splicing TCP in all sorts of ways, debugging network protocols, and obvious…

  • DIY Jails - EuroBSDcon tutorial

    Do-It-Yourself Jails One of FreeBSD’s unique features is the close alignment of containers, filesystems, and networking, within the base Operating System. There are many jail manager tools, but they a…

  • Terraforming a Custom FreeBSD image in OCI

    TBD.…

  • Using OCI command-line tools to Upload FreeBSD images

    This post is focused on uploading FreeBSD qcow2 images into Oracle’s OCI infrastructure, and massaging them to be available for general usage. It will be updated periodically, as we move from custom p…

  • Custom-built FreeBSD Images for OCI

    As part of getting FreeBSD running on OCI , we’ll need to teach the FreeBSD Release Engineering process and people how to build them, including our special tweaks and polishing. Assume we have locally…

  • Mixing SimpleCSS with Phoenix

    As I’ve done mainly backend development for the last few years, I thought it would be nice to explore and learn a lightweight CSS framework with Phoenix , a powerful modern web framework built on Elix…

  • Do I need a Load Balancer for my Phoenix Application

    This post is in response to an Elixir Forum post on the same subject, albeit from a couple of years ago. I wrote this post, realised it was an old thread, and didn’t really want to lose the content. E…

  • Booting FreeBSD on Ampere's Awesome Altra CPUs

    This is a series of posts exploring how we can get FreeBSD to boot up in Oracle Cloud Infrastructure OCI , which is the commercially available source of the 160-core dual socket Altra CPUs from Ampere…

  • Using FoundationDB on FreeBSD

    Getting started with FoundationDB on FreeBSD The default databases/foundationdb port is at 6.3.13 . There is also a 7.0.0-master port tracking upstream work reasonably closely. basic config The port i…

  • Oracle Cloud Signup

    Without question, the hardest thing about getting FreeBSD running on OCI Oracle Cloud is getting past the initial sign-up process. OCI Oracle has Intel, AMD Epyc, and Ampere Altra systems available, b…

  • Adding a new nvme drive

    # nvmecontrol devlist nvme0: Samsung SSD 970 PRO 1TB nvme0ns1 (976762MB) # nvmecontrol identify nvme0 Controller Capabilities/Features ================================ Vendor ID: 144d Subsystem Vendor…

  • Remote debugging with lldb-server

    This week, I have the unbridled displeasure of debugging a C++ project. Given that I’ve never written any C++, you can imagine this fills me with a generalised existential dread. I consider picking up…

  • Adventures with Elixir HTTP clients

    Over the last few days, I have delved into what should have been a trivial task: Retrieve a single json doc, via HTTP, from a host that might only be accessible over IPv6, without that information bei…

  • What version am I running anyway?

    You’d think knowing what version of FreeBSD you are running is easy, but once you have jails, upgrades, boot environments, and just getting older, it’s hard to keep track. Guntbert emailed me about a …

  • Side-loading FreeBSD versions using Boot Environments

    In other words, upgrading a FreeBSD box the dirty way. This is very much a “works on my machine” approach but it should get you 90% of the way to dealing with your own. Expect annoying breakages and m…

  • Exploring the zig build system

    Zig’s build system (aka Make for zig) is written in … zig. That may seem a bit odd for a compiled language (how does that even work) but it yields a few benefits: there’s only 1 thing to learn no macr…

  • Starting with zig

    zig is a very nice (and early) simple language, sitting somewhere orthogonally between C, rust, and go: Zig is a general-purpose programming language and toolchain for maintaining robust, optimal, and…

  • FreeBSD ZFS notes

    References Get, and read, these books : Storage Essentials Specialty Filesystems ZFS & Advanced ZFS Cleaning up ZFS snapshots on low disk space Snapshots are taken automatically, of both jails (zroot/…

  • Restic for fast backups & restores

    restic is a high speed backup and recovery tool written in golang. It supports multiple remote storage options, and handles dedupe and encryption by default. It has a matching restserver remote backup…

  • Booting FreeBSD directly from firmware via HTTP

    HTTP booting FreeBSD If your UEFI firmware is later than 2.5 and you have a compatible NIC, it’s possible to for your computer’s boot sequence to hand off directly from the UEFI firmware to FreeBSD’s …

  • Upgrading FreeBSD the Dirty Way

    For some reason, you’re unable to simply upgrade this system the normal way. Instead, we’ll use the new bectl feature to provide a boot environment, and do a dirty upgrade inside that, out of the way …

  • An introduction to FreeBSD packaging

    FreeBSD 10+ provides a new pkg(7) tool and a new efficient binary format for storing package info, with similar functionality to apt or yum in Linux distros. Despite this, building custom packages on …

  • Your Infrastructure should be Boring

    Imagine if every time you picked up your phone to make a call, they had completely re-designed and re-invented the buttons on it. Or if you went to turn on the stove, instead of having a button or kno…

  • IOCaging up the RabbitMQ

    Here, I’ll show you how to set up rabbitmq , a well-known open source message queue system, based on Erlang/OTP, in a container, using a tool called iocage that runs on FreeBSD, using zfs and jails th…

  • The Command-Line RESTafarian

    Almost any modern-day service or application provides an HTTP endpoint to work with. Whether they provide metrics, allows remote administration, or accepts complex requests, a system administrator wil…

  • Setting up a FreeBSD 10.1 box within vagrant

    Here’s a few brief notes on setting up a FreeBSD 10.1 vagrant config based on the current beta. Once 10.1 is released, I’ll turn this into an ansible config, and create a vagrantcloud box. config 4GB …

  • Installing ZFS on Debian Linux

    ZFS is arguably the most reliable and most advanced filesystem ever, with over a decade of stable implementations in Solaris and FreeBSD operating systems. apt-fails For several years a port has been …

  • A RAM-disk based workflow

    It’s easy to pick up a laptop today with 16 or more GB of memory. Or spin up a cloud instance with as much as you need. ramdisks are scary fast, and as most cloud instances have poor IO, it’s a great …

  • Standardising Configurations with Ansible

    For one of my customers I need to clean up some infrastructure that has been manually maintained over time. As we have not yet made a decision on what tool to use, I still wanted to clean up some thin…

  • CouchDB 1.2.0 Busts Out

    In other news today, a warrant was issued for the arrest of Apache CouchDB 1.2.0. An unnamed source repo points the finger at a steady supply of dangerous performance-enhancing patches, including Goog…

  • Slurping data back out of CouchDB

    While this example is slightly contrived, we can re-use CouchDB to extract this data again. There are several ways, so let’s try each of them. First, and easiest, is to request a list of all documents…

  • Generating YAML from CouchDB docs

    Continuing the theme of the last two posts, the old Posterous blog content is now available as JSON inside CouchDB. I’m now going to combine a few pieces that are unique to CouchDB to build up the com…

  • Munging Posterous with CouchDB

    Previously I used the Posterous API to retrieve all my blogs posts. In this post, I’m going to show how easy it is to use CouchDB’s _bulk_docs API to get lots of data in via JSON import. Later on, I’l…

  • Using cURL and the Posterous API

    Posterous has a really neat feature of their API docs - you can use it directly from the web page. Unfortunately, I only need it to migrate off to Octopress. Log into Posterous and then open the API p…

  • Shared folders using Mac OS X extended ACLs

    You want to set up a shared folder on the same Mac, like iTunes or Aperture, so your family can share the same files. Let’s assume you have a group called “staff”; which everybody is already in, and a…

  • Building the first CouchDB Release

    Building the first ever CouchDB release coincided nicely with a complete fresh Snow Leopard install due to a dead disk. So this time I’ve tried out homebrew instead of macports as recommended by jan@ …

  • A fresh start with Snow Leopard Mac OS X b10.6.4

    A list of twenty things I forgot the last time from installing Snow Leopard Key Apps Transmission Komodo MailPlane KeePassX iTerm Aperture Firefox + jsonview + adblock plus + sync + firebug + about:co…

  • running OpenAFS on Ubuntu inside EC2

    first up, kick off an EC2 ubuntu/hardy instance, ssh in as usual apt-get install openafs-fileserver # set cell name to muse.net.nz # set cache size to 10Gb # set cellDB to afsdb.muse.net.nz # update /…

  • set up OpenBSD sendmail to fwd all local user mail to a smart host

    three changes required - configure sendmail to use a remote host for all mail in /etc/mail/submit.cf # changes to fwd mail directly to smart host #D{MTAHost}[127.0.0.1] D{MTAHost}[smtp.muse.net.nz] co…

  • using KerberosV on OpenBSD

    setting up and using Kerberos V on OpenBSD is a piece of cake. With this info, you should also be able to get k-enabled OpenAFS and ssh working too. references: OpenBSD FAQ Heimdal reference Running A…

  • running OpenAFS on OpenBSD

    I’ve had trouble getting OpenAFS to run recently (since 1.4.5 I think) on OpenBSD; I am still using my 4.0 binaries on 4.1 (I know, I know…) but here’s a few notes that may help you get started. cvs -…

  • Bridging with PF on OpenBSD

    As part of tidying up “all those damn cables” and making it possible to walk around the study, I’ve been replacing the long 10+m cables I’ve used over recent years with shorter cross-over cables. Some…

  • WP as site root

    About 3 months ago, I was trying to get WP to run my whole site — but still allow access to existing pages. This seemed easy, using the new features of WP2.1 but I couldn’t seem to get the right apach…

  • 1