Testing on Ubuntu

This blog post details the installation process for Ubuntu when I’m using it for testing web applications. The builds are designed to conduct meaningful tests on Oracle cloud applications but should be suitable for testing any similar web application.

Test Build 1 (all tests)

Installation

  • Installed in a VM running in VirtualBox
  • Give the VM 4Gb of Ram, a 10Gb hard drive, and enable 3D acceleration
  • Install from ubuntu-18.04-desktop-amd64.iso
  • Minimal installation
  • Download updates
  • Don’t install 3rd party software

Post installation tasks

  • Launch gnome-terminal
  • Install all updates by typing sudo apt update && sudo apt upgrade -y
  • Reboot if required

Smoke tests

  • VM boots
  • User can log in
  • User can connect to internet
  • User can open Firefox and browse to a website

Test Build 2 (all tests that fail on Test Build 1)

  • Installed in a VM running in VirtualBox
  • Give the VM 4Gb of Ram, a 10Gb hard drive, and enable 3D acceleration
  • Install from ubuntu-18.04-desktop-amd64.iso
  • Normal installation
  • Download updates
  • Install 3rd party software

Post installation tasks

  • Launch Software & Updates
  • Under Ubuntu Software ensure that all 4 repositories are enabled (main, universe, restricted, multiverse)
  • Under Other Software enable Canonical Partners
  • Launch gnome-terminal
  • Install all updates by typing sudo apt update && sudo apt upgrade -y
  • Reboot if required
  • Install some software by typing sudo apt install ubuntu-restricted-extras adobe-flashplugin browser-plugin-freshplayer-pepperflash chromium-browser

Smoke tests

  • VM boots
  • User can log in
  • User can connect to internet
  • User can open Firefox and browse to a website
  • User can open Chromium and browse to a website
  • User can open LibreOffice Calc
  • User can open LibreOffice Writer

Six months of the Rough Trade Club

This afternoon I cycled to the post office in Erdington town centre to collect my Rough Trade Club record of the month, which was the eponymous debut by LUMP (Laura Marling and Mike Lindsay). I don’t really have a bag that is ideal for both cycling and carrying vinyl (recommendations welcome), but despite a slightly unbalanced cycle home (I did a food shop too, so added weight and bulk to the already oddly shaped bag that seemed to want to end up on my hip rather than my back) it did remind me very much of the many times I cycled to record shops when I was younger, and how much more of an occasion it makes getting hold of new music that the straightforward but soulless downloading or streaming that is largely how most of us consume music in the iTunes and Spotify age.

It’s a good record too. Short, but well worth a listen. In fact, everything Rough Trade have sent me over the last six months has really hit the spot, and has represented well over 50% of music I’ve bought this year so far. Yes, that’s 6 records – not 60 as would be the case in previous years. I’ve made a playlist (on Spotify, of course), just in case there is anyone reading this who might want to dive into some new music.

Cycling in Birmingham

At the moment I’m juggling hospital visits, work, being a responsible pet owner, and all the other things I do. This has lead to a few logistical challenges, but since I was kindly loaned a bike a couple of weeks ago I have found new ways to do everything I need to do and still manage to see new parts of my local environment.

I’m not a fan of cycling on busy roads, and although I’ve done it a few times recently, it’s very much a means to and end, and not an enjoyable journey. The ones I’ve enjoyed are where I can use parks, cycle paths and canals to get around – and Birmingham is surprisingly good for those kind of routes if you know where to look.

The journeys I’ve particularly enjoyed (with links to routes) are:

The park near my house to Good Hope Hospital via Sutton Park – I’ve done this one 3 times now, and it doesn’t go anywhere near a main road until Sutton Town centre. One day I will explore the top part of Sutton Park too, but that’s a trip for another day.

An alternate morning commute – This takes me to my local train station, but via two parks rather than a busy main road. It’s quite short (I walk most of this with the dog a couple of times a week), but it’s a really pleasant cycle when the weather is nice.

Good Hope Hospital to the park near my house via lots of parks and cycle paths – After cycling back from hospital twice on the roads, I vowed never to do it again (especially during rush hour). This route got my home more quickly, despite being longer, and is at least 2/3 off road. It’s also a really lovely ride through leafy cycle paths and past meandering streams.

Witton Lakes to the City Centre, via the canals – I’ve dubbed this one the canal graffiti tour, but it’s not quite as bad as it sounds, and it ends up at the Mailbox with only one tiny bit of road cycling on the way. I like graffiti quite a lot, so I suspect I’ll be coming back to this one with a proper camera at some point.

All of this has been really enjoyable, so I guess I’ll be buying a bike (or two?) soon.

Setting up a Raspberry Pi media centre

A couple of years ago I built a media player using a Raspberry Pi and OpenELEC. I’ve made a few changes since I wrote that blog post (not least moving to LibreELEC), and have also made a smaller version of the same device that I use in hotels when I’m travelling.

Hardware

There are two hardware choices for this sort of project – Any model of full sized Pi, or a Pi Zero (which is more portable, but harder to get media on to).

Preinstalled SD cards can be bought directly from Pi Hut (or just buy blank ones from Amazon which is what I do).

You’ll also need a mouse (for setup), the TV you’re going to plug it into, a HDMI cable, and some way of getting media on to the device if you’re using the Pi Zero (more about that later).

For my Pi III based device I still use the same case as before, and also have small USB drives plugged into each spare USB port to give more storage. I also have it networked now to allow easier streaming from my NAS.

For my Pi Zero I use a case that I can’t find a link for now, but really anything that allows access to all the ports will be fine.

Software

LibreELEC is one of the installation options on the NOOBS image, and can also be bought preinstalled on an SD card. The first option requires an internet connection (which might be tricky on the Pi Zero), and both options require a mouse.

Once installation had finished the device boots into the default Kodi interface. A web-based remote can be accessed by browsing to the device’s IP address on port 8080, and it can be accessed as network based storage from other computers on the same network.

Full details on how to download and install later verions of the software as they become available can be found on the LibreELEC wiki.

Content

Adding content is straightforward if the device is networked. It’s simply a case of browsing to the device and copying files across, or by pointing it at a network share.

For ther Pi Zero I’ve found the best way to do this is to use a USB ethernet adaptor (mine doesn’t have wifi), but I suspect that the newer model linked to above might work on wifi which would reduce the need for a further piece of hardware.

Addons

The original plan for this project was that I’d end up with something that could play movies and music on my TV, and that could handle storing a small amount of content locally so that when I end up in a hotel room with a few hours to kill I have something interesting to watch. The solution I’ve built ticks all those boxes, but I was curious to explore what else LibreELEC could handle.

After exploring the interface and available software for a little while I found channels for Last.fm scrobbles, BBC iPlayer and TED talks. All of these installed and worked fine, and I’ve not found myself needing anything else on these devices.The larger one is used every day, and is definitely my prefered platform for interacting with iPlayer. The smaller one travels with me, and I just copy a variety of films to the internal SD card and use the one USB port for a mouse.

How I consume music

The way I buy and consume music has changed recently. So far this year I’ve only bought 5 records (the three that Rough Trade send me, plus two Belle & Sebastian records that I pre-ordered last year). All my other music discovery has been via Spotify, and I find I’m using it more on my phone now, with a huge big playlist of new discoveries being the soundtrack to my commute. I also spent most of January and February listening to vinyl and CDs rather than music on my computer (at least when in my study – I still need digital music for when I’m travelling).

This month I’ve been doing an experiment around listening to all my old digital music, and trying to rediscover old things rather than buying new ones. I’ve been building up a library of MP3s since I got this computer, and it’s now up to about 400Gb of music, which would take several months to play. I’ve had this playlist on shuffle for about a week now, and I’m fairly sure I can manage to hold off buying too much more new music this year based on the amount of great things I’ve rediscovered that I totally forgot I owned.

Setting up new Ubuntu computers

I’ve had to set up a few Ubuntu desktop machines recently, and I thought it was worth documenting what I install on each one, and how I automate those installations as much as possible. I wrote about this a few years ago but so much has changed with my setup that I thought it was worth revisiting these instructions.

Generally, I’ll always install from USB, and from the latest desktop version. I make my installer in Ubuntu, using Disk Image Writer and boot the computer from that. From 18.04 onwards I sometimes use the minimal installation feature (which I love), but for now assume that I just go with the defaults for everything.

Once it has finished installing, I’ll go through the process of getting everything I want on to the machine.

Install dropbox

I download the latest version from https://www.dropbox.com/install?os=lnx and then type:

sudo dpkg -i dropbox <hit the tab key>

I have a lot of files on Dropbox, so I let this sync while I’m doing the rest.

Add some software from the Ubuntu repositories

sudo apt update
sudo apt install byobu gimp vlc ubuntu-restricted-extras build-essential hexchat openssh-server gnome-tweak-tool tilix testdrive tasksel gnome-session libdvd-pkg chromium-browser youtube-dl
sudo snap install --classic atom
sudo snap install spotify

Add a script to make updating software easier

Create a new file called updateall

#!/bin/bash
echo "updateall v.1.2 for Ubuntu"
#Run this as a normal user. Your admin password will be asked for if required.
sudo apt update
sudo apt upgrade -y
sudo apt full-upgrade -y
sudo apt autoremove -y
sudo purge-old-kernels -y
echo "The script has now finished running."

I move it to /usr/local/bin/ then make it executable with sudo chmod 755 /usr/local/bin/updateall.

Install tails-installer

sudo add-apt-repository ppa:tails-team/tails-installer
sudo apt update
sudo apt install tails-installer   

Install pandoc

This installs the latest version at time of writing, although there may be updates available.

wget https://github.com/jgm/pandoc/releases/download/2.2.1/pandoc-2.2.1-1-amd64.deb
sudo dpkg -i pandoc-2.2.1-1-amd64.deb
sudo apt install texlive texlive-latex-extra

See here for more on how I configure and use Pandoc.

Cosmetic tweaks

  • Change desktop wallpaper
  • Log out, log back in, and select a vanilla Gnome desktop.
  • Go to Settings --> Security and Privacy and turn off all “phone home” functionality.

Albums of the year 2017

I probably listened to less new music this year than any year in the last decade, although I definitely listened to each new record more, which was very much my intention at the start of the year. I also reverted to buying physical copies of music wherever possible (either on vinyl or on CD), which lead to me setting up my old stereo in my study and only really listening to digital music through Spotify or when I was on the move.

Did this change the sort of music I listened to? I don’t think so, but I definitely found myself exploring the back catalogues of several of the artists responsible for the records below in a way I probably wouldn’t have in previous years, and I think that might have lead to the list being slightly more biased towards established artists I already owned music by than new discoveries and more diverse genres.

The list I’ve come up with for this year (in alphabetical order) is:

Aldous Harding – Party
Belle & Sebastian – How to Solve Our Human Problems (part 1)
The Big Moon – Love in the 4th Dimension
Big Thief – Capacity
Bjork – Utopia
British Sea Power – Let the Dancers Inherit the Party
Cigarettes After Sex – Cigarettes After Sex
Colter Wall – Colter Wall
Conor Oberst – Salutations
Destroyer – Ken
The Fall – New Facts Emerge
Father John Misty – Pure Comedy
Here Lies Man – Here Lies Man
Idles – Brutalism
The Indelicates – Juniverbrecher
Lorde – Melodrama
Los Campesinos! – Sick Scenes
Lost Horizons – Ojala
Mac DeMarco – This Old Dog
Mark Eitzel – Hey Mr Ferryman
Michael Head & The Red Elastic Band – Adios Señor Pussycat
The National – Sleep Well Beast
The New Pornographers – Whiteout Conditions
Richard Dawson – Peasant
Ryan Adams – Prisoner
Slowdive – Slowdive
Sun Kil Moon – Common as Light and Love are Red Valleys of Blood
This is the Kit – Moonshine Freeze
The Unthanks – Diversions vol. 4 : The Songs and Poems of Molly Drake
The Wedding Present – George Best 30
Yorkston/Thorne/Khan – Neuk Wight Delhi All-stars

I’ve also created a playlist containing all the above and a few other things I’ve enjoyed over the last 12 months:

Counting down to Christmas

This week I’ve attended a carol service, eaten nut roast, drank mulled wine, made an excessively glittery Christmas card, listened to Christmas music, and voluntarily walked in the snow. I think that means I’m actually celebrating Christmas this year.

I’ve also made a preliminary list for my albums of the year blog post, mostly because I’ll be overseas during the time I usually write it so I want to give myself a head start. One thing I suspect will feature is the new Bjork album, which I’ve listened to a fair bit over the last couple of weeks, and which I do seem to be recommending to people a lot right now. I like all of it, but this is the song that fits best with the usual subject matter of this blog: