Provisioning is one of the components that is frequently mentioned as a core "Service Delivery Platform" service. By provisioning we mean all the tasks and processes involved for order and fulfillment of requests in an application. A common example is a "tenant" provisioning: everything that has to happen in the environment to support a new tenant.
Typically, this involves acquiring and configuring resources that are both internal and external to the application. For example: a new web site, a new virtual directory, new servers, are all examples of external resources. Configuring single instance multitenant database is generally an internal process.
In LitwareHR the provisioning of a new tenant involves 3 steps:
- Creating a new tenant in the database (internal)
- Creating the tenant in ADAM (external)
- Creating a virtual directory in IIS (external)
(For complete details see the LitwareHR.Portfolio.Services.ProvisioningLogic class)
In the current implementation, all these steps are done after you hit "submit" in the tenant provisioning form. This is of course highly unlikely to happen in a real world scenario, for many reasons:
- No hoster will allow your application to interact directly with their infrastructure for security reasons
- Even if they gave you the credentials to do so, your application might not be smart enough to handle the underlying infrastructure details. For example: LitwareHR assumes there's only 1 web server in a predefined place. What would happen in a web farm configuration?
- What happens if some step fails? Who's responsible for the clean-up and reporting?
- All steps run synchronously, which is not a good idea if you have potentially long running tasks or the complexity of the steps increase in time.
Moreover, this is clearly "plumbing" an ISV would rather get rid of and delegate all details to a specialized system. One such system is MPS (Microsoft Provisioning System) that provides basic provisioning features for a data center.
As Ariel has hinted in the LitwareHR community site, for the last couple of weeks we have been working on a lab to demonstrate how to use MPS for LitwareHR provisioning tasks.
A couple of important things to highlight:
- The application triggers the provisioning workflow (asynchronously)
- The provisioning workflow is orchestrated by the SDP that interacts with whatever underlying elements are required (in the example: IIS & ADAM)
- Any failures are handled in MPS
- There is a callback into the application for application specific tasks
- MPS provides other features like logging and auditing
We'll see that this pattern of an SDP driven process is fairly common and powerful. Notice that the application is required to expose APIs for the SDP to control and manage important aspects of its lifecycle.
We hope to publish the contents of this proof of concept soon, so you can try this in your own environments.