a blog

testing flannel

·

I noticed today (maybe I’ve noticed before, but forgotten) that the version of flannel in Fedora 23 is older than what’s available in CentOS. It looks like this is because no one tested the more-recent version of flannel in Fedora’s Bodhi, a pretty awesome application for testing packages.

Why not? Maybe because it isn’t always obvious how to test a package like flannel, but I here’s how I tested it, and added karma to the package in Bodhi.

I use flannel when I cluster atomic hosts together with kubernetes. I typically use the release versions of centos or fedora atomic, but the fedora project also provides an ostree image built from fedora’s updates-testing repo, where packages await karma from testers. I prepare three atomic hosts with vagrant:

[my-laptop]$ git clone https://github.com/jasonbrooks/contrib.git

[my-laptop]$ cd contrib/ansible/vagrant

[my-laptop]$ export DISTRO_TYPE=fedora-atomic

[my-laptop]$ vagrant up --no-provision --provider=libvirt

Next, I rebase the trio of hosts to the testing tree:

[my-laptop]$ for i in {kube-node-1,kube-master,kube-node-2}; do vagrant ssh $i -c "sudo rpm-ostree rebase fedora-atomic:fedora-atomic/f23/x86_64/testing/docker-host"; done

[my-laptop]$ vagrant reload --no-provision && vagrant provision kube-master

Reloading the hosts switches them to the testing image, and runs the ansible provisioning scripts that configure the kubernetes cluster. Now to ssh to one of the boxes, confirm that I’m running an image with the newer flannel, and then run a test app on the cluster to make sure that everything is in order:

[my-laptop]$ vagrant ssh kube-master

[kube-master]$ rpm -q flannel
flannel-0.5.4-1.fc23.x86_64

[kube-master]$ sudo atomic host status
  TIMESTAMP (UTC)         VERSION   ID             OSNAME            REFSPEC                                                        
* 2016-02-03 22:47:33     23.63     65cc265ae1     fedora-atomic     fedora-atomic:fedora-atomic/f23/x86_64/testing/docker-host     
  2016-01-26 18:16:33     23.53     22f0b303da     fedora-atomic     fedora-atomic:fedora-atomic/f23/x86_64/docker-host

[kube-master]$ sudo atomic run projectatomic/guestbookgo-atomicapp

That last command pulls down an atomicapp container that deploys a guestbook example app from the kubernetes project. The app includes two redis slaves, a redis master, and a trio of frontend apps that talk to those backend pieces. The bits of the app are spread between my two kubelet nodes, with flannel handling the networking in-between. If this app is working, then I’m confident that
flannel is working.

[kube-master]$ kubectl get svc guestbook
NAME        CLUSTER_IP       EXTERNAL_IP   PORT(S)    SELECTOR        AGE
guestbook   10.254.233.237                 3000/TCP   app=guestbook   55m

[kube-master]$ exit

[my-laptop]$ vagrant ssh kube-node-1

[kube-node-1]$ curl http://10.254.233.237:3000/info
# Server
redis_version:2.8.19
redis_git_sha1:00000000
redis_git_dirty:0
redis_build_id:c0359e7aa3798aa2
....

The app is working, flannel appears to be doing its job, so I marched off to bodhi to offer up my karma:

instant karma

¶¶¶¶¶

¶¶¶¶¶

¶¶¶¶¶

One response to “testing flannel”

  1. Thank you so much for testing, you are awesome! If you want even more extra awesome points, you could create a wiki page – say https://fedoraproject.org/wiki/QA:Testcase_flannel_kubernetes – and use the test case SOP:

    https://fedoraproject.org/wiki/QA:SOP_test_case_creation

    to make a test case out of these steps, then add this bit to the bottom of it:

    [[Category:Package_flannel_test_cases]]

    then every time a Bodhi update for flannel was submitted, that test case would appear in the update and help people know how to test it. Then you would be super double mega awesome and I’d buy you beer forever. :) But hey, this is still awesome! Thank you so much.

    Like

Leave a comment