Kubernetes is moving from Third Party Resources to the Aggregated API Server. In order to work with this and continue to deploy on OpenShift Origin, we need to move from working with the shipped and stable version that is in Fedora 26 to the development version in git. Here are my notes to get it up and running.
Category Archives: Software
Customizing the KubeVirt Manifests
My cloud may not look like your cloud. The contract between the application deployment and the Kubernetes installation is a set of manifest files that guide Kubernetes in selecting, naming, and exposing resources. In order to make the generation of the Manifests sane in KubeVirt, we’ve provided a little bit of build system support.
Docker without sudo on Centos 7
I have been geting prepped to build the OpenShift origin codebase on Centos 7. I started from a fairly minimal VM which did not have docker or Development Tools installed. Once I thought I had all the prerequisites, I kicked off the build and got
Cannot connect to the Docker daemon. Is the docker daemon running on this host? |
This seems to be due to the fact that the ayoung user does not have permissions to read/write on the domain socket. /var/run/docker.sock
What is minishift ssh anyway?
The documentation says that to access a minishift-deployed VM you can use `minishift ssh` to log in, but what if you want to use other tooling (like Ansible) to get in there? How can you use standard ssh commands to connect?
Adding External IPs for Minishift
In the interest of simplifying the development and deployment of Kubevirt, we decided to make sure it was possible to run with minishift. After downloading and running the minishift binary, I had a working minishift cluster. However, in order to deploy the api-server to the cluster, I needed an external IP; otherwise I’d get the error:
Error:
service "" is invalid spec.externalIPs: Forbidden: externalIPs have been disabled
Here is how I got around this error.
Redeploying just virt-controller for Kubevirt development
Bottom line up front:
cluster/vagrant/sync_build.sh cluster/kubectl.sh delete -f manifests/virt-controller.yaml cluster/kubectl.sh create -f manifests/virt-controller.yaml |
Running Kubevirt functional tests in Gogland
When tests fail, as they often will, the debugger can greatly shorten the time it takes to figure out why. The Kubevirt functional tests run essentially as a remote client. Getting a debuggable setup is not that different from my earlier post on running virt-launcher in the debugger.
Running virt-controller locally
While developing Kubevirt, I often want to step through my code. My most recent tasks have involved the virt-controller process. Here’s how I debug them.
Continue reading
Constructor Dependency Injection in Go
Dependency Injection
Organization is essential to scale. Compare the two images of cabling a data center:


Obviously, the top image appears much more organized. I don’t think it is accidental that the better organized approach is visible in the larger data center. In order to scale, you need organization. If you have a small number of servers, a haphazard cabling scheme is less likely to impact your ability to trace and fix network problems. Such an approach would not work for a million-node data center.
The same is true of code. Without many of the visual cues we use to navigate the real world, tracking code can be very difficult. Thus, code can degenerate into chaos as fast or faster than physical devices. Indeed, the long standing name for poorly organized code is “Spaghetti Code” which is an analogy to the same kind of linear mess we can visualize with the network cables.
Dependency injection provides a tool to help minimize the chaos. Instead of wires run across the data center direct from one machine to another, the well organized scheme routes them to intermediate switches and routers in a standardized way. Just so, dependency injection provides an mediator between components, removing the need for one component to know the approach used to create the specific instance.
The guiding rule is that dependency injection separates object use from object construction.
Continue readingManually Deploying Kubevirt on OpenShift Origin
It has been enjoyable to learn the Kubevirt code base and coding in Go. However, unless the code gets deployed to servers, no one will use it in production. I’ve been learning OpenShift as an integration point for Kubevirt. Here are my notes for getting it up and running. This is not quite production grade, but should help write a proper deployment mechanism.
Please note, as of KubeVirt v0.17 installing KubeVirt directly via manifests is deprecated. KubeVirt is now deployed using the operator pattern.
https://kubevirt.io/user-guide/docs/latest/administration/intro.html
The rest of this document is maintained for historical value only.