Posts tagged with 'open source'

I recently blogged about deploying kubernetes in Azure. After doing so, I wanted to keep an eye on usage of the instances and pods.

Kubernetes recommends Heapster as a cluster aggregator to monitor usage of nodes and pods. Very handy if you are deploying in Google Compute (GCE) as it has a pre-build dashboard to hook it to.

Heapster runs on each node, collects statistics of the system and pods which pipes to a storage backend of your choice. A very handy part of Heapster is that export user labels as part of metadata, which I believe can be used to create custom reports on services across nodes.

If you are not using GCE or just don’t want to use their dashboard, you can deploy a combo of InfluxDB and Grafana as a DIY solution. While this seems promising the documentation, as usual, is pretty short on details..

Start by using the “detailed” guide to deploy the add on, which basically consists of:

These steps exposes Grafana and InfluxDB via the api proxy, you can see them in your deployment by doing:

kubectl cluster-info

This didn’t quite work for me, and while rummaging in the yamls, I found out that this is not really the recommended configuration for live deployments anyway…

So here is what I did:

Remove env variables influxdb-grafana-controller.yaml

Expose service as NodePort or LoadBalancer depends of your preference in grafana-service.yaml. E.g. Under spec section add: type: NodePort

Now run >kubectl create -f deploy/kube-config/influxdb/

You can see the expose port for Grafana by running:kubectl --namespace=kube-system describe service grafana-service

In this deployment, all the services, rc and pods are added under the kube-system namespace, so remember to add the –namespace flag to your kubectl commands.

Now you should be able to access Grafana on any external ip or dns on the port listed under NodePort. But I was not able to see any data.

Login to Grafana as admin (admin:admin by default), select DataSources>influxdb-datasource and test the connection. The connection is set up as http://monitoring-influxdb:8086, this failed for me.

Since InfluxDB and Grafana are both in the same pod, you can use localhost to access the service. So change the url to http://localhost:8086, save and test the connection again. This worked for me and a minute later I was getting realtime data from nodes and pods.

Proxying Grafana

For some reason, Grafana needs to know the root-url format that is being accessed from to work properly. This is defined in a config file.. while you could change it and rebuild the image, I preferred to override it via an enviroment variable in the influxdb-grafana-controller.yaml kubernetes file. Just add to the Grafana container section:

Since my first steps into QML when the Ubuntu SDK was launched, I have become a bit addicted to it. I decided to try to write a QML declarative game, and I settle on a shooting fighter jet game. Finally had enough content to put out an alpha. Here is the video:

The code for it in on my LP Junk branches, not really ready for review yet but happy to have help!

You might notice that I am using the keyboard to drive the game in my computer, I have also build a touch joystick that so far works ok in the Nexus 7, but needs some calibration.

PS: if you have some problems with playing the video, try jumping a head 10 secs, it also helps if you play it in HD

A few months back, I decided to write a Simple ToDo app for Android, then I hooked it up to a cloud backend, using Juju. That was my first Android application, so I got to experience first hand the latest developer documentation and development environment.

Clearly comparing a new SDK-Alpha with a stable platform like Android will seem hardly fair, however, keep reading as you might be surprised of the results.

QML vs Dalvik Java

Lets start with QT/QML vs Dalvik/Java – I found QML really easy to get to grips with and be productive. I had the UI (see picture below) running in no time and I would say much faster than with Android. QML is a very flexible declarative environment that allows you to embedded quick logic into the layout. This is a blessing and a curse.

While with Android, it was very easy to keep a nice MVC separation, I struggled to stop the leaks in QML. So while it is very easy to quickly write a functional application, it does not impose what you would consider as good development practices.

In summary, they are both very powerful development environments.

IDE: Eclipse vs QtCreator

Part of the development experience is the IDE. I must say that I simply love the QTCreator. Possibly not as polish as Eclipse but you don’t need to read a manual to use it. Also, with a quick integration with the HUD, it is just very simple to use.

So what is QTCreator missing? A good emulator. The Android Development Kit (ADK) provides a really good user experience to develop mobile solutions. QMLScene gives you similar functionality but does not simulate a phone environment. However, all the technology is there, and I am sure that will be included in the v1.0 version of the SDK.

The only thing to watch out for is that in Android you can get all the info you need from a single website. With QML you quickly end up pinging between Digia, Nokia and Ubuntu pages.

The Code

The code is on my launchpad repos. The actual source functionality is not finished as I am still trying to figure out how to add menu options to access Done items. Anyway, the whole thing is pretty compact compare to the Dalvik code. The actual logic is almost identical in both. A ListView that is populate from an List model. All the data is persisted in SQLite db.

Conclusion

Both environments have been equally painless to work with, the difference is that the Ubuntu environment has *just* been released as an Alpha. I think this is the start of a very vibrant App development ecosystem.

I had a CR-48 Chromebook for a while, which has recently fallen in disuse. While I have never being totally convinced about Chrome OS being a polished, well designed, interface that simplifies the “always connected” user journey that Google was envisioning, I liked the concept.

Now I am reading in ArsTechnica that Chrome OS is getting a brand new look, that is … basically.. well, not new. While I am sure there are many technical advantages of a fully hardware accelerated windows managers, my issue is with the [lack of] concept.

Google has spent much energy convincing users that they do not need to have local apps, that they can do everything in the cloud and that the portal to this experience is Chrome. Having an OS which the only application that could possibly run, and at full screen, was the browser was a controversial but bold move. More over, it really hit home the user experience they were targeting.

This new UI seems to be sending the opposite message. It seems to be saying: “OK, we were wrong.. but maybe if we make Chrome OS look more like windows you will like it better?”. Is that really the message? Well if you give me an app launcher in a desktop, I am bound to ask for local apps. If you give me off-line sync for Google apps, I am bound to ask for local apps.

I fear Google is paving the road to [windows vista] hell with good window manager intentions. I am primary an Ubuntu user, and what I like about it is that every single release over the last few years has continue to build on a design concept. Every new release is closely wrap on a consistent user message. Take as an example the HUD introduced in 12.04: it is new and different, but somehow it feels like it always belonged in Unity.

I am bought into the Ubuntu user experience, and I am excited to see what a new release will bring. If I had bought into the Chrome OS experience, I think I will be asking for a refund.

Anyway, I am looking forward to the new Chrome OS UI being available for the CR-48. Maybe I will change my mind once I get my hands on it.

Having installed Ubuntu 10.4 on my Vostro 3300, I hooked it up on my home made docking station… a belkin usb hub with wireless keyboard and mouse and a 20″ external monitor.

Everything seem to work ok – until I noticed that the monitor image was on a continuous flickering/wavy pattern. Searching on the web for similar problems, I found that the same issue had been found by several Vostro 3300 uses. I should note at this point that my laptop has an intel graphics card.

Most of the post suggested either to upgrade to a more recent kernel (Ubuntu 10.4 comes with 2.6.32-24) or to set modeset to 0. None of it worked.. I tried upgrading up to 2.6.36 and also booting the Maveric Beta from a CD with no success. I also figure out that you set modeset=0 by editing /etc/default/grub (sudo vi ??/etc/default/grub) and update the following line: GRUB_CMDLINE_LINUX=”i915.modeset=0 “. The run sudo update-grub and reboot.. unfortunately this frooze my laptop – so don’t bother trying

Eventually, I decided that I needed help, after asking around Sarvatt at freenode’s #Ubuntu-x found the upstream bug report that matches my issue - https://bugs.freedesktop.org/show_bug.cgi?id=28306

Unfortunately, this means that the issue is still unfixed and my monitor still flickering… Can you help?

Since we started the BugSquad, we had many people come and go from the mailing list, some of them show to the IRC sessions… however most of the ones that do contribute at least once (raising or fixing bugs) always seem to stick around.

It is my experience that making an extra effort to support someone’s first contribution is key to them becoming a regular member of the community. So, what are my “lessons learned” from the BugSquad so far:

Getting started guides – It is crucial to have detailed step-by-step guides for newbies, if you are trying to attract people from outside that might not have an in-depth knowledge of the project. For example, we realised that we didn’t have a simple guide on how to raise a bug. We had tones of detailed information on obscure Bugzilla functionality but nothing on the basics!

Make it simple (effort) - the more time that is needed to be spend downloading , installing and configuring stuff the less likely people are to participate. For example, we split the kits down to smaller download files, and reduce by half the amount of MBs needed to set up a running emulator.

Not everyone is you! - It is easy to assume that everyone sits behind a fast , reliable and unlimited broadband connection, that everyone lives in a country with out export restrictions… and so on. Today, our top contributor lives in Pakistan, he wasn’t able to join the bugsquad at the start as some of the required .zip files were export control. There wasn’t any better reason than we had never got around fixing it, as it wasn’t a problem for us. (btw, we’ve fixed the issue since)

With just a little push… – Actually, I found that most of the time , and once you have done all the above, many people just need a little push to make the jump. In the Bugsquad, I have found that many members would like the first bug or patch to be reviewed by one of the Symbian staff members before submitting it. They might have some reservations about the quality of either their soft or technical skills. Most of the time, they are perfectly capable of contributing, they just need to hear it from you. So , go on… give them a little push

I should point out that you need to have an eye on the long term here.. sure this might sound as more effort that is worth for that initial contribution, but it is all about setting the snowball rolling.

Also, I find that putting this sort of effort into helping people allows you to find out who really wants to contribute but they are getting stuck vs people that have a flight of fancy but are not committed. Hence, you build a sense of trust on the community members and get a hands-on understanding of what does it take to contribute to your project.