A new feature delivered by Microsoft System Center 2012 is the ability to deploy an application based on a service template. Service templates allow for turn-key deployment of application infrastructure. Service templates are authored using the Service Template Designer feature of System Center 2012 Virtual Machine Manager (VMM). Once a template is created, it can be used to deploy services using the VMM console or VMM PowerShell commands, and made available for self-service provisioning using the System Center 2012 App Controller web portal.
A service template is comparable to a building blueprint, created by the professional architect before any work occurs at the construction site. Like combining construction materials to build a building, System Center 2012 VMM brings together in a service template all the configuration details and software tools to deliver those configurations across devices. VMM assembles the resources of your cloud into a fabric, and then lets users deploy applications via service templates to the cloud in a self-service and/or automation-based model. Figure A shows a service template for a two-tier application featuring fault domains based on network assignment.
Service Template Designer in VMM: A two tier application with network-based fault domains. (Click images to enlarge.)
Characteristics of service templates
- Combine and associate different fabric elements in the private cloud, and take the form of visual diagrams.
- Include one or more virtual machine (VM) tiers, as well as associated network interfaces and network load balancers.
- A VM tier hosts an application and can contain one VM for testing, two or more production VMs for redundancy, and any number of VMs for capacity scale-out.
- Can also contain SQL server application hosts and logical network segments.
- Allow for repeatable, precision deployment of an entire application at any scale, automatically configuring all necessary fabric elements in the cloud.
An appreciation for these concepts behind defining an application as a service template will begin your true professional journey to cloud-centric thinking:
- The private cloud architect that authors the service template has this job: Distill into that template all the knowledge needed to deploy, scale, and retire the application using the resources of the cloud fabric.
- For the life of that application, non-technical staff and even fully-scripted automation can use and re-use the intelligence in the template to deploy and manage the application in the fabric.
- Non-technical users can provision and configure highly complex private cloud fabric elements such as storage area networks (SANs) and hardware load balancers, completely abstracted from the actual data center fabric.
Create a service template in VMM
Follow these steps in System Center 2012 VMM to create a service template. A prerequisite is that you have defined VM Templates for each VM application role that you want to add to the service template. Also you need to have created a private cloud in VMM with resources available to match those required by the VM Templates. These prerequisites will allow VMM to match application VMs to fabric resources that will support them.
- Navigate to the Library space and click the Create Service Template button in the ribbon.
- Select one of the predefined service templates and press OK. (See Figure B.)
- Observe your list of VM templates on the left side of the designer (see Figure A, VM Templates tab).
- Drag VM templates into the designer canvas to add VMs to that tier. Alternatively, drag a VM template onto a tier to replace the default settings for that tier.
- Add hardware load balancers and logical networks to the designer canvas. Use the connector button in the ribbon to connect network interfaces.
- Press the Save and Validate button in the ribbon when done, then exit the designer.
Creating a service template in in the VMM Library space.
Use a service template in App Controller
A previous article provided an introduction to Microsoft System Center 2012 App Controller, a product that could be named “Microsoft cloud manager.” In that article, we connected App Controller to our on-premise VMM server for access to our private cloud resources, as well as connecting to Azure for management of our public cloud subscriptions. Now that we have defined a service template, we can use App Controller to actually launch the application deployment to our private cloud.
App Controller: Self-service deployment of an application using a service template.
Figure C from the App Controller web portal lists the same Two Tier Application template seen in the VMM template designer in Figure A. Here are the steps to deploy the application with App Controller:
- From the App Controller Library space, select Templates, then select the template of the application you want to deploy, and click on Deploy in the templates menu.
- You will be presented with a screen to select which private cloud to deploy the application to, then a graphical representation of the application you are about to deploy as seen in Figure D.
- Click the Deploy button and VMM will start to execute your instructions and deploy the application to the fabric.
App Controller: Graphical depiction of the application you are about to deploy.
Figure E below shows the progress of VMM as the jobs are executing. These are the jobs to deploy the application to the private cloud selected by the user with App Controller.
- Two VMs (ServiceVM00001 and ServiceVM00002) have been automatically named and placed (one VM each) in two host clusters in the private cloud.
- In the design of this application, the network of the host cluster matches the network fault domain the VM is assigned to.
- The fact that both the VM Templates and the host clusters in the private cloud have “LAN A” and “LAN B” associations permits VMM to intelligently distribute the VMs to host clusters that preserve the isolation between the fault domains.