I was looking for some way how to run Kubernetes via minikube in Travis CI and there are "some" ways: https://blog.travis-ci.com/2017-10-26-running-kubernetes-on-travis-ci-with-minikube
Unfortunately I didn't have much luck with latest minikube (0.26) and latest Kubernetes (1.10) when I tried to make it working on Travis.
It looks like there are some problems with running the latest stuff on Travis and people are using older Kubernetes/minikube versions (like here: https://github.com/LiliC/travis-minikube/blob/master/.travis.yml).
Instead of troubleshoot Travis CI - I decided to use AppVeyor.
It's another free service like Travis doing basically the same, but it has some advantages:
- Your build environment is running in VM with 2 x CPU and 8GB of RAM and it can be running for 1 hour (can be extended to 1:30).
- It supports Ubuntu Xenial 16.04 and Windows images (both with lot of software preinstalled).
- You can access the linux VM via SSH: https://www.appveyor.com/docs/getting-started-with-appveyor-for-linux/#accessing-build-vm-via-ssh. You can also access Windows build (via RDP).
AppVeyor was mainly focused on Windows builds, but recently they announced the Linux build support (which is now in beta phase). Anyway possibility of using Ubuntu Xenial 16.04 (compare to old Ubuntu Trusty 14.04 in Travis) and SSH access to the VM makes it really interesting for CI.
I decided to try to use minikube with AppVeyor - so here is .appveyor.yml sample:
Real example:
- Github repository: https://github.com/ruzickap/multinode_kubernetes_cluster
- AppVeyor pipeline: https://ci.appveyor.com/project/ruzickap/multinode-kubernetes-cluster
Maybe if you will need to test some Kubernetes commands / scripts / etc... you can use minikube and AppVeyor...
Enjoy :-)
Great post
ReplyDelete