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:
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