Leeroy updated!

Leeroy has been updated to run on a VM with 8 cores and 52gb of RAM and is finally once again running the latest version of Jenkins.

One would think that moving a disk to a larger instance would be easy.  However, there were several complicating factors, which I describe here for future reference.

First, some script had managed to brick my sudo access to the machine.  Not only had said script inserted the same user 1300 times into one of the sudo auxiliary files, the script had managed to insert nulls into the auxiliary file (perhaps due to a reboot during writing).  This meant I’d get an error everytime I tried to run sudo, blocking any attempt to maintain jenkins or even the machine itself.  Starting a secondary VM; mounting the problematic disk; editing the auxiliary file; and creating a new VM for the new disk fixed that problem.

However creating a new VM sounds simpler than it is.  We use a “preemptible VM” to save costs.  This means the machine goes down automatically at least once every 24 hours.  We use a “managed instance template” to automatically restart this machine.  Thus, I had to rediscover the flags that would create the new template that uses the new disk.  And then I setup the managed instance group that “autoscales” the instance from 1 node up to 1 node (yes, you read that right… it’s a relatively maintainable hack that works 🙂 ).

Jenkins was also updated to the latest version by installing a new version of jenkins.war, all of the plugins were updated, and the old jenkins data has been cleaned out.