I’m trying to run minikube in CircleCI via a job with a machine executor and I’ve run into a few problems that I’m hoping someone on here can clear up.
This seems to be completely possible with CircleCI 2.0, and there’s a repo on GitHub that demonstrates this. I forked the repo and tested it myself and can confirm that it works, however I tried to replicate it in CircleCI 2.1 and I’ve run into two issues.
The first one might not affect my end result at all, but it is curious. I can’t seem to specify a machine image in 2.1. While the YAML is perfectly valid I get the following error at the start of the job:
Error pulling image circleci/classic:201808-01
Using just machine: true in the job definition does get past the error, but I encounter the major issue later on in the job.
It seems that I can’t access systemctl which minikube needs in order to start properly in whatever machine image the job is using. I discovered this when I debugged the job via SSH, I could not access systemctl even as root. This causes minikube start ... and ultimately the job to fail.
I should note that I’m running a test job via circleci local execute -c <file> --job <job>. Where <file> is the result of performing circleci config process <original>.
I suppose a possible workaround would be to look into running minikube in docker and use that as a service to test against when performing kubernetes integration tests.
Could it be that circleci local execute doesn’t handle a machine executor image properly? Running in locally on my machine results in the same issue.
I guess I should start with a little more background on what I’m trying to accomplish. My goal was to construct a CircleCI workflow where I could run some basic unit tests on an orb I was developing.
My approach was to validate, pack, and publish a dev version of the orb, then in the next job process a testing CircleCI config that uses the dev version of the orb from 2.1 to 2.0, and use CircleCI local execute to run a few jobs from it.
I believe this would’ve worked if the jobs didn’t require the use of a machine executor, as local execute seems to roll out a container.