The IIS plugin allows users to interact with the Internet Information Services Server 7 (IIS7) and higher versions and accomplish tasks such as managing website and virtual directories using the specific tools of IIS7 through the command line. Using this plugin, users can configure IIS from scripts or executables, run tasks as create a virtual directory and create a website. Also, users can check the status of running processes to see if they ran successfully or if an error existed, and determine what caused the error.
The IIS plugin uses appcmd.exe
to interact with IIS, so the procedures run on the resource with the IIS server.
The Deploy and AdvancedDeploy procedures use the WebDeploy utility. WebDeploy must be installed separately; it is not included in the default IIS setup. It can be downloaded from the Microsoft site. After installation, WebDeploy can typically be found in C:\Program Files\IIS\Microsoft Web Deploy V3 directory.
|
Prerequisites
This plugin uses an updated version of Perl, cb-perl shell (Perl v5.32), and requires CloudBees CD/RO agents version 10.3+ to work.
Plugin Version 4.0.0.2023111692 Revised on November 27, 2023
Integrated version
The IIS plugin supports the following versions of IIS:
-
7.0
-
7.5
-
8.0
-
8.5
-
10
The IIS plugin supports the following versions of Web Deploy:
-
3.5
-
3.6
Create IIS plugin configurations
Plugin configurations are sets of parameters that can be applied across some, or all, plugin procedures. They can reduce the repetition of common values, create predefined parameter sets, and securely store credentials. Each configuration is given a unique name that is entered in the designated parameter for the plugin procedures that use them. The following steps illustrate how to create a plugin configuration that can be used by one or more plugin procedures.
To create a plugin configuration:
-
Navigate to
. -
Select Add plugin configuration to create a new configuration.
-
In the New Configuration window, specify a Name for the configuration.
-
Select the Project that the configuration belongs to.
-
Optionally, add a Description for the configuration.
-
Select the appropriate Plugin for the configuration.
-
Configure the plugin configuration parameters.
-
Select OK.
IIS plugin configuration parameters
The configuration is only used with the CheckServerStatus procedure. |
Parameter | Description | ||
---|---|---|---|
Configuration Name |
Required. The unique name for the configuration. |
||
IIS IP Address |
URL for the IIS server. It must include the protocol (for example, |
||
IIS Port |
Port for the IIS server. This port is used in conjunction with the IP address to conform the URL (for example, |
||
Computer Name (DEPRECATED) |
Computer name or IP address without backslashes (for example,
|
||
Login as |
|
Create IIS plugin procedures
Plugin procedures can be used in procedure steps, process steps, and pipeline tasks, allowing you to orchestrate third-party tools at the appropriate time in your component, application process, or pipeline.
CheckServerStatus
Checks the status of the specified server.
Parameter | Description | ||
---|---|---|---|
Configuration name |
Provide the name of the configuration that holds connection information for the IIS server. Credentials are only used from the plugin configuration if the Use Credentials parameter is selected. |
||
Use Credentials (Deprecated) |
Indicate if credentials must be used. If selected, CloudBees CD/RO uses the username and password from the plugin configuration.
|
||
Credential |
Username and password for basic authentication. |
||
Link to Check For |
URL to check. If not specified, a URL is constructed from the IIS configuration. |
||
Expected Status |
3-digit HTTP status to wait for. Default is |
||
Check Unavailable |
If selected, the |
||
Timeout |
Connection timeout. Default is |
||
Retries |
Number of retries. This only affects connecting to server, and not the status returned by the server. Default is |
CreateAppPool
Creates an IIS application pool or updates the existed one.
Parameter | Description | ||
---|---|---|---|
Application pool name |
Name of the application pool to create (for example, |
||
Configures the application pool to load a specific version of the .NET Framework.
|
|||
Enable 32-bit applications |
If selected for an application pool on a 64-bit operating system, the worker processes serving the application pool run in WOW64 (Windows on Windows64) mode. In WOW64 mode, 32-bit processes load only 32-bit applications. |
||
Managed pipeline mode |
Configures ASP.NET to run in classic mode as an ISAPI extension or in integrated mode where managed code is integrated into the request-processing pipeline. |
||
Queue length |
Maximum number of requests that HTTP.sys queues for the application pool. When the queue is full, new requests receive a 503 "Service Unavailable" response. |
||
Start automatically |
If selected, the application pool starts on creation or when IIS starts. Starting an application pool sets this property to |
||
Limit |
Configures the maximum percentage of CPU time (in 1/1000ths of a percent) that the worker processes in an application pool are allowed to consume over a period of time, as indicated by the Limit Interval parameter ( |
||
Limit action |
Specifies the action to take when the specified Limit is exceeded.
|
||
Limit interval (minutes) |
Specifies the reset period, in minutes, for CPU monitoring and throttling limits on the application pool. When the number of minutes elapsed since the last process accounting reset equals the Limit interval, IIS resets the CPU timers for both the logging and limit intervals. Setting the value of Limit interval to |
||
Processor affinity enabled |
If selected, the worker processes serving this application pool are forced to run on specific CPUs. This enables sufficient use of CPU caches on multiprocessor servers. |
||
Processor affinity mask |
Hexadecimal mask that forces the worker processes for this application pool to run on a specific CPU. If selected, a value of |
||
Identity |
Configures the application pool to run as a built-in account, such as Network Service (recommended), Local Service, or as a specific user identity. |
||
Idle timeout (minutes) |
Amount of time, in minutes, a worker process remains idle before it shuts down. A worker process is idle if it is not processing requests and no new requests are received. |
||
Load user profile |
If selected, IIS loads the user profile for the application pool identity. If not selected, IIS 6.0 behavior is used. |
||
Maximum worker processes |
Maximum number of worker processes permitted to service requests for the application pool. If this number is greater than |
||
Ping enabled |
If selected, the worker processes serving this application pool are pinged periodically to ensure that they are still responsive. This process is called health monitoring. |
||
Ping maximum response time (seconds) |
Maximum time, in seconds, that a worker process is given to respond to a health monitoring ping. If the worker process does not respond, it is terminated. |
||
Ping period (seconds) |
Period of time, in seconds, between health monitoring pings sent to the worker processes serving this application pool. |
||
Shutdown time limit (seconds) |
Period of time, in seconds, a worker process is given to finish processing requests and shut down. If the worker process exceeds the shutdown time limit, it is terminated. |
||
Startup time limit (seconds) |
Period of time, in seconds, a worker process is given to start up and initialize. If the worker process initialization exceeds the startup time limit, it is terminated. |
||
Application pool process orphaning enabled |
If selected, an unresponsive worker process is abandoned (orphaned) instead of terminated. This feature can be used to debug a worker process failure. |
||
Orphan action executable |
Executable to run when a worker process is abandoned (orphaned). For example, |
||
Orphan action executable parameters |
Parameters for the executable that are run when a worker process is abandoned (orphaned). For example, |
||
Service unavailable response type |
|
||
Rapid fail protection enabled |
If selected, the application pool is shut down if there are a specified number of worker process failures (Maximum failures) within a specified period (Failure interval). By default, an application pool is shut down if there are five failures in a five-minute period. |
||
Failure interval (minutes) |
The time interval, in minutes, during which the specified number of worker process failures (Maximum failures) must occur before the application pool is shut down by Rapid Fail Protection. |
||
Maximum failures |
Maximum number of worker process failures permitted before the application pool is shut down by Rapid Fail Protection. |
||
Shutdown executable |
Executable to run when an application pool is shut down by Rapid Fail Protection. This can be used to configure a load balancer to redirect traffic for this application to another server. |
||
Shutdown executable parameters |
Parameters for the executable to run when an application pool is shut down by Rapid Fail Protection. |
||
Disable overlapped recycle |
If selected, when the application pool recycles, the existing worker process exits before another worker process is created.
|
||
Disable recycling for configuration changes |
If selected, the application pool does not recycle when its configuration is changed. |
||
Private memory limit (KB) |
Maximum amount of private memory, in KB, that a worker process can consume before the application pool is recycled. A value of |
||
Regular time interval (minutes) |
Period of time, in minutes, after which an application pool recycles. A value of |
||
Request limit |
Maximum number of requests an application pool can process before it is recycled. A value of |
||
Specific times |
A set of specific local times, in 24-hour format, when the application pool is recycled. |
||
Virtual memory limit (KB) |
Maximum amount of virtual memory, in KB, that a worker process can consume before the application pool is recycled. A value of |
||
Additional parameters |
Additional parameters to pass to appcmd.exe. |
CreateVirtualDirectory
Creates a new virtual directory in the specified website or updates the existing virtual directory.
Parameter | Description | ||
---|---|---|---|
Application name |
The website and virtual path to contain the virtual directory to create (for example, |
||
Virtual path |
Virtual path of the virtual directory (for example, |
||
Absolute physical path |
The absolute physical path of the Virtual Directory to create (for example, |
||
Create Directory? |
If selected, the specified directory is created if it does not exist. |
||
Credential |
Credentials used to access the site folder. It can be used for network paths.
|
CreateWebApplication
Creates or updates and starts an in-process web application in the given directory. This procedure assumes that the specified application path exists as a virtual directory.
Parameter | Description | ||
---|---|---|---|
Website Name |
The name of the website to add the application to (for example, |
||
Virtual Path |
Virtual path of the application (for example, |
||
Absolute Physical Path |
The absolute physical path of the application to create (for example, |
||
Create Directory? |
If selected, the specified directory is created if it does not already exist. |
||
Credential |
Credentials used to access the site folder. It can be used for network paths.
|
CreateWebSite
Creates or updates a website configuration on a local or remote computer.
Parameter | Description | ||
---|---|---|---|
Website name |
The name of the website to create. |
||
Website path |
If specified, the root application containing a root virtual directory pointing to the specified path is created for this site. If omitted, the site is created without a root application and cannot be started until one is created. |
||
Website ID |
ID of the website. |
||
List of bindings |
Comma-separated list of bindings that use the friendly form of |
||
Create Directory? |
If selected, the specified directory is created if it does not already exist. |
||
Credential |
Credentials used to access the site folder. It can be used for network paths.
|
DeleteWebApplication
Deletes a web application from the specified website.
Parameter | Description |
---|---|
Application Name |
The website that contains the application to delete (for example, |
Strict Mode |
If selected, the procedure fails if the specified application does not exist. |
DeleteVirtualDirectory
Deletes a virtual directory from the specified website.
Parameter | Description |
---|---|
Virtual directory name |
The website and virtual path that contain the virtual directory to delete (for example, |
Strict mode |
If selected, the procedure fails if the specified virtual directory does not exist. |
DeleteWebSite
Deletes a website.
Parameter | Description |
---|---|
Website name |
The name of the website to delete (for example, |
Strict mode |
If selected, the procedure fails if the specified application does not exist. |
DeleteAppPool
Deletes an application pool.
Parameter | Description |
---|---|
Application pool name |
The name of the website to delete (for example, |
Strict mode |
If selected, the procedure fails if the specified application pool does not exist. |
DeployCopy
Copies the application files recursively to the website application`s physical directory.
Parameter | Description |
---|---|
Destination path |
Required. Path to the destination directory. This must be a physical directory, but it may have an IIS virtual directory pointing to it (for example, |
Path to XCOPY |
Required. Provide the relative or absolute path to the XCOPY executable. |
Source path |
Required. Provide the path to the source directory (for example, |
Additional options |
Option switches for the XCOPY executable, excluding source and destination directories. The default options are those recommended by Microsoft for ASP.NET and IIS website deployment; exercise caution when changing these options.
|
Deploy
Uses MSDeploy (WebDeploy) to deploy a package or a site from a directory into the specified destination and allows you to configure the application pool.
MSDeploy is required for this procedure. |
Parameter | Description |
---|---|
MS deploy path |
Provide the relative or absolute path to the MSDeploy executable. |
Deploy source path |
A path to package (for example, |
Destination website |
Name of the website to be deployed. |
Destination application |
Name of the application to be deployed. If not provided, the content is placed under the website. |
Application pool name |
Application pool name. If the application pool does not exist, it is created. If not specified, the application is placed into the default pool, which has the same name as the website. |
.NET framework version |
The Microsoft® .NET Framework version 3.5 includes all the functionality of earlier versions, introduces new features for the technologies in versions 2.0 and 3.0, and provides additional functionality in the form of new assemblies. To use version 3.5, install the appropriate version of .NET Framework and use the product-specific guidelines. |
Enable 32-bit applications |
If selected for an application pool on a 64-bit operating system, the worker processes serving the application pool run in WOW64 (Windows on Windows64) mode. In WOW64 mode, 32-bit processes load only 32-bit applications. |
Managed pipeline mode |
Configures ASP.NET to run in classic mode as an ISAPI extension or in integrated mode where managed code is integrated into the request-processing pipeline. |
Queue length |
Maximum number of requests that HTTP.sys queues for the application pool. When the queue is full, new requests receive a 503 "Service Unavailable" response. |
Start automatically |
If selected, the application pool starts on creation or when IIS starts. Starting an application pool sets this property to |
Additional settings for application pool |
Additional parameters to pass to |
Additional Parameters |
Additional parameters (for example, |
Undeploy
Uses MSDeploy to undeploy an application or site.
MSDeploy is required for this procedure. |
Parameter | Description | ||
---|---|---|---|
MS deploy path |
Relative or absolute path to the MSDeploy executable. |
||
Web site name |
Website name to undeploy. |
||
Application name |
An application name to undeploy.
|
||
Delete virtual directories? |
Deletes the specified website or web application, including any virtual directories and their content. |
||
Strict mode |
If selected, the procedure fail if the specified website does not exist. |
Deploy advanced
An interface to the utility.
MSDeploy is required for this procedure. |
Parameter | Description |
---|---|
MSDeploy path |
Provide the relative or absolute path to the MSDeploy executable. |
Verb |
Web Deploy operations enable you to gather information from, move, or delete deployment objects like websites and web applications. Web Deploy operations are specified on the command line with the |
Source provider |
Provider that processes specific source or destination data for Web Deploy. For example, the |
Source provider object path |
Path of the provider object. Some providers require a path and some do not. If required, the type of path depends on the provider. |
Source provider settings |
Settings to modify a source provider using the general syntax. |
Destination provider |
Providers process specific source or destination data for Web Deploy. For example, the |
Destination provider object path |
Path of the provider object. Some providers require a path and some do not. If required, the kind of path depends on the provider. |
Destination provider settings |
Settings to modify a destination provider using the general syntax. |
Allow untrusted? |
If selected, untrusted server certificates are allowed when using SSL. |
Pre-sync command |
A command to execute before the synchronization on the destination. For instance, |
Post-sync command |
A command to execute after the synchronization on the destination. For instance, |
Additional options |
Additional options to be passed to |
Set param file |
Applies parameter settings from an XML file. This can be a file path or file content. |
Declare param file |
Includes parameter declarations from an XML file. This can be a file path or file content. |
StartAppPool
Starts an IIS application pool.
Parameter | Description |
---|---|
Application pool name |
The name of the application pool to start (for example, |
StartWebSite
Starts a website into an IIS Server.
Parameter | Description |
---|---|
Website name |
Provide the descriptive name of the website you want to start (for example, |
StopAppPool
Stops an IIS application pool.
Parameter | Description |
---|---|
Application pool name |
The name of the application pool to stop (for example, |
StopWebSite
Stops a website.
Parameter | Description |
---|---|
Website name |
Provide the descriptive name of the website you want to stop (for example, |
RecycleAppPool
Recycles the specified application pool.
Parameter | Description |
---|---|
Application pool name |
Name of the application pool to recycle. |
AssignAppToAppPool
Assigns an application to an application pool.
Parameter | Description |
---|---|
Application pool name |
Name of the application pool to assign the application (for example, |
Application name |
Name of the application to assign (for example, |
Site name |
Name of the site that contains the application to assign (for example, |
ListSites
List the sites on a web server and writes the retrieved data under the specified property.
Parameter | Description |
---|---|
User-defined criteria |
User-defined criteria to search the sites (for example, |
Property name |
Property to write retrieved data. |
Dump format |
Format to represent retrieved data. Data can be represented as XML, JSON, raw (only |
ListSiteApps
Lists website applications.
Parameter | Description |
---|---|
Site name |
Name of the site to search for applications. If not specified, all applications are listed. |
Property name |
Property to write retrieved data. |
Dump format |
Choose the format to represent retrieved data. Data can be represented as XML, JSON, raw (only |
ListAppPools
Lists the application pools.
Parameter | Description |
---|---|
User-defined criteria |
User-defined criteria to search the application pools (for example, |
Property name |
Property to write retrieved data. |
Dump format |
Format to represent retrieved data. Data can be represented as XML, JSON, raw (only |
ListVirtualDirectories
Lists the virtual directories.
Parameter | Description |
---|---|
Virtual directory name |
Virtual directory name to retrieve. If not provided, all virtual directory names are retrieved. |
Property name |
Property to write retrieved data. |
Dump format |
Format to represent retrieved data. Data can be represented as XML, JSON, raw (only |
AddWebSiteBinding
Adds a binding to a website.
Parameter | Description |
---|---|
Website Name |
The name of the website to add a binding, i.e: |
Binding Protocol |
Binding protocol to add (for example, |
Binding Information |
Information of the binding to add, including the host and the port (for example, |
Host Header |
Host headers (also known as domain names or host names) that allow you to assign more than one site to a single IP address on a web server (for example, |
StopServer
Stops the IIS server.
Parameter | Description |
---|---|
Absolute location of the IISRESET utility. |
Absolute path of the script utility that executes this step. If only |
Additional parameters |
Additional parameters to pass to the IISRESET utility. |
StartServer
Starts the IIS server.
Parameter | Description |
---|---|
Absolute location of the IISRESET utility. |
Absolute path of the script utility that execute this step. If only |
Additional parameters |
Additional parameters to pass to the IISRESET utility. |
ResetServer
Restarts IIS server.
Parameter | Description |
---|---|
Absolute location of the IISRESET utility. |
Absolute path of the script utility used to execute this step. If only |
Additional parameters |
Additional parameters to pass to the IISRESET utility. |
AddSSLCertificate
Adds an SSL certificate to the specified port or updates an SSL certificate if one already exists.
The certificate should be added to IIS certificates storage. For instructions, refer to IIS.NET Forums.
Parameter | Description | ||
---|---|---|---|
IP |
IP address for the certificate (for example, |
||
Hostname |
Hostname for the certificate (for example,
|
||
Port |
Port to add the SSL certificate to (for example, |
||
Certificate Store |
The name of the certificate store (for example, |
||
Certificate Hash (Thumbprint) |
The certificate hash. The certificate hash can be found on the Server Certificates tab of the IIS console (for example, |
Examples and use cases
Create a website
This example shows the how to create a website.
-
Run the CheckServerStatus with the appropriate parameters to verify the server availability:
-
Verify the result of the server status; it must be running:
-
Once the server is running, the website can be created with these parameters:
-
Verify the result of the creation of the site:
-
If the creation of the site was successful, the site can be started with these parameters:
-
Finally, verify that the application was started successfully:
IIS plugin release notes
4.0.0
-
Upgraded from Perl 5.8 to Perl 5.32. The plugin is not backward compatibility with releases prior to CloudBees CD/RO 10.3. Starting with this release, a new agent is required to run the plugin procedures.
3.1.2
-
Configured the plugin to allow the ElectricFlow UI to create configs inline of a procedure form.
3.1.1
-
Configured the plugin to allow the ElectricFlow UI to render the plugin procedure parameters entirely using the configured form XMLs.
-
Enabled the plugin for managing the plugin configurations inline when defining an application process step or a pipeline stage task.
3.1.0
-
The Computer Name parameter in the plugin configuration has been deprecated.
-
The Credentials parameter was added to CheckServerStatus procedure.
-
The Configuration Name parameter is no longer required in the CheckServerStatus procedure.
-
The deployment logic has been changed; if no application name is provided to the Deploy procedure, but the application pool parameters are specified, the root application of the website (
/
) is moved into the specified application pool and parameters are applied to this application pool. -
Support for virtual directory credentials has been added for the CreateWebSite, CreateWebApplication, CreateVirtualDirectory procedures.
-
The Create Directory? parameter was added for the CreateWebSite, CreateWebApplication, and CreateVirtualDirectory procedures.
-
Support for the AddSSLCertificate procedure has been added.