Just as it captures information about applications in component models, the N1 Service Provisioning System software stores information about data center procedures in plans. A plan is an XML document containing a sequence of instructions used to manipulate one or more components or calls to other plans. Plans can encode this information explicitly, or they can leave some details, such as specific server names and port numbers, for the IT operator to specify at run time. When the provisioning software runs a plan, it reads component models for details about configuration requirements, dependencies, and instructions for performing specific operations, such as installing a particular set of files and setting permissions on a directory.
N1 Service Provisioning System software uses plans to:
Perform operations such as deployments
Coordinate activities among components during these operations
Coordinate activities among servers during these operations
There are two types of Plans, simple and composite. Simple plans contain a sequence of instruction that is performed on the target host or hosts unilaterally and cannot call other plans. Composite Plans can only call other Plans so that each step in a multi-step deployment—shutting down an application, removing servers from a load balancer, etc.—can be managed by its own carefully written plan.
For example, a plan to roll out a multi-tiered application might consist of four sub-plans:
a subplan for removing servers from the load balancer
a subplan for updating web servers
a subplan for updating application servers
a subplan for re-inserting the servers into the load balancer
The rollout plan itself would coordinate activities among the sub-plans and servers. For example, running this plan on a cluster of 10 servers, the N1 Service Provisioning System software would ensure that each subplan had completed successfully and all ten servers were synchronized before proceeding with the next subplan.
Inserting variables in components, plans, and sub-plans gives operators fine-grained control over data center operations. For example, a component can be configured to include a variable for a port number. A plan can assign a value for this variable. Alternatively, the IT operator can assign a value for variable (overriding the value specified in the plan) through the CLI or the HTML interface. Variable settings can be applied to sets of hosts or individual hosts.
By providing a common format for execution plans, the provisioning software replaces the chaotic variety of script formats and languages found in most data centers. Rather than trying to understand the contents of a hastily written script, operators can select the plans they need from a central, version-controlled repository.
The N1 Service Provisioning System software automatically generates procedures for many operations, such as installation and un-installations, for the most common types of components. If your deployments involve installing one component at a time on a single set of hosts, you can use these built-in procedures and never have to author a plan.
Use plans, rather than built-in procedures, if you want to:
automate the installation of multiple components through a single procedure
automate the installation of components onto different sets of target hosts
add dependency checking to installation procedures (e.g., have the installation confirm that a particular component is installed and running before installing the next component)
synchronize the steps in an installation, so that a particular step does not begin until a previous step has completed successfully