IIS Web Application resources protect Microsoft Internet Information Services (IIS) Web or FTP sites. When a failover occurs, LifeKeeper starts the IIS site on the standby server, restoring service for web or FTP clients.

Resource Type: WEBServer/webapp
Aliases: webserver/webapp, webapp, iis

Preconditions

  • Microsoft IIS (Internet Information Services) must be installed on the server.
  • The IIS site specified by --site-name must already exist in IIS.

Subcommands

IIS Web/FTP Application resources are managed by commands of the form:

lkcli resource WEBServer/webapp <subcommand> [flags]

Subcommand Description Required Role
create Create a new IIS Web/FTP Application resource admin
extend Extend to a standby server admin
get-property Read a resource property guest
set-property Update an editable resource property admin

create

lkcli resource WEBServer/webapp create \
  --service-type=<enum> --site-name=<string> [flags]

Flag Short Type Required Default Constraints Description
--service-type enum Yes WEB, FTP IIS service type
--site-name string Yes IIS site name (as configured in IIS Manager)
--connection-check enum No enabled enabled, disabled Enable or disable connection check health monitoring
--url string No URL for connection check health probes (WEB type only)
--ftp-ssl enum No disabled enabled, disabled Enable FTP over SSL for connection checks (FTP type only)
--tag string No Auto-generated Resource tag name
--switchback enum No INTELLIGENT INTELLIGENT, AUTOMATIC Switchback type
--local-recovery enum No enabled enabled, disabled Enable local recovery
--quickcheck-interval int No 180 min: 0, max: 604800 Quickcheck interval in seconds
--deepcheck-interval int No 300 min: 0, max: 604800 Deepcheck interval in seconds

extend

lkcli resource WEBServer/webapp extend --primary-sys=<string> --primary-tag=<string> [flags]

Flag Short Type Required Default Constraints Description
--primary-sys string Yes Hostname of the server the existing resource is extended from
--primary-tag string Yes Tag of the existing resource to extend
--standby-sys string No Value of --host (defaults to localhost) Hostname of the standby server
--switchback enum No INTELLIGENT INTELLIGENT, AUTOMATIC Switchback type
--primary-priority int No Defaults to the current priority of the --primary-sys server, or 1 if the resource has not yet been extended min: 1, max: 999 Failover priority for the primary server
--standby-priority int No Defaults to an unused value which is computed dynamically based on the priority values currently in-use min: 1, max: 999 Failover priority for the standby server

get-property / set-property

lkcli resource WEBServer/webapp get-property --tag=<string> --property=<string>
lkcli resource WEBServer/webapp set-property --tag=<string> --property=<string> --value=<string>

Flag Short Type Required Description
--tag -t string Yes Resource tag name
--property -p string Yes Property name (see Properties table below)
--value -v string Yes (set-property only) New property value

Properties

Property Type Constraints Editable Description
service-type enum WEB, FTP No IIS service type
site-name string No IIS site name
resource-version string No Resource version string
connection-checking-settings object (JSON or “key1=value1,key2=value2,…” format) Required fields: connection_check (enabled or disabled), update_cluster (true or false). If connection_check=enabled, url is required. ftp_ssl is optional (enabled or disabled). Yes Connection check configuration object (includes check type, URL, and FTP SSL settings)
deepcheck-interval int min: 0, max: 604800 Yes Deepcheck interval in seconds (default: 300)
quickcheck-interval int min: 0, max: 604800 Yes Quickcheck interval in seconds (default: 180)
local-recovery enum enabled, disabled Yes Enable local recovery
switchback enum INTELLIGENT, AUTOMATIC Yes Switchback type

Example Usage

# Create an IIS Web site resource
lkcli resource WEBServer/webapp create \
  --host=server1 \
  --service-type=WEB \
  --site-name="Default Web Site" \
  --connection-check=enabled \
  --url="http://localhost/health" \
  --tag=webapp.DefaultWebSite

# Create an IIS FTP site resource
lkcli resource iis create \
  --host=server1 \
  --service-type=FTP \
  --site-name="Default FTP Site" \
  --ftp-ssl=disabled \
  --tag=webapp.DefaultFTPSite

# Extend to server2
lkcli resource WEBServer/webapp extend \
  --host=server2 \
  --primary-sys=server1 \
  --primary-tag=webapp.DefaultWebSite

# Disable connection checking
lkcli resource webapp set-property \
  --host=server1 \
  --tag=webapp.DefaultWebSite \
  --property=connection-checking-settings \
  --value="connection_check=disabled"

Feedback

Was this helpful?

Yes No
You indicated this topic was not helpful to you ...
Could you please leave a comment telling us why? Thank you!
Thanks for your feedback.

Post your comment on this topic.

Post Comment