Notes on Provisioning - LitwareHR example

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:

  1. Creating a new tenant in the database (internal)
  2. Creating the tenant in ADAM (external)
  3. 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:

  1. No hoster will allow your application to interact directly with their infrastructure for security reasons
  2. 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?
  3. What happens if some step fails? Who's responsible for the clean-up and reporting?
  4. 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:

  1. The application triggers the provisioning workflow (asynchronously)
  2. The provisioning workflow is orchestrated by the SDP that interacts with whatever underlying elements are required (in the example: IIS & ADAM)
  3. Any failures are handled in MPS
  4. There is a callback into the application for application specific tasks 
  5. 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.