Ok, so it’s been awhile since I put up the last part. So long that I actually ended up looking at some other hypervisor options, and still ended up going with Proxmox. I’ve also made it slightly more robust by running two host machines in a cluster configuration. I not running many virtual machines right now, but the ones that I do run are mostly OpenVZ containers from TurnkeyLinux.org, which Proxmox has a built-in integration to download templates straight from them. There are also other OpenVZ templates from Proxmox for a few standard linux server OSes, but the Turnkey Linux ones seem better at being kept up to date. Below the fold is a short list of what I’m currently running and a few that I plan on setting up at some point. Continue reading Running a Home Virtual Server – Part 2: Contemplating Containers
At work, our ERP system is built on Oracle running on a clustered Linux (Red Hat Enterprise) environment. Since this is a high availability/failover setup the processes running our development databases can be on either server for any number of reasons. I wanted to make installing code a bit easier on the server so I made some bash scripts to partially automate the install for me. Not wanting to get errors when it tries to install code on the wrong server, I found this little command to determine if the database is running on a server and thus let the script go on with the install.
ps -U oracle -u oracle u | grep -q pmon_dev2
Lets break this down into each part. The first part,
ps -U oracle -u oracle u, gets the currently running processes running as “oracle” (first “-U” for real and second “-u” for effective ID) in a user-oriented format (last “u”). This is similar to an example in the MAN page for PS and I just replaced the usernames to fit my case. The pipe (“|”) takes the output from the left side, the PS command in this case, and uses it as input for the right side. The second part,
grep -q pmon_dev2, searches for “pmon_dev2” in the output from PS, the “-q” option suppresses output and exits successfully if any match is found.
So I just put this at the beginning of my script:
if ! ps -U oracle -u oracle u |grep -q pmon_dev2
echo "DEV2 not running"
This exits the script right away if the database isn’t running on the server. If it is, then the script goes on to get the latest code from source control run the code install and exit. If you can do this with no user input, then you can setup a CRON job to run the script to automatically get any updates.
After spending most of this week working with and debugging approximately 8,000 lines of PL/SQL contained in two packages, I want to mention “Refactoring” by Martin Fowler. It’s one of the few books I had to buy in college and have kept since then. If your code smells, clean it up… That is all.
Now back to your regularly scheduled programming.
With recent Bitcoin coverage in the news and media, I’ve picked up playing around with it again. One thing that came to mind was something that would make it easier to make payments to addresses found on the web. My first thought was doing the same thing as a MailTo link on the web, click the link and the client opens up with the details in place. Granted copying and pasting the address isn’t that big of a deal, but this makes it easier to send or donate to a website.
Now I have to be honest I wasn’t sure what the correct name for the MailTo link was called. One quick Google search led me to the MailTo URI Scheme Wikipedia page. Another Google search for “Bitcoin URI Scheme” led me to this page with a technical write up of a URI Scheme for sending Bitcoin payments. Lo and behold, the samples on that page work just like I’d expect by opening the local client on my computer with the address filled in. The only problem I can see is that most sites aren’t using this already. I would imagine that this would be a no brainer, where anything that makes it easier to send you money is always a good idea. So here’s my plea to other sites to add the code needed for the bitcoin link.
Just in case anyone needs a refresher, it’s done with the <a> tag and in it’s simplest form would look like this.
<a href="bitcoin:PutPaymentAddressHere">Link text goes here</a>
So I’m working on a project at work to evaluate and implement a source control system to replace a fairly non-existent use of Visual SourceSafe. It has been a while since I’ve looked really in depth at any version control software and I have to say that I’m impressed with the advancements around them. Not necessarily in the version control systems specifically, but in a lot of the auxiliary functionality that they can offer either natively or as with easy add-on. Things like automated builds and continuous integration are things that weren’t even on the map last time I looked at this in any depth.
At my work we decided to evaluate three types of version control; Team Foundation Server (TFS), Subversion, and Git. I’m most familiar with Subversion since that’s what I’ve used in the past and TFS is a fairly obvious choice for us since we are mostly a Microsoft shop with the tools we use. Git however was a bit of a research project for me and I have to say that we fairly quickly decided that it wasn’t for us. Don’t get me wrong it has it’s use cases where it shines, particularly in development environments where the development team is widely dispersed geographically and not necessarily always network connected. In these cases Git seems really ideal which is probably why it has taken off and is so popular in open source projects, but this is completely different from our primary development environment and the downsides outweigh these benefits.
I don’t know which way we’ll end up going at my job. We’re wanting something simple that will be easy to use and we’re just implementing source control as part of the project. This is why I’m starting to think that we might go with Subversion because TFS can be such a bear to administrate and after getting them installed and starting to set them up, I can understand.
So everything has been pretty busy recently and here’s a quick update for some projects. I had some hardware problems with my home virtual server project. I think it came down to a motherboard that went bad, so I changed out the internals and then had some “less than graceful” shutdowns. I think this might have caused some trouble with terabyte drive, but interestingly the RAID 10 setup seems to be fine. In switching out the hardware I did have to downgrade as well, so I bought another Core 2 Duo from my university’s surplus sale recently and upgraded it back to original specs. I’ve also thought that I would dedicate the mass storage into a NAS build from another surplus computer. I’ll have some more about each of these in the near future.
You may have heard about the Raspberry Pi, which is a low cost ($25 – $35) ARM based computer that has been making the rounds with some geek/technology enthusiasts. Their stated goal is to get more kids interested in programming and computer science by creating a low barrier to entry as possible. There’s been a huge demand for the board from the community and some really cool projects have already been started around them. If I get any, these projects are what I have in mind for them.
- As an “HTPC” probably using Raspbmc. I’ll probably want to use this as a receiver for a more powerful media streaming server.
- Driving a wall mounted LCD as a digital signage type display
- An upgrade would be to drive a touchscreen and make it a “Control Center”
- Home monitoring and automation
- Data Acquisition system – I don’t know what this means yet, but it sounds cool…
- Car computer
- Kitchen computer
- Weather Station
- Of course there’s always the option of using it as an actual computer too…
I think it would be a good fit for any of these type projects, and the low cost makes it ideal for specialty purposes. I’ve seen plenty of people say that they would use it as a NAS and while it would be able to function like one, the performance on it isn’t going to be good at all. The mass storage will be limited to the USB (2.0?) speeds. It could work if you’re wanting to play around with some concepts or as a Pogoplug replacement, but you’ll quickly want a more robust full blown NAS solution when you inevitably scale past the Raspberry Pi’s performance.