Monday, May 27, 2013

Wednesday, May 22, 2013

SimpleHTTPPutServer in python

Sometimes a small HTTP server which can be used with
$ curl -T dafile dahost.local
is handy. You can use it to upload small logfiles etc without any authentication, so something like tftp.

Python's own SimpleHTTPServer is a simple webserver, but it only supports GET and HEAD requests.
By simply deriving from that class you can create a small server supporting PUT.

Sunday, May 5, 2013

Mozilla's rust in Fedora's PPA Copr

Copr is Fedora's answer to Ubuntu's PPA - IIUIC, so don't nail me on the definition.
Slavek give's a nice introduction into how Copr works and what it does.

Now - Copr can be used to create public repositories for 3rd-party packages like rust - which can not (yet) land in the official Fedora repos (in rusts's case because of the bundling other libs).
I had to uploaded a source rpm of rust and point Copr to it, so Copr can pick it up and do a chroot build.
Best is that Copr is also creating the appropriate repository and you only need the following repo file to install rust with dnf or yum.

# Add the following repo file
$ cat rust.repo 
[fabiand-rust-unofficial]
name=Rust packages (unofficial)
baseurl=http://copr-be.cloud.fedoraproject.org/results/fabiand/rust/
enabled=1
metadata_expire=7d
gpgcheck=0

# And install it
$ sudo dnf install rust

In general Copr seems to be nice - it's still abit rough around the edges, but that's expected. It can surely imagine that t's going to fit well into our existing infrastructure.

[Update] The copr landing page for rust and the package rust-0.6-2.fc18.x86_64.rpm link.

ORBX.js - is no open codec

Orb

I'm by no way an expert, but until now ORBX.js is - to me - not much more than a tech demo and not "the future".

ORBX seems to be a propietary video codec, which operates highly parallel - that there is ORBX.js - a javascript decoder for this codec - doesn't help the fact that it's proprietary. So I wonder what the fuzz is all about. As said: To me ORBX.js is currently not much more than a tech demo to illustrate JavaScript's (or more it's interpreters) capabilities. And currently I couldn't find any hint that ORBX - the codec - is going to be opened - which is also not as easy, as this would involve some sort of patent audit to sort out it's patent status.

At last I at least like the fact that it's now shown that there can be highly parallel video codecs, which can utilize the GPU from a high level language.
I wonder if this can be done with Dirac.

Thursday, May 2, 2013

Parallel static python checks with Makefiles

Parallel Ripples

To make testing fun I looked at improving the speed of static syntax checks.
The latest incarnation is now using make targets to represent a specific checks. The nice thing about this is, that you can use Make's -j switch to run those tests in parallel.

So basically it looks like this:

check-static-pep8: $(PYTHONSOURCES:%=%.pep8)
 @echo Passed $@

%.pep8:
 PYTHONPATH=. pep8 -r "$*"

The complete makefile is here and the numbers:

Simple:
...
---
 Passed check-local
---

real 0m22.875s
user 0m20.466s
sys 0m2.158s


And in parallel:
---
 Passed check-local
---

real 0m11.459s
user 0m34.780s
sys 0m3.325s

There is so much that can be done.

Sunday, April 28, 2013

Woot - Mozilla's Firefox Mobile Nigtly has WebRTC support


Once and again I try the Nightly version of Mozilla Firefox.



Today I noticed that the Mobile version of Firefox has WebRTC support. Woot!?

That means you can go into about:config and set
media.peerconnection.enabled

to true.
If you've got a second mobile device or download the nightly desktop version (and enable peerconnection there too).
Then you can visit the webrtc reference application with the first device, and enter the given URL (at the bottom) on the second device to join the session.
E voilĂ  you've got a working WebRTC (with video and audio) connection between your two devices.



Or even conversat.io ! Yes - use conversat.io - looks promissing. Maybe even for team (ovirt) meetings?

Enjoy and feed-back.

Thursday, April 25, 2013

Testing oVirt Node in 4min (video)


My focus over the last year or so lay on bringing test automation to oVirt Node.
It was challenging because oVirt Node is based on a LiveCD - at boot and post-installtion. (The whole LiveCD is used as a r/o rootfs.)

To allow an automated testing of oVirt Node, I've been working on igor. It allows us to test oVirt Node on real hardware an in VMs.

When you throw all the new features (see below - libvirt-only, new igorc, new igor events service, junit-reports for jobs) together you can do a complete testsuite run on an oVirt Node ISO with one command.

And this is how it looks (view it in fullscreen to see all the nifty details, but this will leave you without the subtitles explaining what's happening):


0 00:00:00,000 --> 00:00:00,100 1 00:00:00,100 --> 00:00:03,000 Launching igorc 2 00:00:03,000 --> 00:00:12,000 igorc (left) extracts LiveCD, creates a profile and submits a new job 3 00:00:27,000 --> 00:00:32,000 igord created a VM (right) and boots it up (from a CD derived from the igord profile) 4 00:00:40,000 --> 00:01:00,000 VM (right) boots and the autoinstall is performed 5 00:01:36,000 --> 00:01:45,000 Installation finished (Ctrl-Alt-Del is sent to the VM to reboot [that's a known bug]) 6 00:01:58,000 --> 00:02:05,000 The VM now boots from HD 7 00:02:20,000 --> 00:02:27,000 An igor-service is now started in the background (within the VM) to communicate with igord 8 00:02:34,000 --> 00:02:39,000 The igor-service tells igord about the ocmpletion of the first testcase, which is then picked up by igorc (left). 9 00:02:39,000 --> 00:02:45,000 A couple of more testcases were completed (left) and a reboot is initiated (by the igor-service within the VM) 10 00:02:48,000 --> 00:03:10,000 The VM (right) reboots 11 00:03:46,000 --> 00:03:59,000 All testcases passed and the VM is torn down by igord

This is a big step forward - even if there are still some issues outstanding to achieve the goal to make testcase development fun.

Now that we've seen the fancy part some background and open issues.
One pitfall - up to this week - was the hurdle to get igor up an running. Igor used to require Cobbler - and cobbler is not easy to setup on Fedora 18 (which I use to build an test oVirt Node - which itself is based on Fedora 18 packages).

Anyhow - long story short - Igor has a "feature complete" "backend" for libvirt now, that means, igor doesn't need cobbler anymore. Furthermore I've added a brand new igor client (called igorc) which communicates with igord (the daemon doing all the coordination work).
This client has some "advanced" features  like pretty printing of junit results (Igor offers the result of the testruns in junit's XML format).

Some open issues:
  • ovirt-node needs a target to build a testable ISO
  • igor needs a feature to upload testsuites from the client side
All of this is up in the igor repository. ovirt-node related patches (e.g. merging of the igor plugin are pending). Just follow the node-devel ml to see when is is ready for daily usage.
That's it for now - thanks for watching.