Friday, January 13, 2012

SCOM 2012 - Creating your very own custom Distributed Application Template - Part 3

This is the final post in my 3 part series on 'SCOM 2012- Creating your very own custom Distributed Application Template'. You can review Parts 1 & 2 of the series from the links below:

SCOM 2012 - Creating your very own custom Distributed Application Template - Part 1

SCOM 2012 - Creating your very own custom Distributed Application Template - Part 2

This series was created with the Microsoft System Center 2012 Private Cloud Community Evaluation Program (CEP) in mind and you can sign up or get more information on the program from the link below:

https://connect.microsoft.com/site799/program7383

This post will cover the final steps in the process such as editing the unsealed XML file, sealing the unsealed template and then importing it back into SCOM and testing that it works.

Carrying on from where we left off in Part 2, you should now have three files copied to the C:\MP directory on the root of your SCOM 2012 Management Server local disk. The three files are the unsealed distributed application template, the strong name key and the 'MPSeal' utility

Right mouse click on the unsealed custom template and select 'Edit' from the drop down menu


When the file opens, locate the string near the top of the file that starts with <ID> and replace the string name in there with the exact name that you gave to the unsealed distributed application template - making sure that you exclude the .XML extension. In the example below, I have called my file CustomDATemplate.xml so therefore the string that I will be adding as the <ID> is simply: CustomDATemplate as shown below


Three lines below the <ID> line, is another one called <NAME>. Again, replace the string that is in here with a display name that describes what the template is. See the graphic below for more


Once you have edited the file with the correct ID and Display Name, you need to confirm the location of your system management packs that were installed initially with SCOM 2012. The default installation of SCOM 2012 RC drops the system sealed management packs into the following location: C:\SCOM2012RC\ManagementPacks (see the screen below)


Note: The location of the system sealed management packs is important because we will need to specify this location when running the MPSeal utility against the unsealed template.

Now open up a command prompt with administrative privileges, browse to the C:\MP directory and run the following command - substituting file names and locations where necessary:

mpseal customdatemplate.xml /i c:\scom2012rc\managementopacks /Keyfile scomkey.snk /Company "Ergo"


The MPSeal utility then runs a verification and check on the unsealed template against its Management Pack references and ensures it can access any sealed dependencies from the specified location


Once the utility has finished, you should see the screen below confirming that the new .MP sealed file has been created


Browse back to the C:\MP directory and you will see two new files there now, one of which is your new sealed management pack - at last!!


Now all that's left to do is to import this into SCOM 2012 and test it!

Browse to the 'Administration' tab of the SCOM 2012 console, right mouse click on the 'Management Packs' link and then select 'Import Management Packs'


Click on 'Add' and then select 'Add from disk'


Click 'No' to confirm you don't want to search online for dependancies


Browse to the C:\MP directory on the SCOM 2012 Management Server and you should see both the sealed and unsealed Management Packs that reference your template. Click on the one that has the .MP extension and click on 'Open'


SCOM 2012 should quickly check the Management Pack and report back that it is OK to add into the environment. Click the 'Install' button to begin


Once completed you should see the 'Imported' status and you can then click 'Close'


When you take a look at the list of management packs imported into SCOM 2012, you should see your new one in there with a sealed reference of 'Yes' beside it



Now to test that the template works, open up the 'Authoring' tab again and right mouse click on 'Distributed Applications', then select 'Create a new distributed application' from the resulting menu


This time, you should see a new addition to your list of Distributed Application templates that you can choose from. Give it a name and description, select your new template and a management pack to store it in, then click 'OK'


 The new distributed application should open up exactly the way that you configured it to every time! No more having to create new custom component groups each time you want to build a distributed application with the same components (in my case it would have been 90 times!)


Populate the component groups with objects as below


Save the new distributed application and check that it appears in the list of distributed applications and then right click on it and select 'Diagram View'


Now you should see the Diagram View of your newly created Distributed Application Service using your very own custom sealed Distributed Application Template!


If you want to learn more about System Center 2012 products and in particular SCOM 2012, check out some of my previous posts below:

Cloud Management with System Center - Building a Private Cloud with System Center Virtual Machine Manager 2012

Cloud Management with System Center - Creating a Virtual Machine Template with System Center Virtual Machine Manager 2012

Cloud Management with System Center - Creating a Service Template with System Center Virtual Machine Manager 2012

Cloud Management with System Center - Connecting your private cloud to System Center App Controller 2012

Cloud Management with System Center - Customizing System Center App Controller 2012

Cloud Management with System Center - Connecting App Controller to Azure Part 1

Cloud Management with System Center - Connecting App Controller to Azure Part 2

Cloud Management with System Center - Integrating App Controller with SCOM

16 comments:

  1. Hi Kevin,
    Thank for the HowTo,
    I try to "create" a management Pack for CentOs ( for school project )
    I've some question,
    You use the mpseal of authoring console 2007 ?

    I try to seal my management pack, but I've got some errors :

    C:\mp>mpseal Microsoft.Linux.CentOs.Library.XML /i c:\backups\ /Keyfile centos.s
    nk /Company "Nogard"
    Attempting to seal ManagementPack file: Microsoft.Linux.CentOs.Library.XML
    : Verification failed with [1] errors:
    -------------------------------------------------------
    Error 1:
    : Could not load ManagementPack [ID=Microsoft.SystemCenter.Library, Keytoken=31b
    f3856ad364e35, Version=6.1.7221.0]. ManagementPack not found in the store.
    XSD verification failed for management pack. [Line: 1, Position: 40]The 'SchemaV
    ersion' attribute is not declared.
    -------------------------------------------------------

    Could not load ManagementPack [ID=Microsoft.SystemCenter.Library, Keytoken=31bf3
    856ad364e35, Version=6.1.7221.0]. ManagementPack not found in the store.XSD veri
    fication failed for management pack. [Line: 1, Position: 40]The 'SchemaVersion'
    attribute is not declared.


    The errors are the same even if I write the schema version ...

    Can you healp me please ?

    Thank

    ReplyDelete
    Replies
    1. Alexnogard,
      I'd like to hear more about this CentOs MP that you had to create for your project. Any way that I can contact you for a few questions? (via email or IM?)
      I'm looking into a custom pack for Scientific Linux and I could use the help.
      Thanks,
      TP

      Delete
  2. Hi Alex,

    Thanks for the comment!

    It seems to me from your error that the mpseal process has an issue with the version of the base/core SCOM Management Packs that you are using. Have another look at the post above and confirm that you have followed the steps exactly from the 4th graphic down.

    It is possible that the location you are pointing to (C:\backups\) either doesn't have the correct version of the base SCOM 2007 or 2012 management packs or you are specifying an incorrect location for them. Try to specify your location as c:\backups (without the backslash) as opposed to c:\backups\ (with the backslash.

    Hope this helps and good luck with the school project!

    Kevin

    ReplyDelete
    Replies
    1. Hi Kevin,

      I was asked to create a custom distributed app which should cover the following requirement. If a remote site goes down we used to get Hbeat failure & AD site failure alerts, instaed of that we need to get a single alert that the remote site has some WAN issues ( frequent fluctuations happen). Not sure How to link the devices and servers to receive a single alert? any help would be appreciated...

      Thanks in advance,
      Siva

      Delete
  3. Hi Siva,

    If you are looking for an alert to be raised when there are fluctuations with your WAN links, then I'd suggest creating some synthetic transactions (go to the Authoring tab, then click on Management Pack Templates from the console)that monitor the WAN links themselves and check for such things like uptime/dowtime/performance and latency.

    You could also take it a level further a record a browser session to an IIS or SharePoint website in the remote sites that would give you even more granular information back on WAN issues.

    You could then either add these into your existing DA or simply put them into their own DA with a dedicated SLA attached for reporting.

    Kevin.

    ReplyDelete
  4. Hi Kevin,

    Thanks for your reply,

    what i understood from second one is, creating a subscription to alert us on the IIS availability of the server in remote site. i'm i right?

    first suggestion - creating synthetic transactions via MP templates (oLE, process, TCP, web & windows service). can you please explain me in detail on how this works?

    Thanks in advance,
    Siva

    ReplyDelete
  5. I get stuck at the point where it says :

    Once you have edited the file with the correct ID and Display Name, you need to confirm the location of your system management packs that were installed initially with SCOM 2012. The default installation of SCOM 2012 RC drops the system sealed management packs into the following location: C:\SCOM2012RC\ManagementPacks (see the screen below)


    In our case SCOM is installed E:\E:\Program Files\System Center 2012\Operations Manager

    I am notsure where the sealed MP's are ?? any advice please

    ReplyDelete
    Replies
    1. Hi there,

      Just do a search for the ManagementPacks folder on both the System Volume (C:) and your E: volume and you should find what you need.

      Kevin.

      Delete
  6. Hi Kevin, i followed all your steps until sealing the exported MP using Mpseal.exe

    in my case i have my SCOM 2007 installed on E drive and the location of the sealed MPs is E:\Program Files\System Center Operations Manager 2007 and have my exported .XML file,mpseal.exe & scomkey.snk in c:\MP folder.

    i'm getting 5 errors when i run the below command

    C:\MP>mpseal PII_CustomWEBTemplate_ExportedMP.xml /i E:\ProgramFiles\SystemCente
    rOperationsManager2007 /Keyfile \scomkey.snk /Company "PII"

    please help me out...

    error 1: : Could not load ManagementPack [ID=Microsoft.SystemCenter.ServiceDesigner.Libra
    ry, Keytoken=31bf3856ad364e35, Version=6.1.7221.0]. ManagementPack not found in
    the store.
    Cannot find MP File "Microsoft.SystemCenter.ServiceDesigner.Library.mp" in any o
    f the search directories.
    (i'm getting this error with 5 different MPs)

    ReplyDelete
    Replies
    1. Hi there,

      It seems like you either might not have the correct version of the system sealed management packs (version 6.1.7221.0) or you haven't specified the correct path. If its an issue with the path that you've specified, then ensure that you use quotation marks (")when listing a path that contains spaces.

      You could also try copying the system sealed MPs to the folder that you have the MPSeal and customwebtemplate_exportedMP.xml files in.

      Hope this helps,

      Kevin.

      Delete
  7. Hi Kevin,

    I copied those 5 files to another folder and changed the path in command, it worked perfectly.

    Thanks a lot for your help.

    ReplyDelete
  8. tnx alot man .... very much ....

    ReplyDelete
  9. Cheers for the nice clear steps Kevin. Only had a few component groups for each DA but handy to have them already named plus scoped for the object type too. Will make it quicker to build them from now on. Thanks.

    ReplyDelete
  10. Thanks for the steps! I did need to get the system MP's from install ISO, they were in SCOM's install folder but wrong version.

    Is it possible to add a component now after I have lots of DA's using this template? Ideally I need to add one more component but not sure if this is possible?

    ReplyDelete