Code ready containers to the rescue

After struggling with the OKD home lab install using the fabulous Craig Robinson’s guide not his fault, the problem is my desktop PC is not enough to be a lab server. I decided to give Code Ready Containers a try.

The big problem here was I’m not running RedHat Linux neither one of it’s derivatives, I, as most of the linux home users do, use Ubuntu on my personal PC, so the official Getting started guide didn’t work for me either, at least as starting point.

Luckily I found Consol Labs' CodeReady Containers on Ubuntu guide, which simplifies the process down to few things more than install libvirt and download crc.

Then it came the desired moment: issuing the crc start, but after entering my pull secret… bang! crc starting error

But, what happened? This was not mentioned anywhere on the guide! Unexpected errors are quite usual on my day to day work as a Linux Systems Administrator, in most cases because someone forgot to set the appropiate SELinux context or to set up a boolean, but wait: Ubuntu does not use SELinux out of the box!

No, it doesn’t but it uses AppArmor which provides similar features, and the response was already on the logs. apparmor access denied

AppArmor isn’t anything you have to worry about when you are doing desktop things on a desktop computer, so I’m not as proficient on it as I’m on SELinux but a bit of googling did the trick, and I found an stackexchange post that gives the solution. So I edited my /etc/apparmor.d/libvirt/TEMPLATE.qemu file and add the path to my qcow2 file.

Then crc start was finally able to complete it’s execution, so now the playground is ready and it’s time to start playing. crc ready to play