Once I had backups and CWM installing CyanogenMod 12 was easy, download the latest version of the ROM from this XDA thread, I used Beta #8.
Boot into recovery mode using power+volume up+home, wipe everything (cache, data, system), choose install from sideload and then from your computer run.
adb sideload /path/to/rom.zip
Wait for the install to complete and reboot the phone, the first boot will take a very long time while Android is installed and that various caches rebuilt. I now had a Galaxy S2 running Lollipop but without any Google Apps, which is where it got a bit more difficult.