Building my Orion Server [Scripting Edition] – Step 3

This is it.  The endgame.  Here I’ll give you the final steps in configuring my server.  We started with creating the virtual machine then moved to configuring the disks.  We’re at the end – where’s it’s time to do the final configurations.

In summary, we’re going to do several steps here.  They pretty much follows my other guide step-by-step, so I’ll be brief in covering them here.

  1. Variable Declaration
  2. Installing Windows Features
  3. Enabling Disk Performance Metrics
  4. Installing some Utilities
  5. Copying the IIS Folders to a new Location
  6. Enable Deduplication (optional)
  7. Removing unnecessary IIS Websites and Application Pools
  8. Tweaking the IIS Settings
  9. Tweaking the ASP.NET Settings
  10. Creating a location for the TFTP and SFTP Roots (for NCM)
  11. Configuring Folder Redirection
  12. Pre-installing ODBC Drivers (for SAM Templates)

It seems like a lot, but each script snippet is small.

Variable Declaration

This is just where we setup the drives where we’ll keep the various parts of the install.

Installing Windows Features

This is simple – we add the necessary Windows Features.  The SolarWinds Orion installer can do this, but I like doing it in advance so that I can tweak some settings.  Note – if you don’t want to use Data Deduplication for your log files, you can omit that feature and skip that script part where we enable the deduplication of the log drive.

Enabling Disk Performance Metrics

Like I said before, I got used to seeing these in my Task Manager from my Windows Client machines, so I wanted to put them back.

Installing some Utilities

Here I install NotePad++, 7-zip, and a few other tools that I like.

Copying the IIS Folders to a new Location

I don’t like running my web-stuff on the operating system disk.  So, I’m moving it elsewhere.  Actually, I’m copying it because I want to use the original location as a source for the permissions that I’ll need

Enable Deduplication

Super-simple here – just turn on Deduplication for the log drive.

Removing unnecessary IIS Websites and Application Pools

Since Orion will install it’s own website and application pools, I can remove the existing ones to save on resources.

Tweaking the IIS Settings

This is the most complex portion.  The summary is that I’ll be opening up the IIS and ASP.NET configuration files and changing a bunch of settings.  I do this using the System.Xml.XmlDocument type because it’s much easier to navigate.  A summary of the changes made can be found on my original post.

Tweaking the ASP.NET Configuration Settings

Also complex, but handled the same way.

Creating a location for the TFTP and SFTP Roots

These two roots are going to be used after the installation, but I hate that they normally get put on the C:\ Drive.  So I create the folders here and then I’ll have to change them in the application after we install it.

Configuring Folder Redirection

This was (by far) the hardest part to script out – only because I wanted to add a few more changes from the original post.  It turns out that “mklink” isn’t an executable.  It’s a function (like “dir”) that it executed in the command shell.  So figuring out the best way to handle this was a little tricky.  I finally found the answer by simply executing a command shell and passing it the entire command.

What did I add?  I moved the SolarWinds Log folder to the Log Drive and I moved the default program installation location to the Programs Drive.  Now I don’t need to remember to change the target for the first installer!

You’ll notice the “Order” Property that I added.  I did this because these need to be run in a specific order as to not cause linking failures (a link is being created to a subfolder, even through the parent folder doesn’t exist).

Pre-installing ODBC Drivers

Because I use a bunch of different database engines in my environment that I want SAM to monitor, I have to install the ODBC drivers for each engine.  The problem is that I always forget to install them until I’m actually trying to configure the Application Template.  This annoys me, so I figured it might be better to install them in advance.

Results

So, if I put this all together and run it as an Administrator I get this:

The entire process took only 2:13!  And of that the majority (1:44) was waiting for the Windows Features to install.  This process (just step 3) used to take me at least 30 minutes with a checklist.

Now, I was able to go from no VM at all to Ready for SolarWinds Orion installation bits in under 20 minutes (10 of which are installing the O/S).

Last thing:  Apply Windows updates and reboot.  Then do it again.  And again.

So that’s it.  That’s my 3 step process to building better Orion Servers.  Please feel free to provide feedback on anything you see here.  I’m always happy to get it!

Leave a Comment