The Courtman Blog

Let's Go Gardening

6 April 2020


Compost Bins

28 January 2020

Winter Project II (2020): Compost Bins

Driveway

24 January 2020

Winter Project I (2020): Driveway

Tales from the Logbook I: Rough and Windy Out of Cowes

26 September 2019

N takes command of the yacht Hebe, a 33' Bavaria. M tastes sailing for the first time. They are accompanied by MuS and MoS, two recently qualified sailors.

Day 1: 15th September 2017, Rain

A long drive took us down to Southampton where we were met with sharp showers later to develop into light, persistent, drizzle. Having turned up an hour early to pick up the yacht we took the oppurtunity to explore the marina surrounds. The small pontoon set was clustered amongst the industry of a still functioning boatyard. Numerous large hulks were dotted around the piers and pontoons, in varying states of use and decay. Handover was brief and in short order the boat was ours. The course was set for a marina at the mouth of the R. Itchen, all we awaited were the remainder of our crew.

A frantic 15 mintues unloading and unpacking preceeded our departure at 1800, during which what wind there was had cleared away the majority of the rain to allow us a quiet motor downriver to our overnight. M took the oppurtunity to feel the helm for the first time, and berthing allowed N to stretch his skippering muscles. MuS took the opportunity to test out his recently learned radio technique, demonstrating nervous, but effective, communication skills. A swift and efficient entry to the marina was accomplished and all enjoyed a well deserved supper in a well know Mexican Restaurant.

A combination of light rain, and cramped quarters, made N and M's first night onboard somewhat uncomfortable. N alternatively hitting his knees on the low ceiling, or getting dripped on by the increasing condensation and leaks.

Day 2: 16th September 2017, Wind: N F3, Sea: Slight, Sun
M&N take the helm

MuS took command for the morning to a point beyond Bramble Bank, where N would take over.

The entry of the R. Itchen is a dock on the N side, which stretches round up into the main Southampton Dock, as we passed a large car transport ship was in dock, this was a common occourance for N who had sailed chiefly round Felixstowe in his childhood, but for MuS and MoS, this was a new experience. Once the main channel had opened up and we had beared S, MuS decided to put up the Fore' then the Main'. Setting sails on a new yacht is always tricky, and this was accomplished not with the greatest of ease, but managed nonetheless. A light wind directly behind provided much frustration as she insisted on jibbing at every given oppurtunity. As a result on entry into Bramble Bank North Channel sails were dropped and we motored through. This was also due to a nervousness gained on a previous voyage through the channel by the S's. At this point MoS, who was recovering from a medical surgery, headed below.

N took over upon exiting the channel and as the wind was in our port quarter the sails were set and for the first time that day we truly sailed. A stiff breeze allowed us to make 2.5kts over the ground against decent tide toward Plymouth. The wind, though tricksy, allowed us round Ryde Middle and then NW up to Cowes entrance. Despite trouble with the radio we managed to secure a berth in Cowes itself and MuS took the helm.

A tricky berth, a nervous helmsman, and the busyness of the season caused a somewhat undignified entrance to Cowes. However through quick action and clear direction our berth was secured. Having made land in good time, N and M took the opportunity to stretch their legs and explore Cowes. Upon returning, MoS had made supper ready after which we made good use of the facilities and headed to our cabins, somewhat apprehensively.

Day 3: 17th Septmber 2017, Wind: N F3, Sea: Slight, Overcast

It was MoS's turn to skipper and we were smoothly taken out of Cowes, and despite two IoW ferries we exited safely. Making a course of 240o, we raised sail and shot down toward Yarmouth. With a strong tide and wind behind us we made good speed. Too good in fact, as it was decided to sail much beyond our planned turning point in light of our fast passage.

When the order was given to cross the channel and begin our course back to Southampton Water, it became evident that we needed to tack back. M took helm (first time under sail) and managed the first tack brilliantly, keeping a steady course and making good progress over the ground. However, with a strong tide now running against us, the next tack showed us making 1kts to starboard - no progress at all. As such MoS called for the sails to be dropped; we motored slowly to Calshot.

Upon entering Southampton Water, N took charge and kept MuS on helm. MoS had gone below, and M had joined her (as a result of the harsh temperatures), this left MuS and N on deck. As the wind was light but steady, and the tide had calmed, N decided it would be a good opportunity to set the sails to eek out the last of the sailing. Despite much trimming, the wind and course were not enough so we quietly motored into the Itchen.

MuS executed an excellent entry into our berth, which provided N the chance to tutor M in the art of holding and mooring a yacht. M managed a safe landing, and demonstrated some good ropework. Unfortunately, the berth was without power and water so the decision was made to motor up to the yacht's home mooring and leave her that night. So once again we took, briefly, to the water, and once again a smooth entry was accomplished and the boat was quickly and efficiently packed up.


A Modern Geppetto

5 September 2017

Playtime on computers this week brings us: Puppet!

Puppet is a piece of automation software that has both enterprise and open source branches. The official website contains lots of useful docuementation: puppet.com. While the documentation is good, I found it particularly tricky when just setting up. This is probably because this software is meant for a business DevOps envrionment, but hey, I am trying to learn the software for my new jon (more on that later perhaps). In addition to this a Linux Guru friend of mine (and the best best-man known to man) has it set up on his network so why not give it a whirl.

Suffice to say, I have got it working and while it may not be best practice, it works. So what did I want to acheive? In a business setup Puppet is used to set up servers and machines quickly with appropriate users, permissions, directory structures etc, how would this apply to my setup. Let me give you a brief introduction to my network before we go on.

  1. Hub: Centralised server system (debian 9)
    • File server system (using nfs and samba)
    • Ssh access point
    • WebServer
    • Task and Password server
    • Nextcloud (for contacts and calendar server)
  2. Office: Desktop computer (debian 9)
  3. Living Room: Desktop computer (debian 9)
  4. Laptop: Small and portable (debian 9)
  5. Wife's Laptop: Wife's main computer (windows)

How an why would I want Puppet in my system? As the server is the central access system and is unique, I do not need to automate it, therefore it would also serve as the perfect puppet-master; the server that serves the automation. The internal desktops provide most scope for automation as they rely on mount points requiring a unique set of permissions. My wife and I have separate Documents folders (and others) but shared media folders, these are controlled by having two users and three groups me, wife, and joint. The shared directories are then owned by . This takes an extra 15 minutes of setup (accross all machines) so is a perfect candidate for automation.

The setup: seeing as I run a debian server and desktop I decided to use the debian repository versions instead of the code direct from the puppet website. Hence on the two desktops it was a simple sudo apt install puppet, and on the server it was sudo apt install puppet puppet-master. I had to open a port on my server (I use ufw) sudo ufw allow puppet, nice and simple. I then had to convince the server and agents/nodes (desktops) to talk to each other, this was done by exchanging certificates. I had a few problems here but briefly I edited the /etc/puppet/puppet.conf on the agents to include:

[agent]
server = hub.home
envronment = desktops

At this point a restart of the agent puppet services will generate certificates and send them to the server: sudo systemctl restart puppet.service. Then on the server you can list the requested certifcates by typing sudo puppet cert list, to sign the livingroom's certificate I then typed sudo puppet cert sign livingroom.home. The agents and server are now talking.

How do I then automate something to happen? To do this I need to create an envrionment and assign agents (nodes) to that envronment. I have created a "desktops" environment (note in the agent puppet.conf file). In my "code directory on the server (on debian 9 this is /etc/puppet/code/) I then build a directory called "environments" and within that I have:

desktops/
desktops/modules/
desktops/manifests/
desktops/manifests/site.pp

The manifests directory stores all the automation instructions in manifest files: .pp. My site.pp looks like this:

group { 'My usergroup':
name => 'My groupname',
ensure => 'present',
git => 'gid',
}

That simply ensures that there is a group for my user and assigns my gid to it, remember, this is then true on all desktops. There is similar groups assigned for my wife and "joint", and then users are created in much the same way (nb. passwords can be assigned by specifying the hash, on debian this can be found in /etc/shadow. To run this on agent machines run sudo puppet agent --test although puppet will automatically do this every 30 minutes.

Where next? So user accounts is just one thing you can automate, other things I inted to do are to automate file mount points, gpg key distribution, ssh keys, and other preferences. This setup is not best practice, it just gets puppet working, for a better working pattern please have a look at hiera documentation.

Happy automation


Taking the Long View

6 July 2017

I got myself a telescope.

Not an astronomical one, a nautical one. I purchased it for £40 in a lovely antiques shop in Hungerford, a place well worth a visit. The Kennet and Avon Canal provides beautiful walks, there are many antique and book shops. There are cafés and ice-cream parlours, and of course the Great Western Railway runs right through the heart of it - delightful.

I spotted the telescope and knew I had to have it. This was not because I like to have pretty things round my house (although I do), it is actually because I intend on using it. I am a keen sailor and enjoy all the navigational technology that comes with it, but I also love being able to whisk out a chart and dividers and do some good old-fashioned nautical maths. I already have a lovely pair of dividers, and a mini sextant, and two lovely compasses (one particularly useful on a boat - thank you fiancée), and so this adds to the set.

Unfortunately upon showing it to the future parents-in-law I inadvertently pulled the end off. This prompted a bit of time spent on it, during which I completely dissembled it and polished it; my mother provided the Brasso.

I now have a beautiful, and useful, telescope.


A Shiny New Toy

28 June 2017

I have bought myself a lovely shiny new server - yay! And, drumroll, you can see inside - yay! Ok, that's perhaps not that exciting.

What is exciting is that is big and powerful and shiny and new; this makes a much needed change from the previous server - a raspberry pi. Not to do down the Pi, it has done stunningly afterall, it's just that it started having an argie-bargie with the router, which sent the router into a huff, The result: no internet (- boo).

The server, or hub to give it its new name, is made up of the following:

  • Motherboard - ASUS A68HM-PLUS
  • Processor - AMD A6 6400K APU
  • Memory - CORSAIR 4GB DDR3 SINGLE CHANNEL XMS3
  • PSU - CORSAIR CX550M
  • HDD - WD 1TB Internal
  • SSD - KingDian S200 60GB MLC 2.5" 7mm SATA III 6Gb/s
  • Case - CORSAIR AIR240

I will soon be loading Debian 9 onto it, and then with any luck I will have a working server and network again. In the future I intent to purchase a new router and flash it with DD-WRT - we'll see.


Basic Physics with Trains

25 June 2017

A 200t train pulls out a station and in 10 minutes has reached 200mph, how much energy did it exert?

A. 830MJ

This is calculated using E=1/2mv**2. This can be usefully derived from SUVAT assuming linear acceleration, by combining a=(v-a)/t and s=(v+u)t/2 using F=ma and W=Fs. Hey presto out pop the kinetic energy equation.

This makes sense as the train had no kinetic energy at the station, and now has 830MJ when at top speed, therefore that energy had to be expended by the engine as work done to reach that speed - conservation of energy init.