Web Hosting Resource Manager::BeginAllocateWebSite

This procedure allocates a Web site from the resource pool. The allocation is first checked against the organization's quota and then a server is selected from the pool.

Note

BeginAllocateWebSite must be used in tandem with EndAllocateWebSite as part of the same transaction.

Arguments

Input argument Required Description

<org>

Yes

The LDAP path of the owning organization.

<megabytes>

Yes

The size in megabytes that the Web site can grow to.

<serverClassName

Yes

The server class group to select the server candidate from.

<algorithm>

Yes

Defines the server candidate selection behavior. The allowed values are (note these are case sensitive):

  1. tightPack: From the set of servers that can satisfy the capacity of an allocation, the servers are ranked favoring those with the least amount of free space.

  2. level: From the set of servers that can satisfy the capacity of an allocation, the servers are ranked favoring those with the most amount of free space.

  3. minSeverCount: From the set of servers that can satisfy the capacity of an allocation, servers are selected where the organization has already had Web sites allocated. If no appropriate servers are found meeting this criteria, then the procedure falls back to a "tightPack" algorithm or the algorithm specified in the @alternate optional parameter.

  4. dedicated: Server candidates are selected from severs that have been dedicated to the organization. If no servers meet this criteria then an error is thrown.

<algorithm>/@alternate

No

Defines the alternate algorithm behavior if the minServerCount algorithm fails to find a candidate server. If provided, this alternate will be used to select the server candidate. If not provided the procedure will default to a "tightPack" alternate. This optional attribute is ignored for all algorithm values except "minServerCount."

<preferredDomainController>

Yes

<serverName>

No

The name of the IIS Web Server. Overrides automatic selection behavior. However the specified server is still evaluated to see if it has been added to Resource Manager, has the necessary resources to satisfy the request, and is a member of the specified server class. Note: Despite the override of automatic selection behavior, you are still required to provide the <algorithm> parameter in the request.

<container>

No

A starting LDAP container to look for the server in. The procedure performs an LDAP search to resolve the <server>/<serverName> to the Active Directory computer object. You can improve the performance of this search by specifying a default container (for example, LDAP://CN=Computers,DC=fabrikam,DC=Com).

Output Argument

The server selected for the allocation. For example:

    <server> 
      <GUID>AFF7B1E1DF90A042BABA475A5D5E155D</GUID> 
 
      <serverName>WEB01</serverName> 
 
    </server> 

Remarks

Access Level

Private.

Server Selection Behavior

  1. If algorithm = dedicated IIS Web Server resources are selected from a pool of servers dedicated to the organization. Otherwise All IIS Web Server resources are retrieved (if serverName is specified, only this resource is retrieved)

  2. Discard any that are not members of the specified serverClassName

  3. Eliminate any servers with insufficient Web site capacity to satisfy the request

  4. Eliminate any servers with insufficient disk space to satisfy the request

  5. If minServerCount specified, eliminate any servers that the org has not already had a Web site allocated to. If no candidates remain, fall back to original candidate set.

  6. Rank the server candidates by algorithm (level or tightpack) based on number of free Web sites.

  7. Rank the server candidates by algorithm (level or tightpack) based on the amount of free megabytes

  8. Select the top candidate and allocate the Web site.

Provisioning Steps

  1. Find resources to satisfy request

  2. Allocate the specified Web site from Resource Manager

Security

  1. Impersonate Caller.

Note

The access level of this procedure is private. It is intended to be called from other namespaces that perform their own security checks.

Sample Code

Example XML Request

<request> 
  <procedure> 
 
    <execute namespace="Web Hosting Resource Manager" procedure="BeginAllocateWebSite" impersonate="1"> 
 
      <executeData> 
 
        <org>LDAP://OU=alpineskihouse,OU=consolidatedmessenger,OU=Hosting,DC=fabrikam,DC=Com</org> 
 
        <preferredDomainController>AD01-wh.fabrikam.com</preferredDomainController> 
 
        <megabytes>10</megabytes> 
 
        <algorithm alternate="level">minServerCount</algorithm> 
 
        <serverClassName>IISWebServerBasic</serverClassName> 
 
      </executeData> 
 
      <after source="executeData" destination="data" mode="merge" /> 
 
    </execute> 
 
  </procedure> 
 
</request> 

Example XML Response

No example XML response.

Applies To

Web Hosting Resource Manager Namespace for:

  • Hosted Messaging and Collaboration version 4.5

  • Hosted Messaging and Collaboration version 4.0

  • Hosted Messaging and Collaboration version 3.5

  • Hosted Messaging and Collaboration version 3.0

  • Windows-based Hosting version 4.5

  • Windows-based Hosting version 4.0

  • Windows-based Hosting version 3.5

  • Windows-based Hosting for Applications version 1.0

See also

Tasks

Web Hosting Resource Manager::EndAllocateWebSite