Orchestrator By Example: Deploying a Service from Template with VMM and Orchestrator

This article, which details how to deploy a service from a service template in VMM with Orchestrator, is a supplemental post to “Chapter 16 – Integration with System Center Virtual Machine Manager” in the upcoming System Center 2012 Orchestrator Unleashed from Sams Publishing, now available for pre-order.

For more info, see chapter 16 in the upcoming Orchestrator Unleashed book or see “Deploying Services in VMM” at http://technet.microsoft.com/en-us/library/hh427284.aspx 

NOTE: In writing this chapter, we assumed not everyone is a VMM expert and so provided quite a bit of background info in chapter 16 to give you the basics of service templates in VMM 2012 SP1.

Other Articles in This Series

Here are a few articles related to the VMM 2012 SP1 Integration Pack in Orchestrator.

Orchestrator By Example: Scaling Out a Machine Tier in a Service and Orchestrator

Orchestrator By Example: Scaling In a Machine Tier in a VMM Service with Orchestrator

Orchestrator By Example: Performing In-Place Updates for Services in System Center 2012 VMM SP1 and Orchestrator

In This Post

In this post, we will look at the details of the runbook, as well as a before and after snapshot of the running service instance in System Center 2012 Virtual Machine Manager SP1

  • The Service Deployment Runbook
    • High Level View
    • Runbook Configuration 
  • Service Instance After Deployment 

I’ve added a few tips throughout to help you get it right in the real world.

High Level View of the Service Deployment Runbook

Here is the high-level view of the runbook, which can easily be called from SC 2012 Service Manager or externally using C# or PowerShell.

image

This runbook performs the following actions steps:

  • Accepts user input required to collect the service template name, service template release and service name
  • Retrieves the running service template specified in the user input
  • Configures the deployment details for the planned service
  • Deploys the new service to the specified host group or cloud

TIP: You will notice this runbook has no error checking, it’s just a simple version to show how to carry out the process (what I call a drag-drop-done version). Use the recommendations we provide in the book for adding error handling to this version before you put it into production use.

The Service Deployment Runbook

The runbook requires three pieces of information from the user, collected by the Initialize Data activity, as shown in the image below:

  • Service Name – The display name of the running service instance in VMM
  • Template Name – The display name of the service template
  • Template Release – The release (version) of the service template

image

The Get Service Template activity (shown below), which retrieves the details of the service template to be used as the basis of the service deployment, requires two parameters, the Service Template Name and Service Template Release, both provided in the user input and retrieved using the subscribe to published data feature in Orchestrator.

Service Template Name Equals {Service Template Name from “Initialize Data”} 

Service Template Release Equals {Service Template Release from “Initialize Data”} 

image

The Get Service Template activity (shown below), which retrieves the details of the service template to be applied to the service instance in the update, requires two parameters, the Service Template Name and Service Template Release, both provided in the user input and retrieved using the subscribe to published data feature in Orchestrator.

Service Template Name Equals {Service Template Name from “Initialize Data”} 

Service Template Release Equals {Service Template Release from “Initialize Data”} 

Deployment Target: Cloud (or HostGroup, if you have not configured a cloud)

Cloud Name: Contoso Hyper-V Cloud (in this example). If you select HostGroup as a Deployment Target, swap the Cloud Name property with HostGroup Name properties in the Optional Properties interface

TIP: If the deployment fails, the service deployment configuration will not be deleted. You should plan to clean this up (delete) as part of error handling in failed deployments.

image

NOTE: Depending on how the runbook is being initiated, you may want to collect other details of the deployment, such as Cloud or HostGroup (and the associated name) as part of the input in Initialize Data.

The Deploy Service activity requires one property, the Service Configuration Name created by the created by the previous activity.

Service Configuration Name Equals {Service Configuration Name from “Configure Service Deployment”} 

image

When  complete, you should see a running service in the VMM Admin Console.

image

Get System Center 2012 Orchestrator Unleashed

You can pre-order the book on Amazon at System Center 2012 Orchestrator Unleashed from Sams Publishing or on the Informit.com website at http://www.informit.com/store/system-center-2012-orchestrator-unleashed-9780672336102. While Informit is more expensive on the printed copy of the book, they give you a special deal if you bundle the e-book in with the printed copy.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.