Feed on
Posts
comments

Mercy

It had been a very long night and we had been travelling for a while. It was a long and arduous journey. We were all tired. We set up camp at dawn. I could see that the other creatures of the night, fellow creatures of the dark were quietening down and the creatures of light were starting to chirp and make their various sounds as if music.

We picked a quiet spot to make camp. The strange creature like man they called Acacius led the group, tending to our severely injured leader, Ta’oma with such care and affection, with such love that it was difficult to believe that he was not a creature of light.

As the moon set, the sun rose and its golden rays would soon blind us. We crawled into the most comfortable spaces that we could find while Acacius stood watch. Here was a creature who did not know fatigure, nor did his power or energy wane during darkness of light, a creature akin to a god but I know better – there is no such thing as gods or demons. Except of course within ourselves.

As my eyelids started to shut weighed heavily by the burden of the night, I saw Acacius sit in the middle of the camp, in the lotus posture, eyes closed. I had heard that sight was not necessary in the lives of someone like Acacius or Ta’ome who could simply sense the energy of the universe.

I know not for how long I slept but it felt like mere minutes when I was woken by the screeching of blades. I reached for my sword and leapt to my feet and I saw that several others had done the same. I kicked awake the few that were asleep near me as I witnessed an awe striking image.

Acacius was on his own, hundreds of feet away from the camp, both his hands holding a sword over his right shoulder about to plunge it into the neck of the brightest most magnificent creature I had seen. It was an advance scout – a pegasus, as white as snow and with wings of an angel. As the sword plunged into its neck, it shrieked and the bright brilliant white had the bright red flowing, tainting, dripping, screaming, deafening. The hands that I had held up to prevent myself from being blinded were now covering my ears and my eyes were closed firmly shut.

As I opened them again, the pegasus was on the ground, and Acacius was knelt in front the animal, wiping the blood off on his knee. What kind of a creature was this, that would kill a creature of the light, and yet, pay his respects to it.

As I made my way towards him, he stood up and started walking towards us. I couldn’t help but keep my eyes the magnificence of the creature, now fallen and motionless.

Acacius paid no attention to me as he walked past. I knelt down to touch the slain creature and it was the softest fur that I had ever felt. The blood had dripped along its neck and it was still flowing with gusto. There was now a growing pool of blood on the ground, seeping into its pure soft white fur.

I heard Acacius talking to Abaddon, the one who had taken charge when Ta’ome was injured. “They have been alerted, we have only a few minutes at the most before they get here. We must prepare to defend ourselves. ” I guess neither of them had to explain our disadvantage that we are weaker in the light and that they are stronger.

Abaddon shouted orders and I headed back to join the ranks. Once we dispersed to take our positions, I heard Acacius, whispered to Abaddon, “I cannot partake in this battle.” I could see Abaddon thinking about questioning his motives, then refrained.

As everyone moved to form a circle around the camp, Acacius took his place in the middle, he sat down again the lotus posture and closed his eyes, his sword dug deep into the earth right in front of him.

He just killed one of their soldiers, a scout, and yet he refuses to kill more. If he helped us, we could defeat them easily and make our way to the temple. It was at most another 12 hours trek. I truly struggled to understand his inability to join us in this battle which we would like lose without his help. Ta’ome would be killed or captured. Why does he care for his so yet refuse to assist us to protecting him?

I could not question our orders. These people, creatures, live in ways that I cannot understand, and I left it at that.

Just in that moment, I heard the screech of a winged creature, it was again, as white as the snow but it was small, not larger than a small monkey, but it wielded a sword and moved quicker than my eyes could follow.

I saw as it was struck down by a sword. There was another and yet one more. Then it was quiet but only for a few seconds before what seemed like a swarm of them came at us. It was a strange feeling as the brushed past me and flew around me and my comrades, the softness of their fur in such stark contrast to the sharpness of their blades.

We fought and we found hard and the vast majority of them lie dead at our feet and just as an iota of pride started to rise up within my soul, I saw it; This was again, just an advance guard, the next wave was snow leopards of forms and other creatures that I could not describe, all white. I guessed that they would all be soft to touch yet their growls and screams would describe a contradiction of the most magnificent magnitude.

As we tried to beat back the first wave of what seemed like flying monkeys, they retreated to join their brethren and it seemed like I just blinked before they were just a few dozen feet away from me. At this point, I knew that death would soon be upon me. I closed my eyes for a moment in prayer and cursed Acacius for not joining us, for not protecting us.

As I opened my eyes, The creatures screeched and charged towards us. I dug my feet into the ground and in an instant they all hit a barrier that neither I nor they could see and they fell to the ground. One by one they stood back up and reached out into the air to touch a glow in the air. It stopped them.

I looked behind and Acacius was on one knee, both his hands on the sword. I heard a horn and the creatures started to retreat, slowly at first and started to speed up. I saw the glow in the air now and it was shrinking. I could not understand why the creatures were running since the glow was getting closer to us. It quickly covered enough ground to be a feet or two away from us and we moved backwards into a tighter and tighter circle.

Once we were all as close together as we could be around Acacius, the glow around us stopped for a few moments, moments that felt like hours and it exploded. Racing across the land and as it touched the bright, magnificent creatures, they all fell to the ground. Some of them groaned, some did not.

The ones that were furthest away fell to the ground,  and I could do nothing but watch in awe. A moment later, Acacius stood, took a cigarette, lit it up, reached for his hipflask and took a drink out of it. He allowed himself to enjoy it thoroughly for a few moments.

“They will all be out for a few hours; it might be a good idea to not be here when they wake up”

As part of setting up continuous integration and automated builds and source analysis, the next step is to integrate in the source analysis parts.

To this end, I installed the following plugins:

Task Scanner
FindBugs
CheckStyle
PMD

After restarting Hudson, there are a few additional configuration bits to complete.

I added an additional build step and set the goal as

checkstyle:checkstyle findbugs:findbugs pmd:pmd

I then enabled the four plugins, saved, ran a build and et voila… Just like magic

 

Fair Warning: This is more notes for me to remember and document how to do these things rather than particularly detailed instructions. Therefore, it might be missing sections and will assume a reasonable knowledge of hudson/jenkins and not to mention the benefits of continuous integration and builds.

Installing hudson / jenkins is easy enough. I deployed as part of a pre-existing tomcat6 installation so was as simple as popping the war file into the webapps folder. Tomcat automatically started it up without issues.

I chose to have hudson use /home/hudson as its home directory. Since I am running an ubuntu system, I added a line into /etc/defaults/tomcat6. There are various other ways of doing this but it was a quick fix for me.

You of course need to make sure the directory exists. I also popped in a .m2 folder from my home directory to save it from downloading all the various jar files and included a settings.xml file with appropriate configurations.

Hudson 2.2 uses maven 3 but I use maven 3 locally as well even though the projects pom files were built for maven 2. There doesn’t seem to be any issues with this setup.

First step is to create a new job from the home page. This asks for which type a job you want to create. If you use maven and a standard source control, it is as simple as choosing the first option: Build a free-style software project.

Give it a name and you are brought to the configuration screen. There are a number of options here and I started with the basic set:

I chose Subversion for the source control management section and gave it the svn path. There is a checkout strategy as well and I chose the one to revert and update which I feel to be a bit cleaner.

I chose to poll the scm every fifteen minutes

*/15 * * * *

and saved.

Running the build pulled the code out of svn and stopped there. This was because I didn’t add a step to build / install it.

Go back into configure the job and add a maven 3 build step. This automatically selected the clean install goals. Save and build now and the project was checked out and built without issues.

Success!

There are a number of other options you can play with here but this gives you a solid starting point.

Later on, I will cover the addition of various other plugins for source analysis including findbugs and pmd.

I figured this out the other day from idle curiosity. There is occassionally the need to have a never ending loop to be executed directly from the bash commandline instead of writing a script.

I used this to run sl (yes sl, not ls – try it – I love it) repeatedly.

$ while true; do ; done

for example

$ while true; do sl; done

Bear in mind that this loop is infinite and there is no way to cancel out of it except to kill of the terminal.

Once you have set up a glusterfs volume, you might want to expand the volume to add storage. This is an astoundingly easy task.

The first thing that you’ll want to do is to add in bricks. Bricks are similar to physical volumes a la LVM. The thing to bear in mind is that depending on what type of cluster you have (replicated / striped), you will need to add a certain number of blocks at a time.

Once you have a initialised the nodes, to add in a set of bricks, you need the following command which adds two more bricks to a cluster which keeps two replicas.

$ gluster volume add-brick testvol cserver3:/gdata cserver4:/gdata

Once you have done this, you will need to rebalance the cluster, which involves redistributing the files across all the bricks. There are two steps to this process, the “fixing” of the layout changes and the rebalancing of the data itself. You can perform both tasks together.

As a starting point, to view the status of a rebalance, you can use:

$ gluster volume rebalance testvol status

You can also stop / pause a rebalance with

$ gluster volume rebalance testvol stop

To “fix” the layout changes, you need to run:

$ gluster volume rebalance testvol fix-layout start
Starting rebalance on volume test-volume has been successful

Rebalancing the volume to migrate the data is easy and can be done using a similar command:

$ gluster volume rebalance testvol migrate-data start

To complete both in one command, you just need:

$ gluster volume rebalance testvol start

Easy right?

With this mechanism, you have the ability to have storage that can be expanded on the fly by using additional hardware. You can also remove existing bricks using:

$ gluster volume remove-brick testvol cserver2:/gdata 

This means that you can remove a brick with smaller hard drives, upgrade the harddrives, and re-integrate into the cluster with bigger hard drives. This means that you have a cloud like storage solution which you can easily grow as necessary without worrying about resizing underlying filesystems or hotswapping hardisks or any of that hassle.

Older Posts »