Learning Ruby and rBongo with WeBongo

This post should have been written quite a while ago as I wanted to start documenting my efforts to learn to program using Ruby. As most of you know I have been trying for a while to teach myself to programe.

I started my efforts with a course in c# at a company in London, the course was just great and the instructor was a fantastic guy. Unfortunately life meant I could not practice at all. I worked for a company for a year that gave me no opportunity to play during the day and having a newborn baby left my wife and I looking more like zombies that real people.

Then things changed the year before last when I Joined Forward as a contractor to help them with their Virtual infrastructure. This company is completly different to anywhere I have ever worked before. Normaly as a contractor you are shoved in a corner and beat with a whip so that they get the most out of you, here at Forward this is definitly not the case.

Forward has some really great intelligent developers who are a pleasure to work with and be part of and that is where I was going with this post.

A short while ago Fred George held one of his famous OO Bootcamp training sessions and I was lucky enough to be invited to join and true to Freds statement he tries to keep the course at a level where you always feel stupid and belive me I felt REALLY stupid. The good thing about feeling stupid was I actually learnt something. You kind of learn to program by accident (quoting Tom Hall).

This is where the Ruby, rBongo, WeBogo bits come in. Fred uses Ruby to illustrate OO programming best practice and to help you understand OO in general a side effect of this is that you start learning ruby syntax and start learning the programming vocabulary needed to accomplish the tasks, having gained some experience with ruby during the course I thought it best to use ruby to continue learning to program.

I have been working on Bongo since it was founded and the other day I was speaking to Alex the project lead and we realised it is almost 10 years now. I have always wanted to contribute more than just packaging the app on the OBS and being available to do testing and such. Alex wrote the PHP binding for the Bongo Store and having seen what some of the guys can do at Forward with Ruby and jQuery I wanted to create a binding for the store in Ruby and create a gem from it thus allowing anyone to create the best REST interface ever.

This is forcing me to learn TCP Sockets win Ruby and other nice things. I will try to document as often as I can what I am upto on this.

My efforts will be on 2 Ruby projects. Initially I will need to work on rBongo which is the ruby binding for the Bongo store I am sure most of the developers at Forward could probably write this in a day or so, hopefully I can convince one or two of them to help out .

My second effort will be on WeBongo the REST webui for the Bongo mail store. I have other ideas for the webui once we have a working solution (using it as a sync destination for Tomboy desktop notes)

Please keep that in mind as I try to get this working.

Bongo-Project.org Needs To Be Renamed

The Bongo-Project needs to be renamed

Now before you fall of your chair or swallow your phone while reading this let me explain why.

I have been wanting to create this post for sometime now and have been holding off as we are almost ready for our 1.0 release.

The problem I have is that even if we released a new version of the software and it was our 1.0 release I am not sure anyone will be able to find us. I have been doing some digging over the last few months about what actually we are and to be honest I am not convinced we are “Individual” enough. We as a project get lost in the Bongo Project mahem that is People who play bongo’s as instruments.

Right from day one when we started this fork we had a problem with the name, we chose ” Bongo” as a name as an interim measure so that we had something to call ourselves while we thought of a new name. This has obviously not happend and I would like to kick this discussion off before we are ready for 1.0 so we have time to get it all done so we can release both to the outside world at the same time.

Now I know that this is not something lightly taken on and also it would mean quite a bit of work on the part of the limited Dev’s we have to change the code as well as then changing the website and our images and stuff.

I am now thinking I will spend £30.00 on a prize for the winning name. So now I need to find out what the community think and if there is apetite for this.

I have created a poll on my site for some active feedback

let me know I really want to know

UPDATE

This will be put on hold untill further notice

Creating a Two Node Mysql Cluster On Ubuntu With DRBD

Creating a Two Node Mysql Cluster On Ubuntu With DRBD

To create this cluster you will need 2 ubuntu node servers installed as follows.

I am creating this cluster inside of vMware so I created 2 VM’s with:

1GB RAM

1 10GB hdd for the root (/) partition.

1 20GB hdd for the database store.

I downloaded the ubuntu 9.10 server iso and presented this to the VM’s and started the install.

This is by no means an in depth install instruction.

I have just captured screenshots to show what I did.

So here we go with the install of the machines.

 

You should see this screen on booting the VM. Select the language you want to use.

 

 

 

Then push the F3 key to select your keyboard.

 

Then use the up and down arrows to select the install ubuntu server option and push the Enter key.

Then select your install language using the up and down keys.

 

 

Then select your Country

 

Then Enter the hostname for the system

 

 

We then need to partition the disks.

 

I selected the guided – use entire disk option as these are new servers.

Then select the first disk Which is 10GB here. We are only formatting the system disk as we need to make some changes to the other disk before we format it later on in this series.

Selecting this option lets Ubuntu manage the system partition in the default manner.

 

You will then be asked if you really want to write the changes to the disk. As these are new servers you select YES.

 

 

Now we create a new User that will be used to access the server to administrate it. Enter the Full name e.g. “John Doe”

 

 

 

After you select continue you will be asked to select or type a username.

 

Select continue after you are happy with the username. And you will be prompted for a password.

 

 

Enter a new password and select the continue option. You will then be asked to enter the password again.

 

After entering the password again select the continue option. You will then be asked if you want to encrypt your home drive. As this will be a server I selected No.

 

You will then be asked if you need to add a proxy address to access the internet. In some businesses this is a required solution for me it was not necessary. Select Continue when finished.

You will be asked to enable updates for the server. The choice is yours. I prefer to automatically install security updates.

 

 

The next screen is related to the software patterns that you would like to install.

 

I moved the red bar down and used the space par to select the openssh server. The reason for this is to allow us access t othe console of the server via an ssh terminal.

 

 

Once you select continue the install will take place. After a while the following screen will come up that shows the install is complete and that the server will now reboot.

 

 

This is the last task for the install process We will move on to the configuration of the server once it has rebooted.

Part 2 can be found here

 

Standing up and being counted.

I have for some time now been wondering how many people actually use Bongo.

The reason for this is that we have had images available for a while and I am still non the wiser as to how many people actually use them.

I faithfully spend hours and hours building packages and getting them out the door but have no markers to see if they are being used.

While reading the docs for the ESVA appliance (http://www.global-domination.org/esva) I noticed that they have a cronjob that downloads a file and immediately deletes it. This allows for roughly seeing who is using their appliance .

They have documentation that tells people how to remove the cronjob which effectively turns off this tool.

I propose that the Bongo project perhaps use something similar to allow us to know how many people use the products we produce. it would be nice to know how many people are using Bong while the Web-UI is not working and then once we release something if that number increases and at what rate.

I am really  interested in ideas as to how we can achieve this with or without having some kind of phone home too.

Please leave a comment on this post if you like, or send an e-mail to the user or devel list or even come and have your say on the IRC channel.

I have also added a simple poll on the left

Thanks in advance

vMware workstation 6.5.3 on openSUSE 11.2

I have just upgraded to 11.2 from ubuntu 9.10 on my IBM / Lenovo T61 laptop. ( I will post a better blog about that later)

What I wanted to mention here is that the current vMware workstation 6.5.3 does not want to run on my system.

I have found this post http://k—–k.blogspot.com/2009/09/install-vmware-workstation-653-on.html

Which has steps for compiling the modules yourself but by the look of things is based on 32bit openSUSE.

I will see if I can get it working here on my 64bit machine

Great News About rPath Images

I have great news about the images on the rPath system.

I have been able to get Bongo 0.6.1 to build on the rPath system with a json patch from Alex.

I have promoted it to the QA and RELEASE repo’s so it should be available for you guys.

Please test and let me know if you have any issues.

You can find the images here

Bongo rPath Images

I have been trying to get the latest 0.6.1 release of Bongo onto the rPath images. This unfortunately has not been possible due to our reliance on a newer version of Python than what is available on the rPath system.

This is a sad moment as I have been doing that for quite some time now and will not be able to continue.

So for those that have images which contain Bongo on a rPath system please use either the Fedora, Suse or Gentoo packages that we have created.

Thanks to everyone who has helped me over the years and especially Stu Gott who was instrumental in moving the images forward.

If  rPath eventually support python 2.6 I will revisit the images on their platform.

Images for Bongo 0.6.0

I have been working on the images in the Suse Studio environment as I mentioned in my blog post  here.

I started the investigations to find that our RPM repository was in need of a bit of work. I wanted to create a new repository in my own name that would allow me to build these RPMs for the project.

Thinking about the delivery of the RPM’s I thought it best to open a repository with a generic name namely “bongo-project”.  This would allow more than one person to work on the repository, but for the repository to keep its identity.

Once the repository was setup I realized that I had to learn RPM packaging as I had been so used to the Conary way of packaging that it was almost second nature.

After quite a long time I have been able to get consistent builds from the OBS which have produced RPM’s for a number of OS’s.

Now cam the part that I really to do from the start Create images.

All in all it has been a painless effort as the interface is easy to use and intuitive. I only had to ask for help a few times to find out that the error was mine and not the studio’s. I have created images for the following

  1. ISO Live CD
  2. Vmware Image
  3. Xen Image
  4. USB/HDD Image

These images are all x86 (32bit) and do not have any web interface (well we ripped it out remember)

The only downside at the moment is that they have not created the marketplace yet so any images created will be deleted after a while.  This left me with a dilemma, how do I publish the images?

My solution…..

To create a subdomain on my own website for the bongo downloads.

The link is Http://bongo.haigmail.com

Here you will find a crude yet cute website with links to the bongo tar.gz files. I was impressed with the size of the images about 150mb each which I think is quite good.

For those of you on the rPath images as promised I will be creating one more update to that image set unless there are enough of you that want it. I have a problem in that Bongo does not work on Python 2.4 which is the deployed version on the rPath system.  rPath is not the only OS affected CentOS 5 and RHEL 5 are also affected by this. I have asked the guys to look at why it is failing and to see if they could get it working as soon as I can build it I will.

I would really like to know who of you are using the rPath images as I have no idea how many of you there are. Please post a response here if you do.

HTC Hero owner

Over the weekend I was able to have my mobile contract changed and part of the deal is that I get an HTC Hero.

This has made me quite happy as I have been forced to run windows mobile on my old phone for far to long and it is refreshing that I have an android phone.

The first thing I noticed was that the box was really small, I wondered if they had actually just given me the charger by mistake.

As soon as I had opened the box the shiny new black phone was there and there was even place for the charger. In past occasions when I have taken possession of a new phone I dumped the box and manual and turned on the phone, because how difficult could it be to use it?

I went against my better nature and actually looked for a manual in the box and there was none, at first I thought that HTC had eventually realised that Men NEVER read the manual and had not provided one as it was just wasteful and well useless. I dutifully plugged the phone into the socket and waited for the phone to charge, this did not take very long as I was able to turn the phone on after only 2 hours and the battery reading said full. I was in business.

I started clicking round on the application list and found the pdf reader. I thought that would be a good thing to have. When the app opened I realised that HTC had just moved with the times and supplied a PDF user guide all 200+ pages of it.

One of the things that annoys me is that your contacts get synced to a google account. I really don’t like that at all. My contacts are MY property and I want to keep it that way.

I have searched for some time now for a contacts app that allows you to use the phone without contacting google or some other company to store your data. I have looked at what it would take to code my own one and then realised I can’t code……. say no more.

I would really appreciate any help in finding this killer app for my system.

I am really excited that we could develop an app for android or the iPhone that interfaces with our whole system and then this problem goes away. I just can’t wait. Enough for now I need to search for my contacts app.

EDIT: I just realised that I forgot to mention that there is no app I can find that will sync your evolution/thunderbird PIM to the android system. I have searched high and low but as far as I can tell nothing exists.

Boy I wish I could code

Results of the OS poll

You will be able to see from the poll archive that the following OS versions seem to be more popular

  • Ubutnu 9.04 (53.0%, 19 Votes)
  • Debian 5 (39.0%, 14 Votes)
  • CENTOS 5 (28.0%, 10 Votes)
  • openSuse 11.1 (22.0%, 8 Votes)
  • Fedora 11 (19.0%, 7 Votes)

I will now start to work on the packages for these OS’s.

From the outset I see that we have quite a few Debian based users and this is a problem for me as I have no idea how to package for Debian. Not that I know much about packaging at all.

I have now set-up the osc build server (thanks to Fatpelt for supplying a 64bit hardware platform for us) as a test run I have tried to package the gmime package for Fedora as this is a requirement for Bongo. It has built fine so this was a plus.

From the initial errors I can see in the openSUSE build service. We need to look at our init scripts and also the spec file we have. quite a few errors were kicked out by rpmlint.

I would appreciate any help with the Debian Ubuntu package creation as well as spec files for each of the rpm distributions.

Thanks

Lance