Planet HantsLUG

Syndicate content
Planet HantsLUG - http://hantslug.org.uk/planet/
Updated: 10 min 25 sec ago

Steve Kemp: How could you rationally fork Debian?

Sun, 09/11/2014 - 12:16

The topic of Debian forks has come up a lot recently, and as time goes on I've actually started considering the matter seriously: How would you fork Debian?

The biggest stumbling block is that the Debian distribution contains thousands of packages, which are maintained by thousands of developers. A small team has virtually no hope of keeping up to date, importing changes, dealing with bug-reports, etc. Instead you have to pick your battle and decide what you care about.

This is why Ubuntu split things into "main" and "universe". Because this way they didn't have to deal with bug reports - instead they could just say "Try again in six months. Stuff from that repository isn't supported. Sorry!"

So if you were going to split the Debian project into "supported" and "unsupported" what would you use as the dividing line? I think the only sensible approach would be :

  • Base + Server stuff.
  • The rest.

On that basis you'd immediately drop the support burden of GNOME, KDE, Firefox, Xine, etc. All the big, complex, and user-friendly stuff would just get thrown away. What you'd end up with would be a Debian-Server fork, or derivative.

Things you'd package and care about would include:

  • The base system.
  • The kernel.
  • SSHD.
  • Apache / Nginx / thttpd / lighttpd / etc
  • PHP / Perl / Ruby / Python / etc
  • Jabberd / ircd / rsync / etc
  • MySQL / PostGres / Redis / MariadB / etc.

Would that be a useful split? I suspect it would. It would also be manageable by a reasonably small team.

That split would also mean if you were keen on dropping any particular init-system you'd not have an unduly difficult job - your server wouldn't be running GNOME, for example.

Of course if you're thinking of integrating a kernel and server-only stuff then you might instead prefer a BSD-based distribution. But if you did that you'd miss out on Docker. Hrm.

Categories: LUG Community Blogs

Steve Kemp: Some brief notes on Docker

Sat, 08/11/2014 - 13:33

Docker is the well-known tool for building, distributing, and launching containers.

I use it personally to run a chat-server, a graphite instance, and I distribute some of my applications with Dockerfiles too, to ease deployment.

Here are some brief notes on things that might not be obvious.

For a start when you create a container it is identified by a 64-byte ID. This ID is truncated and used as the hostname of the new guest - but if you ever care you can discover the full ID from within the guest:

~# awk -F/ '{print $NF}' /proc/self/cgroup 9d16624a313bf5bb9eb36f4490b5c2b7dff4f442c055e99b8c302edd1bf26036

Compare that with the hostname:

~# hostname 9d16624a313b

Assigning names to containers is useful, for example:

$ docker run -d -p 2222:22 --name=sshd skxskx/sshd

However note that names must be removed before they can be reused:

#!/bin/sh # launch my ssh-container - removing the name first docker rm sshd || true docker run --name=sshd -d -p 2222:22 skxskx/sshd

The obvious next step is to get the IP of the new container, and setup a hostname for it sshd.docker. Getting the IP is easy, via either the name of the ID:

~$ docker inspect --format '{{ .NetworkSettings.IPAddress }}' sshd 172.17.0.2

The only missing step is the ability to do that magically. You'd hope there would be a hook that you could run when a container has started - unfortunately there is no such thing. Instead you have two choices:

  • Write a script which parses the output of "docker events" and fires appropriately when a guest is created/destroyed.
  • Write a wrapper script for launching containers, and use that to handle the creation.

I wrote a simple watcher to fire when events are created, which lets me do the job.

But running a deamon just to watch for events seems like the wrong way to go. Instead I've switched to running via a wrapper dock-run:

$ dock-run --name=sshd -d -p 2222:22 skxskx/sshd

This invokes run-parts on the creation directory, if present, and that allows me to update DNS. So "sshd.docker.local" will point to the IP of the new image.

The wrapper was two minutes work, but it does work, and if you like you can find it here.

That concludes my notes on docker - although you can read articles I wrote on docker elsewhere.

Categories: LUG Community Blogs

Steve Kemp: Planning how to configure my next desktop

Thu, 06/11/2014 - 21:26

I recently setup a bunch of IPv6-only accessible hosts, which I mentioned in my previous blog post.

In the end I got them talking to the IPv4/legacy world via the installation of an OpenVPN server - they connect over IPv6 get a private 10.0.0.0/24 IP address, and that is masqueraded via the OpenVPN-gateway.

But the other thing I've been planning recently is how to configure my next desktop system. I generally do all development, surfing, etc, on one desktop system. I use virtual desktops to organize things, and I have a simple scripting utility to juggle windows around into the correct virtual-desktop as they're launched.

Planning a replacement desktop means installing a fresh desktop, then getting all the software working again. These days I'd probably use docker images to do development within, along with a few virtual machines (such as the pbuilder host I used to release all my Debian packages).

But there are still niggles. I'd like to keep the base system lean, with few packages, but you can't run xine remotely, similarly I need mpd/sonata for listening to music, emacs for local stuff, etc, etc.

In short there is always the tendency to install yet-another package, service, or application on the desktop, which makes migration a pain.

I'm not sure I could easily avoid that, but it is worth thinking about. I guess I could configure a puppet/slaughter/cfengine host and use that to install the desktop - but I've always done desktops "manually" and servers "magically" so it's a bit of a change in thinking.

Categories: LUG Community Blogs

Alan Pope: Ubuntu Scopes Contest Wishlist

Mon, 03/11/2014 - 09:44

We’re running a Scope Development Competition with prizes including a laptop, tablets, and a bunch of cool Ubuntu swag. Check the above link for details.

I’m one of the judges, so I’m not allowed to enter which is both good and bad news. Good because then you won’t see my terrible coding quality, but bad because I would really love one of these sweet Dell XPS laptops!

I do have things I’d like to see made as scopes, and some ideas for making ones that I might do in the future when time permits, and I thought I’d share them. As a judge I’m not saying “make this scope and I’ll vote for your entry” of course, I simply figured I can give people some ideas, if they’re stuck. We do have a set of criteria (see link above) for rating the scopes that are submitted, and those will be used for judging. None of those criteria are “whether it was on the list on popey’s blog”. These are just ideas to get people thinking about what might be possible / useful with a scope.

Surfacing my data

One of the goals of scopes is to enable users to easily and quickly get access to their data. That could be local data on the device or remote data in a silo somewhere online. Typically on other platforms you’d need a dedicated app to get at that data. To access your Spotify playlist you need the Spotify app, to access your LinkedIn data you need the LinkedIn app and so on. Many of the sites and services where my data is held is accessible via an API of some kind. I’d love to see scopes created to surface that data directly to my face when I want it.

Manage Spotify Playlist

I use and love Spotify. One problem I have is that I don’t often add new music to my playlists. I don’t use or value the search function in the app, or the social connected features (I don’t have my Spotify hooked up to Facebook, and don’t have any friends on Facebook anyway). I tend to add new music when I’m having a real life verbal conversation with people, or when listening to the radio.

So what I would like is some quick and easy way to add tracks to my playlist, which I can subsequently play later when I’m not in the pub / driving / listening to the radio during breakfast. This could possibly sign in to Spotify using my credentials, allow me to search for tracks and then use the API to add tracks to playlist

Amazon Wishlist

My family tell me I’m really hard to buy presents for, especially at this time of year. I disagree as I have an Amazon wishlist containing over a hundred items at all price points When I visit family they may ask what’s on my wishlist to find out what I’m most interested in.

I’d like to be able to pull out my phone, and with a couple of swipes show them my wishlist. It would also be useful if it had the ability to ‘share’ the wishlist URL over some method (email is one, SMS might be another) so they get their own copy to peruse later.

I’d also like to be able to add things to the wishlist easily. Often when I’m out I think “That’s cool, would love one of those” and that could be achieved with a simple search function, then add to my wishlist.

Location Specific Satellites Overhead

I (and my kids) like to watch the International Space Station go over. Perhaps I enjoy it more than the kids who are made to stand outside in the cold, but whatever. When I travel it would be nice to have a scope which I can turn to during twilight hours to see when the ISS (or indeed other satellites) are passing overhead. This information appears to be publicly available via well documented APIs.

Upcoming TV Programmes

I frequently forget that my favourite TV programmes are on, or available to stream. It would be awesome to pull together data from somewhere like Trakt and show me which of my most loved programmes are going to be broadcast soon, on what local TV channel.

Events Nearby

When I travel I like to know if there’s any music, social or tech events on locally that I might be interested in going to. There’s quite a few sites where people post their events including Songkick, Meetup and Eventbrite (among many others I’m sure) which have a local event look-up API. One of the cool things about scopes is you can aggregate content from multiple scopes together. So there could be a scope for each of the above mentioned sites, plus a general “Local Events” scope which pulls data from all of those together. Going to one scope and refreshing when I arrive in a new location would be a great quick way to find out what’s on locally.

Some of the above may be impractical or not possible due to API limitations or other technical issues, they’re just some ideas I had when thinking about what I would like to see on my phone. I’m sure others can come up with great ideas too! Let your imagination run wild!

Good luck to all those entering the contest!

Categories: LUG Community Blogs

Steve Kemp: IPv6 only server

Sun, 02/11/2014 - 10:54

I enjoy the tilde.club site/community, and since I've just setup an IPv6-only host I was looking to do something similar.

Unfortunately my (working) code to clone github repositories into per-user directories fails - because github isn't accessible over IPv6.

That's a shame.

Oddly enough chromium, the browser packaged for wheezy, doesn't want to display IPv6-only websites either. For example this site fail to load http://ipv6.steve.org.uk/.

In the meantime I've got a server setup which is only accessible over IPv6 and I'm a little smug. (http://ipv6.website/).

(Yes it is true that I've used all the IPv4 addreses allocated to my VLAN. That's just a coincidence. Ssh!)

Categories: LUG Community Blogs

Steve Kemp: A brief introduction to freebsd

Wed, 29/10/2014 - 18:37

I've spent the past thirty minutes installing FreeBSD as a KVM guest. This mostly involved fetching the ISO (I chose the latest stable release 10.0), and accepting all the defaults. A pleasant experience.

As I'm running KVM inside screen I wanted to see the boot prompt, etc, via the serial console, which took two distinct steps:

  • Enabling the serial console - which lets boot stuff show up
  • Enabling a login prompt on the serial console in case I screw up the networking.

To configure boot messages to display via the serial console, issue the following command as the superuser:

# echo 'console="comconsole"' >> /boot/loader.conf

To get a login: prompt you'll want to edit /etc/ttys and change "off" to "on" and "dialup" to "vt100" for the ttyu0 entry. Once you've done that reload init via:

# kill -HUP 1

Enable remote root logins, if you're brave, or disable PAM and password authentication if you're sensible:

vi /etc/ssh/sshd_config /etc/rc.d/sshd restart

Configure the system to allow binary package-installation - to be honest I was hazy on why this was required, but I ran the two command and it all worked out:

pkg pkg2ng

Now you may install a package via a simple command such as:

pkg add screen

Removing packages you no longer want is as simple as using the delete option:

pkg delete curl

You can see installed packages via "pkg info", and there are more options to be found via "pkg help". In the future you can apply updates via:

pkg update && pkg upgrade

Finally I've installed 10.0-RELEASE which can be upgraded in the future via "freebsd-update" - This seems to boil down to "freebsd-update fetch" and "freebsd-update install" but I'm hazy on that just yet. For the moment you can see your installed version via:

uname -a ; freebsd-version

Expect my future CPAN releases, etc, to be tested on FreeBSD too now :)

Categories: LUG Community Blogs