Creating a Single Server Test Environment for Squared Up

Hi everyone,

Recently I was directed to a piece of software called Squared Up, which promises HTML 5 Dashboards for Microsoft System Center Operations Manager, and I could hardly refuse the opportunity for a free trial!

Unfortunatley, its not every day that you keep an Operations Manager environment in your back pocket, and the sheer amount of configuration that can go into a multi server setup, just for a lab is mind boggling! In answer to this, I decided to attempt a single server setup for Operations Manager and Squared Up, and share it with the internet.

Now I know what you are saying, the point of Ops Manager is to monitor servers – you are going to have to set them up anyway ?! While this is true, I wanted to play with some of the more interesting management packs, and not self reference the monitoring environment – and in this instance, I will need all the free RAM I can get to spin up those servers!

Lets take a look at the software…

Company: Squared Up
Vitals: Based in Marlow UK
Licencing: Named User & Feature Based (Brilliant for a powerful tool like this!)
Support: Web KB & Phone
Website: https://squaredup.com/

ExampleDash
F
ig 1 – An Example Squared Up Dashboard

And now today’s tutorial…

What ? 
Configure a single server Operations Manager environment, onto which we can install the Squared Up Trial.

Why ? 
Creating and running a distributed Operations Manager environment on a single PC with Hyper-V is a big ask, this will allow us to play with Squared Up and create some separate monitored servers, despite our lack of RAM/CPU.

Caveats
– Performance is going to be degraded, mostly that of Operations Manager
– This is about as far from a Microsoft Supported Configuration as you will get, and it may go wrong!
– Operations Manager will warn you this isn’t a sustainable environment during install, and its right!

Knowledge and Technical Level
Complex – I am going to assume you know the basics and a little more, of all the technology we are using. This tutorial will only address directly the complexities of an all in one install.

Eg. I am not going to step by step through setting up a basic domain!

Now to the tutorial…

Section One – Create A Hyper-V Guest Server 

To begin this process, you will of course need a Virtual Server. I configured mine extremely simply, 2048MB of RAM & Single Core.

HyperV
F
ig 2 – Hyper-V Guest Config

I have also added two network connections:

External Internet – This is shared with my host, and provides web access.
SquaredUpNet – This is an internal adapter, which I can open ports against to allow access to the console.

Once the server is setup, install Windows Server 2012 R2 (or preferred version!) and continue!

Server2012
F
ig 3 – Server 2012 R2

 Section Two – Configure A Basic Domain 

When you have installed Server 2012, go ahead and use the server role manager to turn it into a Domain Controller, with a brand new forest a single domain.

This step is relatively simple, and you can neglect DHCP Scope Config, and accept defaults for DNS Config – as there is very little network to look after.

I used the following settings,

Domain: squaredup.local
NETBIOS: SQUAREDUP

Section Three – Install SQL Server

In order to use Operations Manager, you must install a SQL database. In this case we will use Microsoft SQL Server 2014 Enterprise.

You can begin the installer in the usual way, and continue with default settings until feature selection.

Warning : You will be strongly advised not to install this on a DC, in this case – we know the risks, so continue anyway.

When you reach feature selection, take the options below – they are the minimum you will need for Operations Manager.

SQL-Install-Feature-1
F
ig 4 – SQL Feature Selection 1

SQL-Install-Rules-2
Fig 5 – SQL Feature Selection 2

Now, allow the installation to continue – until the configuration steps!

Big Important Step Below

This is one of the most important parts of the SQL installation!

During configuration, you will be asked to supply user credentials for the database engine and local support. DO NOT allow the setup to continue with defaults, you must enter an Administrators (who has power over this PC) DOMAIN DETAILS and password.

Because we are on a DC, creation of the local accounts will fail if left up to the installer, as it can’t access the local device user groups and permissions, due to the way they are suppressed on the DC.

I used SQUAREDUP\Administrator, my domain admin – as this is a sandbox trial system – really , don’t do this for real!

Section Four – SQL Reporting Services

If the above wizard completes successfully, your reporting services should be installed and configured automatically. I have included my settings pages below however – should you need to make any changes.

SQL-Config-NamesPipes-1
F
ig 6 – SQL Reporting needs named pipe access, switch this on in SQL Server Configuration Manager if needed.

SQLRS-Config-URL-1
F
ig 7 – Configure the RS URL using defaults, by clicking “Apply”

SQLRS-Config-DB-3
Fig 8 – Provide SQL RS with database connection data, make sure you specify the instance!

SQLRS-Config-URL-2
Fig 9 – Configure the report manager URL using default settings by clicking “Apply”

 Section Five – Install Operations Manager 

Now we have everything in place, we can install Ops Mgr on the server!

As before, begin the installer and work through with default steps, until you reach database configuration.

Warning - Again, Operations Manager will complain about being in an unsuitable environment, we know the risks.

OPM-Install-SQL-1
F
ig 10 – Specify the database connection details, and don’t forget the instance name!

OPM-Install-SQL-2
Fig 11 – Do the same for the data warehouse database config.

OPM-Install-SQL-3
Fig 12 – For reporting services, you instance will be pre-filled!

Important Step Alert!

This is another part of the install, that again can be problematic because we are on a domain controller. Use the same, or another similarly configured account for all SCOM components as before – or they will fail to start!

OPM-Install-SQL-5
F
Ig 13 – Specify domain credentials for Admin with local power on DC.

OPM-Install-SQL-6
F
ig 14 – Your setup should now complete, don’t worry about the warning – its because we are running under a trial licence.

Section Six – What Next ? 

By now, we have a functioning SCOM environment, with all the tools and parts required to begin using Squared Up.

The only problem with this, is there is nothing in it! Before you continue, use the snapshot you took of the fresh 2012 install to create some servers to be monitored! (You did take one, right..!)

Manually configure these servers, and use the Operations Manager media to install the agent, and begin to collect some data goodness!

Warning: You will need to allow manual agent installs from Global Settings in SCOM before this will work!

Section Seven – Install Squared Up

If you are still with me at this point, well done for reading through the entire post! I will give you a break now, as for the installation of Squared Up, I have created a Video tutorial. Head over to my YouTube channel to see it!

 

Some Helpful Links

Here are a few things I used along the way, thanks to their authors!

https://squaredup.com/free-trial

https://www.techsmith.com/snagit.html

http://blogs.msdn.com/b/karthick_pk/archive/2011/03/05/initializing-the-fallback-certificate-failed-with-error-code-1-state-1-error-number-2146893788.aspx

http://dba.stackexchange.com/questions/71797/wait-on-the-database-engine-recovery-handle-failed-check-the-sql-server-error-l

 

 

 

 

My thanks to RADARC & Members

Recently, I gained my foundation amateur radio licence with the help of the fantastic Reading & District Amateur Radio Club. Their course was practical and not too formal, with a great sense of what was required, and what was “required hoop jumping”.

There is broad membership, young to old and a good community feel – and certainly enough anecdotes to keep anyone busy.

I am looking forward to attending some meetings, and moving on to intermediate in the future, for now, I need to wait for Ofcom to update their database so I can claim a callsign!

University : Graduand & “The Real World”

Looking back, it has been nearly a year since my last internship post – a long time if anyone actually reads this blog or a heartbeat for the fast paced world of the internet.

My absence has been for the sake of Completing my Applied Computer Science BSc at Reading University. Something which was less than appealing after a year of paid work at Microsoft UK which you can read all about in the past. Returning to the student life not only brings a pay cut, but a change of lifestyle. I have never been one  for regularly getting sloshed and flailing around in town, but none the less – trading in my Jaguar XJ and taking up residence in a 1960s, tissue box sized room with only freezer foods for sustenance was a culture shock at the very least.

But even that was a whole academic year ago, 3 terms, 10 modules, countless coursework, and one near heart attack.

The heart attack, if you are wondering, is thankfully metaphoric – and came in the form of “Preliminary Classification Release Day”. As the delightfully descriptive name suggests, the day when our classifications (1st, 2:1, 2:2 etc) are released, and each students 3/4 year stay along with their value as a human being is rounded down to a number. This, as you can imagine is a stressful enough experience without any amplification. Our school however decided that to help ease everyone’s nerves by slathering everything in banners and congratulations, forcing the assumption that everyone would be thrilled with their result.

My experience of this was divided. I had to complete 6 final exams on separate subjects. 5 of those, came and went with little more than the expected frantic revision and standard stress. It was the penultimate one however, that was to ruin my week. “Concurrent Systems”, a deceptively named module – suggesting parallel programming, network syn, distributed joy – which three weeks in, turned out to be an exercise in process algebra, one of my weakest subjects. To make matters worse, the day of the exam rolled around and the paper seemed to be partly on the subject, and partly a random assortment of vague questions regarding parallel systems which were not even hinted in the syllabus. The capping blow ? Even the genius kid, and yes we had one, came out looking pale and terrified. From that moment on, my graduate job (>=2:1 requirement) felt like the prize in a 50/50 lottery. If I had failed the module, my degree would be a maximum classification of “Pass” – whereas passing the module mean’t at least a 2:1, and a job to go to.

Ameture dramatics aside, results day came and after three weeks of sweating we were finally allowed to see the oh so very public results listing. I will be graduating with a 1st Class, much to my surprise, and relief, but I will never forget the feeling of dread that followed me around for that time. Naturally those around me seem to think I was being overly modest or being a ass by supposing I had failed all along, but believe me, I lived every second of it. According to the school, this pre graduate limbo state makes me a “Graduand”.

Which brings me to post results, awaiting my graduation day early next month. Many people have said many things to me since my results, “Well Done”, “Congrats” and similar uplifting comments, but its one particular comment that has dominated every conversation – “Welcome to the Real World”, “Time to get a real world job”. – or words to that effect. My response to this, is at least, unfortunate for those who make the mistake of such “congratulations”, as it often comes tinted blue, with a mild dose of scathing.

To illustrate why, some brief history on my education and work habits is required.
At 13 I had a paper round, my friend dicked me over for far too much of the money but it was honest paid work, and it bought me tyres for my bike. When I went to college, I did four days a week of education and coursework (the BND is all coursework!) and 3 days working in the freezers and warehouse at the local Makro wholesale. 9-6 and more often later 7 days a week, just so I could afford the train fair to get to college. Between years, I got a break – I worked an 8 week contract for Verizon business, formatting and preparing laptops which landed me just enough to learn to drive and buy a car. The next year I worked delivering catalogs, running errands and any other job which allowed me to spend time with my car (<3), for most of the three days a week I wasn’t studying. When I finally got to Uni, I worked 0800-1900 Sat & Sun at PC World, marching stock up and down the stairs and making the shop look pretty (merchandising). This was pretty cruddy, target driven, pressure based – awful customers and tight deadlines, alongside starting my degree. For most people the first year is all drinking and fun, for me it was all working and I still nearly failed, partly due to myself, partly because I was always tired. I transitioned from this, thankfully, to a customer service/support position with IT Services at the University which for the last 3/4 years has been much better to me, despite management changes, re-orgs and changes at the University. Finally, I worked for  a year with Microsoft, in an extremely high pressure code/development support role for some of the highest profile companies that exist, trying to solve code bugs and upgrade bashes as fast as possible for time critical problems – mind you the pay was good and the lifestyle excellent.

My parents aren’t rich, and my student loan doesn’t even cover hall fees. I have worked every day of my further/higher education life to pay my way to where I am, in a multitude of customer service/menial/rubbish jobs, and the odd awesome one (Microsoft/ITS), while completing a BND with100% and getting a 1st class degree. But until now, I have not even mentioned it, because I don’t care. Its been an experience, I have made excellent friends, overcome my shyness, learnt how to deal with people and bosses, and I would not change it for the world, I like to challenge myself and expand and learn and the last 6 years has been the perfect way to cram it all in.

I have many friends who have walked the very same path,

So please, think before you belittle us – University isn’t the booze fueled lazy trip you see on TV for every student, some of us come out totally looking forward to the “real world”.

Tech : GMail EAS Changes

For longer than I can remember I have been a GMail user. Initially I was scared of it – putting all my mail on the web seemed like a crazy plan, but eventually I signed up and dropped by ISP’s email account for a GMail address. Ever since, I have happily enjoyed my email anywhere, labeling and archive, a host of free space and even piece of mind offered by two factor authentication. I have seen no reason whatsoever to doubt my decisions, until news broke  last night that Google were planning to drop EAS support for Individual GMail accounts (http://www.wpcentral.com/google-drops-exchange-activesync-what-s-it-mean-windows-phone).

Like many users, I choose my loyalty to products based on the best one available at the time. Typically this means that I use services or products from several companies at the same time, basing each decision on its merits not brand allegiance. Unfortunately I seem to have picked my poison in this war by buying into the Windows Phone mobile environment. My reasons are simple, I prefer the interface, speed and simplicity of the WP devices – I have no need for a  powerhouse uberhacker device in my pocket, I just like my phone to do what I need, when I need in the easiest way possible. I had an android phone, a symbian Nokia device , iPads and iPhones and this is where I have ended up, its just what I prefer – comparisons, features, reviews, and out and out hardware battles aside.

Inconveniently  for me it seems that my personal tastes have landed me right in the “EAS Switchoff” firing line. In a battle between ancient and bitter rivals, the true looser will not be a brand name, a sales figure or a jarring comment at a tech expo – its me, the customer. Standing to lose functionality on my Windows Phone device, because to Google , EAS is a “dead” technology.

I am sure Microsoft will update the Mail app to support whichever method becomes the next favorite, but for now I can’t help but look at other options for my email account, before the floor falls away under my feet – after all, I am not about to can an expensive phone, just to chase a feature rich email experience.

 

Technical Fixit : Comfort Curve 3000 Keyboard

While at the local supermarket, I happened upon a reduced, but brand new in box, Microsoft Comfort Curve keyboard. For a few quid, I was not one to argue and gleefully stuffed it into my trolley, After all the Tesco value keyboard I had been using  was well past its hygienic and useful life.

When I got home, I happily ripped the PS/2 keyboard off my desk, re-routed my USB hub and plugged in the new item. For a few minutes everything was good, until of course I tried to use the S and A keys. It was at this point my heart sank, the keyboard was faulty. My mind was awash with predictions of trial by fire when trying to return and end of line, reduced item which only cost a few quid. Having worked in retail, I knew the £3 keyboard was not worth the petrol to get back to the store.

At this point I figured I may as well rip it apart, maybe I can solder something to get it working again, my oscilloscope is always sat on my desk ready. You can imagine the shock that came, when after removing around 25 screws, I found no PCB in sight. I suppose I should have known from the outset that a modern cheap keyboard would have some fancy internal workings, I was greeted with three plastic films, covered in a conductive web.
Keyboard Internals

Upon closer inspection, the problem is obvious, someone has nicked the film when assembling the keyboard and cut the sensor current to the feed pads. A quick lick of the finger and a broad press across the area confirms the problem . How a keyboard got past QC with two keys failed I don’t know ! I stopped for a moment and thought, then grabbed an old woodwork pencil on my desk, a little colouring later and a quick test and the keys are alive again !

Keyboard Internals

A few million screws later, and I have finally saved myself a few quid ! From writing this post, I can also confirm the keyboard is pretty nice to use, and the Windows key mappings printed are quite cool! Not to mention it has a calculator button, a total requirement, at least for all my future keyboards.
Keyboard On Desk

Hints : Accepting iCal Appts In Outlook When You Are The Organiser

A case I have been working on has highlighted to me just how little information there is about this rather useful knowlegebase article – so i decided I would quickly knock something up to make sure I can remember next time this little solution is needed.

If you have a centrally run system which spits out iCal files left right and centre, this might be right up your street. The issue occurs when you attempt to accept an appointment that you are listed as the organiser of. Assuming your system doesn’t automatically add the appointment to your calendar, you will be faced by two confliciting messages.

“As the meeting organizer, you do not need to respond to this meeting”

and

“This meeting could not be found in your calendar”

Up until Outlook 2007, as the organiser you would be able to accept the meeting – which would add it to your calendar, but now this is not possible – as OL 2007 and up attempt to prevent duplicate items with this handy message. The only issue being this stops your centrally generated iCal ever making it into your Caledar, and in turn messes up your ability to track responses.

The solution to this is a handy registry entry contained in the article : http://support.microsoft.com/kb/940403

This entry means that when you open up an iCal file – in which you are listed as the organiser, Outlook automatically adds the event to your caledar if its not already there. Allowing you the full benefits of having the meeting within Outlook, without having to create the iCal in Outlook/Exchange.

Useful Integration Tip !

Fingers crossed this helps someone out :)

Understanding : The Police API – The Perfect Introduction To API Programming (Part 1)

When I found myself gazing at the news during lunch the other day, my attention was suddenly caught by the announcement of an iPhone application which can tell you about the crime history of your current location.

Like any developer, as soon as I saw this my first response was “Wow, the police have an API”. And so they do, http://www.police.uk/api/docs/ . The police API is a RESTFul JSON Web service that uses HTTP GET requests to fetch JSON formatted data about a multitude of (historical) crime and police related information, this being said the data seems to only be about a month behind. The API is authenticated, using an API key you must apply for, and then BASIC HTTP Authentication.

At this point I decided I didn’t want to let the side down, and should probably build a Windows Phone 7 “Crime Hunter” app. As always its my belief that things done in mobile environments are always harder than on the desktop , you will see later why they aren’t with Phone 7, but this didn’t stop me from making a desktop application first.

While looking through the details of the API fo r this, I realised – this really is as simple as a web API gets – which makes it a perfect introduction for those who have never worked with a web API like this before. Nice simple and clean.

Desktop Proof Of Concept
This is a simple class with a single function that prints out the HTTP response. This serves simply to ensure that the API is working and returning Data. Pop in your API password and it should work straight away.

using System;
using System.Text;
using System.Net;
using System.IO;
using System.Web;

    class UkPoliceInterface
    {
        // API Credentials - Pass in by constructor in common use
        private string apiUsername = "";
        private string apiPassword = "";

        public string AuthorisedRequest(String requestUrl)
        {

            // Create a new WebRequest to the URL Passed
            WebRequest dataRequest = WebRequest.Create(requestUrl);

            // Add a BASIC Authentication header to the data request, using the API Username and Password
            dataRequest.Headers["Authorization"] = "Basic " + Convert.ToBase64String(Encoding.ASCII.GetBytes(apiUsername + ":" + apiPassword));

            // Wrap to catch errors
            try
            {
                // Request the response object and save it locally
                WebResponse dataResponse = dataRequest.GetResponse();

                // Get the response stream and wrap it in a stream reader
                StreamReader dataStreamReader = new StreamReader(dataResponse.GetResponseStream(), Encoding.UTF8);

                // Return the string
                return dataStreamReader.ReadToEnd();
            }
            catch (Exception ee)
            {
                // If Something went wrong, throw a generic exception at this time
                throw new Exception("Could Not Complete Web Query ("+ee.Message+")");
            }
        }
}

This function simply creates a new .NET WebRequest object, this neat little object encapsulates the process of making a request to a URI and provides a few methods for getting the response.

In the case, its sister object WebReponse takes the response and allows us to write it down to a stream, with the help of the StreamReader class , this means we can now write the stream down to a local string, and voila , theres the response. Some Lovely JSON…

[
    {
        "category": "vehicle-crime",
        "id": 1976260,
        "location": {
            "latitude": "52.6240688",
            "street": {
                "id": 165758,
                "name": "On or near Godsons Hill"
            },
            "longitude": "-1.4157945"
        },
        "context": "",
        "month": "2011-06"
    },
    {
        "category": "burglary",
        "id": 1976261,
        "location": {
            "latitude": "52.6240688",
            "street": {
                "id": 165758,
                "name": "On or near Godsons Hill"
            },
            "longitude": "-1.4157945"
        },
        "context": "",
        "month": "2011-06"
    },
    {
        "category": "vehicle-crime",
        "id": 2013093,
        "location": {
            "latitude": "52.6241922",
            "street": {
                "id": 203088,
                "name": "On or near Hillside"
            },
            "longitude": "-1.4153054"
        },
        "context": "",
        "month": "2011-06"
    },
    {
        "category": "anti-social-behaviour",
        "id": 2019201,
        "location": {
            "latitude": "52.6260645",
            "street": {
                "id": 209891,
                "name": "On or near Horseshoe Close"
            },
            "longitude": "-1.4212784"
        },
        "context": "",
        "month": "2011-06"
    },
    {
        "category": "other-crime",
        "id": 2245928,
        "location": {
            "latitude": "52.6233953",
            "street": {
                "id": 436377,
                "name": "On or near Warwick Lane"
            },
            "longitude": "-1.4033061"
        },
        "context": "",
        "month": "2011-06"
    },
    {
        "category": "burglary",
        "id": 2245929,
        "location": {
            "latitude": "52.6233953",
            "street": {
                "id": 436377,
                "name": "On or near Warwick Lane"
            },
            "longitude": "-1.4033061"
        },
        "context": "",
        "month": "2011-06"
    }
]

Now I knew that the API works as expected, on to coding it up for Windows Phone 7, See my part 2 Post on how!