Monthly Archives: January 2009

Going Hyper

I built myself a new server last weekend, as the old one (a Dell 620 that was shipped in 2001!) finally kicked the bucket.   With much help from Horsey, I pieced together a dual-core monster with 8GB of RAM and a saucy new case.  Horse suggested I look into a bare metal hypervisor OS, like ESXi, which I thought was a smashing idea.  I have been doing much of my work in VMs these days, and probably am in the same place as Kyle.  However, I was finding out that once I was in the land of VMs, I always wanted more.  There’d be some reason why I needed another VM environment, but having that many being served up by the lappy was slowing…things…down.  My laptop is running Windows Server 2008, after I got sick of Vista, a move I highly recommend.  (Incidentally, if you do move to WS2008, remove the “Windows System Resource Manager” Feature.  The wmiprvse.exe process was kiling me)

So, I tried ESXi, but my boot drive was an 80GB SATA drive, and the installation process could not find it.  Actually, it couldn’t even find the controller.  I found all kinds of tricks to try to get it to work, but no dice.  So, Horse suggested XenCenter , but before  I had a chance to look at it, I found Microsoft Hyper-V Server.  It’s MS’s answer to the bare-metal hypervisor.  No GUI, no server roles, just a bare install that serves up VMs via Hyper-V.  I have been liking Hyper-V on the workstation, so this was intriguing.

After downloading the iso and creating the image, the install was crazy easy.  It asks very few questions, reboots, and it’s done.  You get screen that looks like this:

The bare Hyper-V Server desktop

The bare Hyper-V Server desktop

As you can see, there isn’t much to it.  You can set up a network connection, download updates, and set local administrators.  You can also enable/disable remote desktop.  All pretty basic stuff.  The installation guide itself is a bare Word doc, and the configuration guide isn’t much larger, which I consider good things, as bulky documents are not indicative of anything more than wordy technical writers.

I should point that I am not a hypervisor or OS guru, by any measure.  I know enough about Windows OS to get what I need done, and I use people like Horse as my external hard drive for the more rare and difficult needs.  The fact that I set up this hypervisor means that any organism with opposable thumbs could easily do so as well.

The singular issue I had setting up the OS was seeing it from other machines.  I work out of my house and VPN into home base.  This means, that, in order to put one of my boxes on the domain, I have to VPN in first.  I tried to figure out how to do this briefly for the hypervisor, but gave up as it’s not all that important that it is on the domain.  However, this caused me grief when trying to see the box from my laptop on my home network.  After much trial and error, I finally had to put the server in the lappy’s host file and the lappy in the server’s host file, as well as basically disable the fire wall on the server.  I don’t think I’d have had near the issues if the hypervisor had been on the domain.  If you are on a domain and having issues, start with HVRemote, as it seems to solve many others’ issues.

Once you can see the server from your laptop (or other boxes), you can use the Hyper-V management tool to create and start VMs.  This is where I think Hyper-V Server really sells itself.  I am already familiar with Hyper-V, so adding another server node was easy.  Here’s what it looks like:

Hyper-V Manager with Hyper-V Server added.

Hyper-V Manager with Hyper-V Server added.

So, you can see the server and my laptop in the manager window.  Really nice.  Plus, since I went with Hyper-V, I was able to copy one of my Virtual Hard Drives (vhd) from a lappy VM to the server and create a new VM on the server from it.  In other words, moving VMs to the server is WAY easy.  Creating new VMs is also a snap.  The Hyper-V New Virtual Machine Wizard allows you to create a new vhd or select an existing one.  If you create a new vhd, the installation options consist of  waiting til later, using a CD/DVD, or using an .iso image file.  I did the later, and it was great.  I just keep iso files on the hypervisor, and point to them as needed.  Very nice.

I’ve been working for roughly a week now using the VMs on the hypervisor only, and it has been great.  The laptop is faster, the VMs are much faster, and I am getting more stuff done.  All in all, I think Hyper-V Server is a great solution for developers that want to server up VMs in a easy and fast manner.

Reblog this post [with Zemanta]

Restart ArcGIS Server Object Manager Remotely

I wanted to post this because I think it’s cool and showcases the very tip of Windows Powershell. Plus, I got tired of keeping an RD session open the the GIS Server for when I wanted to restart AGS.

If you haven’t discovered Windows Powershell, you should. It is the command line Windows needs. I know very little about it, meaning:

  • You can use .NET to write ‘cmdlets’, which are scripts.
  • You can browse more than just files. For example, you can cd into the registry. I thought this was surreal.
  • You can easily access other boxes.
  • Tons more

Anyway, go download powershell (from the above link) if you don’t have it and open up a PS prompt. This assumes that you are on your dev box and AGS is on a remote server. Type:

Get-WmiObject -computer agsServerName Win32_Service -Filter "Name='ArcServerObjectManager'" | Restart-Service

Replace ‘agsServerName’ with your AGS Server name.  BOOM. Service restarts.  Oh, and it’ll work for any service on the box, just change the service name in the Filter expression.

I have been lightly using Powershell for a long time, but really need to do more with it.


.NET Migrations

InfoQ just blogged on a couple of .NET Migrations third-party libraries, which is something I’ve often wished the .NET world had.

.NET Migrations

The tutorial linked at the end of that article is a goodie.

Check it out in your spare time. There’s a big prize (read: kudos from me) for the first developer to make this work with GDB modelling…

Not quite as smooth as Rails migrations, but great anyhow.

Reblog this post [with Zemanta]

Forced to FLEX

I am on a project where we are delivering a web-based mapping application to the client.  The application has gone through every UI scenario you can imagine: Virtual Earth in Sharepoint to ArcGIS Server Web ADF to ArcGIS Server Javascript API to (presently) ArcGIS Server Flex API.  The Flex decision was made against my recommendations.  I don’t have a lot of ammo against Flex, but I was born and raised in JavascriptTown, HTMLandia.  I have read some HTML/JS vs Flex posts and seen all kinds of opinions, and my research has led me to the one true answer to this debate:  It depends.

As with many technical decisions you meet when creating applications for the web, you need to let your context by your driver.  Trust me, I wanted to take HTML Hill and dig in for the victory-or-death battle, but the client liked a couple of Flex sites.   I mean really liked them.  So, rather than just fight the “but that doesn’t look like Flash” battle constantly (even though I think we could win…let it go…let it go…) we are using Flex.

So, I am a lot like my kids eating their spinach.  They get why they have to do it, but they do it begrudgingly and with a nasty look on their faces.   And, much like the vegetable-hating youngsters, I am reaping some benefits:

  • Knowledge is Power. Learning a new language is always a good thing.  One of my favorite books, The Pragmatic Programmer, encourages developers to learn a new language each year.
  • Flex is a good language. Flex has been refreshingly enjoyable to write.  While I still prefer my HTML with a massive heaping of Javascript sauce, Flex (and ActionScript) is a great language (and a ECMAScript standard, like my beloved javascript).
  • Somes things are easier. Some stuff is easier in Flex/Flash.  The best example is probably cross-domain URL access.  If you want to allow a Flash object to access a URL, you put an XML file (crossdomain.xml) in the root of that site.  You can allow access to anyone, or domains, or all kinds of options.  Having struggled mightly with AJAX/REST scenarios involving the same-origin policy, this was really, really great.  Also, the UI is just easier to create.  Sexy, translucent panels and easy drag/drop capabilities come to mind.
  • Flex tries.  Flex does it’s best to use some web paradigms, like CSS stylesheets.  Many of the style properties are specific to Flex, and I don’t profess to understand even half of them, but it made me feel a bit more comfortable.

Now, from the “I told you so” vault, some of the cons:

  • Accessibility (duh).  If we want this web application to be usable on multiple devices (iPhone, screen reader, etc) then we are gonna have to write a totally different interface.  I understand that even in HTML land there is some of that, but it’s easier and allows for more UI code reuse.
  • Unit testing.  While there are a good number of Flex unit testing frameworks (FlexUnit, ASUnit, Fluint, FlexMonkey, and even RIATest (commercial)) they are all difficult to use in my opinion.  Now, part of this reason is because the map is a custom component and is not friendly with the Flex Automation Framework out-of-the-box.  We have struggled finding a unit testing framework that we like, but I think we’re about to settle on Fluint.
  • Continuous Integration.  After unit testing, the next step is continuous integration, and I have no answer for this one yet.  Yes, I know there are things out there like Hudson, Maven, flex-maven, as well as a series of posts on CI with Flex using CruiseControl.  I think my main issue here is my .NET bubble.  We have other services and applications under development for this client, all of which are .NET based.  We have CruiseControl.NET for these .NET based items (thanks CIFactory!) so I have spent much of my time trying to figure out how to integrate our Flex app into that CI setup.  I think this is the wrong approach and we’ll ultimately have to create a separate Flex only CI server.

The best part apart this project has been actually working with a team of developers again.  My projects before this one were cowboy-ish in nature, so I was doing all the nerd stuff.  We have some crazy-smart people where we work, and it’s fun to tackle this new stuff with them.

While I still pine for my HTML/javascript/CSS/C#, writng the Flex stuff has been (and should continue to be)  a learning experience.  Speaking of learning, if anyone reading this has suggestions or approaches to unit testing or CI or anything else to a new bunch of Flex devs, please comment away.

Reblog this post [with Zemanta]