I was tasked with backing up Confluence and Jira. Sounds easy enough. They both have an XML backup that can be run automatically. The only problem, for me at least, is that the XML backup can take up a lot of space especially if you backup the attachments. On the last server we had, we actually ran out of drive space because the backups were just piling up.
So I decided to go a different route. The Atlassian folks actually recommend not using the XML backup anyway since it will eventually take too long or take too much space or could even become unstable. According to the documentation, all I needed to do was take a dump of the database and backup the Attachments directory.
I also wanted the backups to be run on a daily basis and wanted some way to monitor the backups. We use Hudson for our daily builds, so I wanted to use that for the backups. I also wanted to use Ruby (actually JRuby) to write the scripts. I really only wanted to use Ruby because it seemed cooler than writing a batch file.
I don't want this post to be too long so let me just go over the major issues and realizations from doing this little chore.
First of all, it took me a while to figure out how to get Hudson to run stuff on a remote machine. Basically you just need to create a free style project and then have the Job execute a Windows Batch file. Of course, nothing is that easy: If you run Ruby or a Batch file from Hudson, it assumes you are executing on the Hudson server and not on the remote machine.
I ended up using PSEXEC to enable Hudson to execute the program remotely. PSEXEC is an awesome tool that I've never heard about before. It just worked. How cool is that?
Anyway, after that find, it was just working out little kinks in the system. For example, PSEXEC did not like output streams when you run it from Hudson. It would give you an ERROR Code 1. To fix this, all you do is make sure your batch file has ECHO OFF at the top. PSEXEC would also hang when run from Hudson and I ended up putting an /accepteula switch to prevent it from hanging.
Secondly, I've come to the conclusion that Ruby ain't all that. I'm sure it is good for certain things, but just doing simple file manipulation (copying and zipping files) is just a pain. I had a hard time finding examples of copying directories and zipping files. And the ones that I did find didn't work. I ended up spending half my time trying to figure out how to do things in Ruby. Granted I don't know Ruby at all, but still, I would have thought examples for these simple tasks would be everywhere. So maybe Ruby is just not meant for those tasks. I ended up doing the script in a Batch file. Kind of ghetto, but it worked really well. Batch files may be a bit under rated.
So anyway, the chore is over. Everything works just the way I wanted it to work, with the exceptions of the tools that I ended up using. I think that's just the way things go sometimes. You need to roll with the punches and use the tools that fit the problem.
One final note. I obviously did not figure this out all by myself. It took a lot of Googling of the discussion boards, blogs, and all that good Internet stuff that is out there to find what I needed. Thanks to everyone that posted solutions to their problems because it sure helped me. I just wish I saved all those links so that I could give them proper credit for their work. I was working on an app that would help do just that...Shoebox v 0.1...maybe I should dust that one off and start working on it again.
Wednesday, September 24, 2008
Friday, September 19, 2008
Flex Graphics Library
I wanted to include custom graphic into my Flex application. I wanted to have something that I would be able to manipulate in code and also look the way I want it to look.
After some searching I found Degrafa. Degrafa is a graphics framework for Flex. It allows you to create custom, sophisticated graphics using the Flex markup language.
I haven't done too much with it yet, other than verifying that it works. I got it to display a simple circle in about 4 lines of Flex XML code. The only real problem, or inconvenience so far is that the graphics do not render in the Flex Builder designer. You need to compile the code and view it in the run-time application. I'm not sure if I'm doing something wrong or not, but at least it works.
This sample application that was done by Thomas Gonzalez for the 360 Flex conference in San Jose was done using Degrafa.

You can check out the working application here.
After some searching I found Degrafa. Degrafa is a graphics framework for Flex. It allows you to create custom, sophisticated graphics using the Flex markup language.
I haven't done too much with it yet, other than verifying that it works. I got it to display a simple circle in about 4 lines of Flex XML code. The only real problem, or inconvenience so far is that the graphics do not render in the Flex Builder designer. You need to compile the code and view it in the run-time application. I'm not sure if I'm doing something wrong or not, but at least it works.
This sample application that was done by Thomas Gonzalez for the 360 Flex conference in San Jose was done using Degrafa.

You can check out the working application here.
Saturday, August 30, 2008
Flex Unit
Tried out Flex Unit today. Setup was really easy. I followed the instructions that I found here and was up and running in 20 minutes.
Writing the tests were similar to the older version of JUnit. You basically create your tests, then you need to create a test suite to run them. Creating the test suite is kind of a drag, but on the plus side, you get a pretty nice UI from FlexUnit.

This is a snippet of the UI, but right out of the box, it just looks nice.
Writing the tests were similar to the older version of JUnit. You basically create your tests, then you need to create a test suite to run them. Creating the test suite is kind of a drag, but on the plus side, you get a pretty nice UI from FlexUnit.

This is a snippet of the UI, but right out of the box, it just looks nice.
Thursday, August 7, 2008
The Zoo
This post is a little off topic but I just thought it was worth mentioning.
Last weekend we visited the Honolulu Zoo. In the past I've been really disappointed with the zoo. It used to look run down and the few animals that they do have are usually hiding out somewhere and you really never get to see them. Anyway, I think they did some major renovations because the zoo looks great now. We got to see a lot of the animals and the exhibits looked really nice. We were about a foot away from a pair of Cheetahs, a Siberian Tiger, and ... Fancy Chickens (?).
Kama'aina rates are just $4 for adults. It's totally worth checking out.
Last weekend we visited the Honolulu Zoo. In the past I've been really disappointed with the zoo. It used to look run down and the few animals that they do have are usually hiding out somewhere and you really never get to see them. Anyway, I think they did some major renovations because the zoo looks great now. We got to see a lot of the animals and the exhibits looked really nice. We were about a foot away from a pair of Cheetahs, a Siberian Tiger, and ... Fancy Chickens (?).
Kama'aina rates are just $4 for adults. It's totally worth checking out.
Thursday, July 31, 2008
Inspiring
I've been going through a rough couple of months with my work. Mainly it's been a bit boring and not too much fun. I was recently forwarded a link to The Last Lecture by Randy Pausch from Carnegie Mellon. I saw this when it was first posted sometime last year but I decided to watched it again.
Without even going into the fact that my problems are minuscule in comparison, his lecture was inspiring to me on many levels. He talks about having dreams and working hard and living right as ways to achieve your goals. He also talked about mentoring, something that I really enjoy doing but have not been able to do too much recently.
So I've decided to get out of my funk and focus on building upon my skill set, working hard to achieve my goals, and try to help others as best as I can.
I have also decided to spend the rest of the Summer teaching my son to use Alice. Alice is a tool to help students learn to program using a 3D interactive programming environment. It makes learning the basics of programming fun and interesting. Randy Pausch was one of the people who helped to put Alice together.
Thanks Randy...
Without even going into the fact that my problems are minuscule in comparison, his lecture was inspiring to me on many levels. He talks about having dreams and working hard and living right as ways to achieve your goals. He also talked about mentoring, something that I really enjoy doing but have not been able to do too much recently.
So I've decided to get out of my funk and focus on building upon my skill set, working hard to achieve my goals, and try to help others as best as I can.
I have also decided to spend the rest of the Summer teaching my son to use Alice. Alice is a tool to help students learn to program using a 3D interactive programming environment. It makes learning the basics of programming fun and interesting. Randy Pausch was one of the people who helped to put Alice together.
Thanks Randy...
Thursday, July 17, 2008
You Get What You Pay For
Maybe I'm just a bit naive and maybe a bit lucky. But so far almost every tool that I've downloaded and tried from the Internet has been pretty reliable. I mean as long as it comes from a reputable site or recommended by someone who seems trustworthy or knowledgeable, they just seem to work.
So anyway, I just tried this Ant code to create a task for Doxygen. (I didn't make the call to use Doxygen, but it's pretty good, if you really care a lot about documentation). But back to the Doxygen task for Ant. I got the link from the Ant web site in the External Tools and Tasks section. So you would assume all the tools and tasks are tested and they all work (and yes, I read the disclaimer at the top, but still). I tried the Doxygen task and for some reason it just didn't work. I spent the majority of a day trying to figure it out. What it eventually turned out to be was a configuration property that was being defaulted into the config file from the Doxygen task Java code. Who would have thought that a bug that would make it not run would be in distribution binaries? For the longest time I thought it was some sort of setup issue on my end. Anyway, I also ended up fixing another error in the code that someone else found and had posted in the bugs section and put in a few custom things that I thought might be a good idea. I also posted my bug find and solution into the bug list as well.
Don't get me wrong, I really appreciate the code that Karthik A Kumar wrote. It was really well done and gets the job done in a very cool way. The Doxygen Task really helped me out a lot and saved me a lot of time. I also learned a lot about Ant Tasks and Doxygen along the way. I think it was time well spent.
But just remember, things aren't always perfect...especially when they are free.
So anyway, I just tried this Ant code to create a task for Doxygen. (I didn't make the call to use Doxygen, but it's pretty good, if you really care a lot about documentation). But back to the Doxygen task for Ant. I got the link from the Ant web site in the External Tools and Tasks section. So you would assume all the tools and tasks are tested and they all work (and yes, I read the disclaimer at the top, but still). I tried the Doxygen task and for some reason it just didn't work. I spent the majority of a day trying to figure it out. What it eventually turned out to be was a configuration property that was being defaulted into the config file from the Doxygen task Java code. Who would have thought that a bug that would make it not run would be in distribution binaries? For the longest time I thought it was some sort of setup issue on my end. Anyway, I also ended up fixing another error in the code that someone else found and had posted in the bugs section and put in a few custom things that I thought might be a good idea. I also posted my bug find and solution into the bug list as well.
Don't get me wrong, I really appreciate the code that Karthik A Kumar wrote. It was really well done and gets the job done in a very cool way. The Doxygen Task really helped me out a lot and saved me a lot of time. I also learned a lot about Ant Tasks and Doxygen along the way. I think it was time well spent.
But just remember, things aren't always perfect...especially when they are free.
Gamer Bus
We were invited to a birthday party for one of my son's friends. The party was at a park and they rented out a bus with video games. It was pretty cool. They had 8 XBox 360s in the bus. One side had a long leather couch and the other wall had 8 LCD panel mounted to the side. Pretty cool.
Outside the bus, they setup a Wii to keep people occupied as they waited to get into the bus.
They basically rotated the kids (and me) into the bus to play 5 minute Halo3 tournaments. I managed to not get motion sickness as I played, which was good. The kids had fun sneaking up on me and bashing me with their guns, which was not good. They didn't even want to waste bullets on me......punks.
Outside the bus, they setup a Wii to keep people occupied as they waited to get into the bus.
They basically rotated the kids (and me) into the bus to play 5 minute Halo3 tournaments. I managed to not get motion sickness as I played, which was good. The kids had fun sneaking up on me and bashing me with their guns, which was not good. They didn't even want to waste bullets on me......punks.
Subscribe to:
Posts (Atom)