Artifacts >
Analysis & Design Artifact Set >
Software Architecture Document >
Guidelines >
Configuration and Deployment of COM+ and IIS-Based Applications
Guidelines:
|
<object ID="ComPlus" WIDTH="0"
HEIGHT="0" CLASSID="CLSID:12345678-1234-1234-1234-123412341234"
CODEBASE="complus.cab#version=1,0,0,0"> |
The Component Services Snap-in can be used to assemble all of the configuration information for a COM+ application. This includes all of the parameters mentioned under the COM+ Catalog section above. The Component Services Snap-in is a good tool for configuring applications on one or two servers. When an application needs to be deployed to numerous servers, or there are a large number of applications that need to be deployed to a small number of servers, one of the other deployment options discussed in the following sections should be explored.
All of the functionality that is exposed via a graphical user interface from the Component Services Snap-in, is also available through an application programming interface (API) to the COM+ Catalog. The following objects are part of the COM+ Administration Library.
COMAdminCatalog |
Object that represents the entire catalog |
COMAdminCatalogCollection |
Object that represents any collection within the catalog |
COMAdminCatalogObject |
Object that represents any item within a COMAdminCatalogCollection collection |
COM+ Administration Library Objects
These objects can be used in scripts written in VBScript, JScript or any other language/environment that supports either COM+ automation or native COM+ interface-based invocations. This approach is well suited to situations where complex COM+ server and library application environments must be duplicated across numerous machines and where application deployment customization is required. Custom deployment scripts can be created to not only deploy the COM+ application, but to perform a variety of other activities related to configuring and to deploying a complete application as well. Examples of this include:
Distributing data files used by the application.
Configuring data access parameters such as ODBC DSN information.
Setting security values such as Access Control List (ACL) settings on files.
COM+ provides a tool, COMRepl, to assist in the automatic distribution of COM+ applications from one source computer to one or more target computers. The COMRepl tool provides the ability to replicate the components and their associated configuration information. The following requirements must be met to use COMRepl:
All of the target machines must have the same version of the Windows 2000 operating system software installed.
All of the target machines must be booted and online.
The person using the COMRepl tool must have appropriate permissions to install and to configure COM+ applications on the source computer and all target computers.
COMRepl has the following limitations:
Local machine accounts are not replicated. If they are used in roles, they must be manually replicated.
No application data, such as databases, files, and so on are replicated to the target computers. Therefore, another means of replicating this data must be developed.
Because COMRepl replicates to named machines, if a machine in the cluster has failed and is being replaced by a fail-over node, the failed machine will not be treated as a target machine.
COMRepl is well suited for replicating COM+ server and library applications across multiple servers.
The MSI output files that are created when exporting COM+ server applications or application proxies from the Component Services Snap-in, can be combined into other MSI packages to build monolithic MSI packages. This is a particularly useful approach when deploying COM+ application proxies that are part of a larger application. One of the features of COM+ application proxies, is that the RSN of the proxy can be specified when the MSI script is run. This provides flexibility of location in where the application proxy MSI file is created and where it is installed. Custom MSI packages can then be configured using Microsoft’s Active Directory Group Policies and IntelliMirror technologies to construct seamless deployment scenarios to large numbers of Windows 2000 machines. Refer to the Microsoft Windows 2000 Web site at http://www.microsoft.com/windows2000/default.asp for more information on Active Directory and IntelliMirror.
The process of configuring and deploying a Microsoft IIS (Internet Information Services) application to one or more machines involves the following steps:
Replicating the IIS Metabase information across machines.
Replicating the site content (including Active Server Pages (ASP))across machines.
Optionally replicating COM+ applications across machines.
Optionally replicating data and data access information across machines.
The following sections describe how the IIS Metabase is structured and the tools and techniques that are available for modifying the Metabase. Additionally, various tools and techniques for replicating the Metabase, site content and COM+ applications across machines are addressed. Techniques for replicating application data, and application data access information (such as ODBC DSN information) across machines are not addressed in these guidelines.
The metabase is a hierarchical database that is used to store configuration values for IIS. Properties can be set at the computer, Web site, virtual directory, directory, and file level within the metabase. The default name for the IIS metabase is metabase.bin. The default location for the file is in the Inetsrv folder.
There are a variety of ways to update the metabase. However, all access to the metabase is ultimately gained by using the IIS Admin Objects or the IIS Admin Base Objects. The IIS Admin Objects expose an automation interface that takes advantage of Microsoft’s Active Directory Services Interface (ADSI). This allows languages such as VBScript, Jscript and Visual Basic to manipulate the metabase. The IIS Admin Base Object is a COM object that implements the IMSAdminBase interface. IMSAdminBase provides a low-level interface with methods that enable COM-compliant languages such as Visual C++ to manipulate the metabase.
Configuring and replicating the IIS Metabase is the first step in deploying an IIS-based application. Several tools and techniques can be used to accomplish this.
The primary GUI tool for manipulating the IIS Metabase is the Internet Services Manager Snap-in. This tool supports manual configuration of all metabase information by presenting a hierarchical view of all Internet Services and their associated content trees. FTP, Web and SMTP services can all be managed and configured using the Internet Services Manager Snap-in.
Another Microsoft supplied tool is MetaEdit. This is a GUI tool that allows direct manipulation of all metabase keys and values. It provides a hierarchical tree-view of the metabase that reflects the internal structure of the metabase and the associated IIS Admin Object model.
Both of these tools are well suited for configuring a single machine. However when multiple machines need to be configured identically, another approach should be used.
IIS provides pre-built scripts that leverage the IIS Admin Objects and provide simplified access to those objects. Located in the AdminScripts subdirectory of the Inetpub directory are numerous VBScript files that can be used to query and update the metabase. One of these scripts, adsutil.vbs provides commands to get, set, enumerate, delete, create, and copy metabase keys and values. It also supports a variety of options for creating, deleting and modifying IIS applications as well as starting and stopping IIS services. These scripts can be combined into other custom scripts or the IIS Admin Objects can be directly accessed from custom scripts to manipulate the metabase and/or to recreate an entire metabase structure. This is a very flexible approach for replicating metabase information across multiple machines.
An alternative to using the IIS Admin Objects is to use the IMSAdminBase interface of the IIS Admin Base Objects from a Visual C++ program. This approach may be chosen if extremely robust deployment utilities need to be developed, or if Visual C++ is a preferred development environment.
Similar to using automation scripts for configuring and deploying COM+ applications, custom scripts have the advantage over other deployment approaches and utilities by being extensible. They can be enhanced to distribute and to configure all aspects of an application, not just IIS metabase information.
After the IIS Metabase is replicated, site content and possibly COM+ application components and configuration information must be replicated across machines. The techniques described in the Component Application Configuration and Deployment section can be used to deploy COM+ applications. The following sections provide alternatives for replicating site content.
Microsoft Site Server provides a comprehensive Web site management solution. Site Server includes a content deployment feature with the capabilities of keeping the content of multiple Web sites in sync. The deployment features of the product are robust in that they can be automated, and are recoverable in the event of a replication failure. This is a good solution for content replication, particularly if Site Server is already being used.
Another Microsoft tool that can be used to deploy IIS-based applications is Visual InterDev. Visual InterDev provides functions that allow the implementer to copy content from one Web site to another using the Microsoft FrontPage® server extensions that are part of IIS. The limitation of this approach is that a copy can only be made to one Web site at a time, and the copy cannot be scheduled for automatic updates. This approach is only recommended for sites that are spread across a small number of servers.
IISSync is a tool that is provided with IIS to replicate IIS metabase information, IIS site content, and COM+ application information across multiple machines. To replicate COM+ applications, IISSync internally calls COMRepl, the component replication tool described previously in the Component Application Configuration and Deployment section of this guideline. The primary limiting factor in using IISSync, is that it is designed to be used in a clustered environment. This means that it can only be used with Windows NT Server Enterprise, or with Windows 2000 Advanced Server Edition.
As with COM+ application deployment and IIS metabase deployment, custom scripts can be developed to deploy the content of an IIS-based application. This approach provides the maximum amount of flexibility of all the content deployment alternatives, but is also the most labor-intensive approach.
This section discusses two deployment scenarios and lists the appropriate configuration and deployment tools and techniques that should be used for each.
This deployment scenario describes the tools and techniques that should be applied to a COM+-based application where a presentation tier, rich native client (Win32-based) is accessing COM+ server applications on one or more middle-tier servers. This scenario has the following considerations:
A presentation tier, rich native client application, including COM+ application proxies must be distributed to a potentially large number of Windows 2000 Professional machines. The application may need to be redeployed on a frequent basis when enhancements or fixes are available.
The COM+ server and library applications may need to be distributed across a few machines or a large number of machines. The application may require that associated data files and data access configuration information be deployed along with the COM+ application.
The best technology for deploying the rich native client application and the COM+ application proxies to the Windows 2000 Professional machines would be to use the Component Services Snap-in to export the COM+ application proxy .MSI file. Then include that .MSI file in a comprehensive MSI package that installed the entire rich native client application. Finally, the comprehensive MSI package could be configured within the Active Directory Group Policy/IntelliMirror framework and be deployed using its distribution features.
The deployment techniques for the COM+ server application, library application and associated application data depend upon the complexity of the application’s configuration and to the number of machines that the application is being deployed. If the application will only be running on one or two machines, or the application is very simple, and the application will only be deployed to a single site, the Component Services Snap-in can be used to manually install and configure the COM+ server and library applications. The exported .MSI files can be manually copied to each server to be installed. The associated data file and data access configuration setup can also be performed manually on each machine.
If the COM+ application is complex or if it is going to be deployed across multiple servers or sites, then COMRepl and/or COMRepl, in conjunction with custom scripts, should be used to deploy the application and associated application data. This technique will guarantee that mistakes are not made by manually deploying the application and that the machine configurations are consistent across all servers.
This deployment scenario describes the tools and techniques that should be applied to an IIS-based application. The application may also include COM+-based application components that are accessed from ASP pages. The guidelines for deploying this type of system are similar to the guidelines for deploying a pure COM+-based system. For guidelines on deploying the COM+ portion of an IIS/COM+ System, see the previous COM+ N-Tier System Deployment section that describes techniques for COM+ server application deployment.
If the system is relatively simple and static, or if it is only being deployed to a small number of machines, and the application will only be deployed to a single site, then manual distribution can be used. The Internet Services Manager Snap-in and/or the MetaEdit utility can be used to configure the IIS Metabase on all deployment machines. Then a tool such as Visual Interdev can be used to replicate site content to each of the Web servers, one at a time.
If the system is complex and/or dynamic, or if it will be deployed across multiple machines or sites, one or more automated deployment techniques should be used. If the environment being deployed to is a Microsoft Windows Cluster-based platform, then IISSync should be used to replicate the IIS Metabase information, IIS site content and any associated COM+ applications across machines. If IISSync cannot be used, scripts should be developed to update the IIS Metabase. This will ensure metabase consistency across all IIS machines. Next, a content replication tool such as Site Server should be used. The automated content replication features of Site Server are critically important when site content changes frequently and large numbers of servers must be kept in sync. Additionally, custom scripts will most likely need to be developed to distribute associated site data files or data access configuration information. These custom scripts must be run on all machines, but the execution of the scripts can be automated by using Telnet or some other remote console utility to initiate the execution of the scripts from a single remote machine.
Rational Unified
Process
|