Archive for category Developing
Bongo Admin UI Images
Posted by Lance Haig in Bongo, Developing, OpenSource, Personal Thoughts on 09/01/2012
I have uploaded some images of the new UI so you can see what it looks like without installing it.
Please let me know what you think.
Building the new Bongo Admin UI
Posted by Lance Haig in Bongo, Developing, OpenSource, Personal Thoughts on 09/01/2012
A while ago Alex (so_solid_moo to the IRC channel) created a php binding for the Bongo API. He also created the start of the new UI that we are working towards.
We started with the admin ui for now as we have created a user interface with the roundcube project that Alex also integrated with.
I stared porting the current Dragonfly assets into the project and I tried to stick to the old design style as much as possible as I really loved it’s look and feel.
After a bout a week I was done and submitted it to the git repo of the new project.
Although I was glad that we had stared the project and that I had done as well as I could on the pretty bits I was not quite happy with the quality of the work.
I was going through my git repo’s this weekend and found the twitter git repo where they have open sourced all their CSS (Cascading Style Sheets) http://twitter.github.com/bootstrap/ this inspired me to see if I could use this as it was MUCH better quality CSS that what I could come up with.
So I started work on the migration as an experiment and from the word go it was so much easier. Their default styles just make sense and to alter or add my customisation took only a very few lines of CSS code.
I was extremely grateful for this as it will enable us to improve our UI as we go along. you can find the new webui in Alex’s github project here.
Thanks twitter
Creating a Two Node Mysql Cluster On Ubuntu With DRBD Part 2
Posted by Lance Haig in Developing, OpenSource, Personal Thoughts, VMware on 11/05/2011
This blog is a follow on from a blog post I wrote ages ago and have eventually got round to finishing it off
In this part of the process we will create the disks and setup the DRBD devices
First we need to connect to the Virtual Machines from a terminal session as it makes life much easier and quicker when you connect remotely.
You will need to make sure that your servers have static IP addresses.
For this document I will be using the following IP addresses for my servers.
drbdnode1 = 172.16.71.139
drbdnode2 = 172.16.71.140
drbdmstr = 172.16.71.141 (clustered IP address)
Subnet Mask = 255.255.255.0
Gateway = 172.16.71.1
DNS Servers = 8.8.8.8 and 4.4.4.4
So to set the IP address as fixed you need to do the following.
Connect to the console of drbdnode1 and login
now we need to edit the file that contains the IP address of the network card
enter the following command and press return
sudo nano /etc/network/interfaces
enter the password for the user you are logged in as
You should see the following screen

now use your arrow keys on your keyboard and move the white cursor to the section that starts with iface eth0
press Ctrl K to remove the line then add the lines below with your IP address details
auto eth0
iface eth0 inet static
address 172.16.71.139
netmask 255.255.255.0
network 172.16.71.0
broadcast 172.16.71.255
gateway 172.16.71.1
It should end up looking like this

Now press Ctrl X to exit
Then Y
Then press Enter to save
Now type in the following
sudo /etc/init.d/networking restart
Do the same for drbdnode2
Now that we have given each server a static Ip address we can connect via ssh to the server to do the admin remotely.
To do this you need to have a machine that has an ssh client installed most linux and osx clients have one already installed if you are on windows look for putty and use that.
So open a terminal on your machine and the in the following
ssh cluster@172.16.71.139 and press enter.
You need to substitute the username you created on your server when setting it up for the word cluster in the above command.
You will be prompted to accept a key for the server. Type yes and press enter.
Now enter the password for the user and press enter.
You should see a screen like this

Connect to both cluster nodes to make sure you are not stopped down the line to fix the problem.
You are now ready to work on your cluster.
First we need to create host records for the two servers
type the following into your terminal session
sudo nano /etc/hosts
and add a record for each server it should look something like this

Save the file as before and do the same for node2 but swap the names and ipadresses
Now we need to install a few packages that will allow us to use drbd
in the terminal on drbdnode1 type
apt-get install heartbeat drbd8-utils
and press enter you should have a screen like this

Press Y and then Enter to install the software. Do this on drbdnode2 as well
Now we need to create the partitions that we will use for the drbd cluster
to find out which disk we will be using run the command
sudo fdisk -l
to see which disks have not been partitioned your screen should look like this

As you can see at the end is the disk /dev/sdb does not have a partition table
look for the line “ Disk /dev/sdb doesn’t contain a valid partition table “
to create a partition table we need to run the following commands
sudo fdisk /dev/sdb
n (to create a new partition)
p (to select a primary partition)
1 (for the first partition)
Enter (to select the start cylinder)
and enter (to select the end cylinder)
w (to write the changes)
the screen should look like this

Do this on both servers
once this is complete we now need to edit the drbd configuration files to set up our clustered filesystem.
In your terminal on drbdnode1 enter the command
sudo nano /etc/drbd.d/clusterdisk.res
Enter the password for your user and edit the file
Copy and paste the following code into your terminal screen and then change the details to match your server names and ipaddresses
resource clusterdisk { # name of resources
protocol C;
on drbdnode1 { # first server hostname
device /dev/drbd0; # Name of DRBD device
disk /dev/sdb1; # Partition to use, which was created using fdisk
address 172.16.71.139:7788; # IP addres and port number used by drbd
meta-disk internal; # where to store metadata meta-data
}
on drbdnode2 { # second server hostname
device /dev/drbd0;
disk /dev/sdb1;
address 172.16.71.140:7788;
meta-disk internal;
}
disk {
on-io-error detach;
}
net {
max-buffers 2048;
ko-count 4;
}
syncer {
rate 10M;
al-extents 257;
}
startup {
wfc-timeout 0;
degr-wfc-timeout 120; # 2 minutos.
}
}
The screen should look similar to this

ctrl x (to exit)
y (to save the changed file)
enter (to overwrite the file)
Now we need to create the DRBD resource
enter the following command into your terminal session
sudo drbdadm create-md clusterdisk
After running this command you should see a screen similar to this

On drbdnode1 enter the following command
drbdadm -- --overwrite-data-of-peer primary all
this will activate it as the primary drbd node
to see if this has worked you can run the following command
sudo drbdadm status
the result should look like this on drbdnode1

and like this on drbdnode2

you will see that drbdnode1 has a status of
cs=”SyncSource”
and drbdnode2 has a status of
cs=”SyncTarget”
this tells you what role they are playing in the cluster
at the end of this line you will see a status resynced_percent=”3.8″
this tells you how much the drbd disk has synced.
Once the sync is complete connect to drbdnode1 and run the following command
sudo mkfs.ext4 /dev/drbd0
this will create an ext4 partition on the drbd file system. Which will sync across to drbdnode2
Configuring heartbeat resource
Now we need to setup the Mysql resource in the heartbeat configuration
firstly we need to create a file called authkeys. The file should be created in /etc/ha.d directory. You can do this with the following command
nano /etc/ha.d/authkeys
in this file you need to add the following text.
auth 3
3 md5 [SECRETWORD]
Replace [SECRETWORD] with a key you have generated.
This file needs to be on both servers in the /etc/ha.d directory.
After you have created the file you need to change the permissions on the file to make it more secure. This can be done with the following command
chmod 600 /etc/ha.d/authkeys
do this on both servers
Now we need to create the /etc/ha.d/ha.cf file to store the cluster config.
You can do this with the following command
nano /etc/ha.d/ha.cf
copy and paste this code into the file
logfile /var/log/ha-log
keepalive 2
deadtime 30
udpport 695
bcast eth0
auto_failback off
stonith_host drbdnode1 meatware drbdnode2
stonith_host drbdnode2 meatware drbdnode1
node drbdnode1 drbdnode2
do the same for both servers
next is the haresources file. Create the file here
nano /etc/ha.d/haresources
paste this code in there
dhcp-1 IPaddr::172.16.71.141 /24/eth0 drbddisk::clusterdisk Filesystem::/dev/drbd0::/var/lib/mysql::ext4 mysql
Your cluster is now ready to role.
All you now need to do is test the cluster which I will tell you how to do in a future blog post
Let me know how you get on
Learning Ruby and rBongo with WeBongo
Posted by Lance Haig in Bongo, Developing, OpenSource, Personal Thoughts, rBongo, Ruby, WeBongo on 08/02/2011
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
Posted by Lance Haig in Bongo, Developing, Foresight Linux, OpenSource, Personal Thoughts on 19/11/2010
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
Standing up and being counted.
Posted by Lance Haig in Bongo, Developing, OpenSource, Personal Thoughts, rPath, VMware on 13/01/2010
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
Posted by Lance Haig in Developing, OpenSource, Personal Thoughts, VMware on 15/11/2009
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 teps 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
Bongo rPath Images
Posted by Lance Haig in Bongo, Developing, Personal Thoughts, rPath on 05/10/2009
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
Posted by Lance Haig in Bongo, Developing, OpenSource, Personal Thoughts, rPath on 09/09/2009
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
- ISO Live CD
- Vmware Image
- Xen Image
- 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
Posted by Lance Haig in Bongo, Developing, Foresight Linux, OpenSource, Personal Thoughts on 08/08/2009
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







