Hi everyone, my name is Alaks Sevugan (Senior SCVMM Program Manager) and today I’d like to take a minute to discuss Service Templates in SCVMM 2012. Service Templates are being introduced in VMM 2012, to capture the Service model definitions.
Service Templates contain the definitions for machines, its connectivity, application definitions etc and is the starting point for a VM or a service. Service templates differ from VM templates, in one important aspect – they are source of truth for the deployed services. Today in VMM, creating a VM from a VM template is a fire-and-forget operation, once the VM is created it has no relation whatsoever with the VM template it was created from. Whereas the Services are always be linked to the Service Templates that they were created from. This way you have a central location holding the intent or the truth and less chance of different instances drifting from the desired configuration. This is also required for updating the deployed instances and for supporting scale out of services. If you need to update a deployed instance of the Service, you need to first create a new version of the service template, associate it with an already running instance and then just update the instance to match the new version of the template.
Service Templates are authored in the
VMM Service Template designer
. Typically when you are creating a service template, deployment specific information like hosts and load balancers is not available – you just know you need a host for the VM or a load balancer for the service but don’t know or care if it is Microsoft Hyper-V host vs. VMware ESX host or F5 Big IP load balancer vs. Citrix Netscaler load balancer.
This is a screenshot of the new VMM Service Designer. It gives you a simple drag and drop interface for defining and deploying new Services.
at the top provides the list of actions that can be performed in the designer
here, you are looking at the Service template for a Petshop service that has 3 tiers – Web Tier, Middle Tier and SQL Tier. All the tiers are connected to a logical network called Redmond.
at the bottom provides the property settings for the selected object in the canvas.
Service Template and Instance - Single Tier Service
Let’s take a quick look at simple single tier service template and an instance created from it. If you have a VM template that has the OS/hardware information, you can create a Service Template with this VM template to deploy a Service with one or more instances of the machine.
As a next step, you can imagine adding roles/features and applications to the Service definition and deploying a Service that can have one or more instances by default, and can choose to mark it as scalable. This gives a high level idea of how you can build on your existing knowledge of VM templates to author and deploy services.
Service Template Components
Before we dive deeper into service deployment, let us look at all the components that make up a Service template.
Service Template consists of one or more computer Tiers.
Computer Tiers consists of exactly one VM template. There can be one or more Computer Tiers.
VM templates contain
Hardware Profile, Guest OS Profile
and reference to a
in the library
Guest OS profile
, you can define what
need to be installed
VM Templates has
one application profile
which in turn has one or more
– MsDeploy, SQL DAC or Server App-V packages. Application deployments always have references to the application bits in the library.
VM template can also contain a
, for installing a SQL server instance in a sysprepp’ed VM. This consists of one or more
that can have SQL scripts and library resources for the SQL scripts.
Generic Command Executable:
You can have your custom EXEs run during application deployment. This might be for installing your MSI packages, or maybe to enable a firewall rule.
Load Balancer Templates:
Load Balancer Templates can be setup for each computer tier that needs to be scaled out.
Application Host Template:
In an Enterprise environment it is very typical that SQL databases are deployed to existing physical SQL servers. In order to support this scenario, Service template can contain one or more host profiles for deploying SQL DAC packages to existing physical servers.
Any settings that need to be overridden as a part of Service deployment are available at the Service template level as Service settings.
There you go – these are all the components that make up a Service Template.
In the next blog post, I will walk you through the steps of customizing and deploying a service.