github.com/anth0d/nomad@v0.0.0-20221214183521-ae3a0a2cad06/website/content/plugins/drivers/community/iis.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Drivers: nomad-driver-iis'
     4  description: >-
     5    The IIS driver is used for running
     6    Windows IIS services.
     7  ---
     8  
     9  # Windows IIS Driver
    10  
    11  Name: `win_iis`
    12  
    13  The Nomad IIS driver provides an interface for running Windows IIS website tasks.
    14  A "website" is a combination of an application pool and a site (app, vdir, etc.).
    15  Each allocation will create an application pool and site with the name being the allocation ID (guid).
    16  
    17  For more detailed instructions on how to set up and use this driver, please
    18  refer to the [project README.md][nomad-driver-iis].
    19  
    20  ## Task Configuration
    21  
    22  ```hcl
    23  task "iis-test" {
    24    driver = "win_iis"
    25  
    26    config {
    27      path = "C:\\inetpub\\wwwroot"
    28      apppool_identity {
    29        identity="SpecificUser"
    30        username="vagrant"
    31        password="vagrant"
    32      }
    33    }
    34  }
    35  ```
    36  
    37  The IIS task driver supports the following parameters:
    38  
    39  - `path` (string) - (Required) The path of the website directory.
    40  
    41  - `site_config_path` (string) - (Optional) The path should point to a valid IIS Site XML that is generated from an export.
    42  
    43  - `apppool_config_path` (string) - (Optional) The path should point to a valid IIS Application Pool XML that is generated from an export.
    44  
    45  - `apppool_identity` - (Optional) `ApplicationPoolIdentity` (default). The identity which the Application Pool will run under.
    46  
    47    - `identity` (string) - (Required) An identity is required to be set for Application Pools. Accepted inputs are `LocalService`, `LocalSystem`, `NetworkService`, `SpecificUser`, and `ApplicationPoolIdentity`.
    48    - `username` (string) - (Optional) If `SpecificUser` was chosen, then provide the username.
    49    - `password` (string) - (Optional) If `SpecificUser` was chosen, then provide the password.
    50  
    51  - `bindings` - (Optional) Bindings set here will be set for IIS.
    52    - `hostname` (string) - (Optional) IIS hostname for a binding.
    53    - `ipaddress` (string) - (Optional). `*` (default). IIS allows a binding to specify the IP Address being sent out.
    54    - `resource_port` (string) - (Optional) Use a label from an established network stanza port. It is recommended to use this approach over using `port`.
    55    - `port` (number) - (Optional) Specify a static port to use for the website. A port must be specified between `resource_port` or `port`. Ports set this way will not be recognized by nomad.
    56    - `type` (string) - (Optional) Specifies which binding type IIS should use such as `http` or `https`.
    57    - `cert_hash` (string) - (Optional) For SSL support, supply the cert hash here of a cert installed on the system.
    58  
    59  For optional parameters default value is assumed `nil`, if the default value is not specified in the documentation.
    60  
    61  ## Networking
    62  
    63  Currently, `nomad-driver-iis` only supports host networking. No special configuration is needed as `nomad-driver-iis`
    64  relies on IIS to manage the networking for Windows IIS website tasks.
    65  
    66  ## Client Requirements
    67  
    68  `nomad-driver-iis` requires the following:
    69  
    70  - Windows 2016+
    71  
    72  - Web Server enabled for IIS
    73  
    74  - The Nomad IIS driver binary ([build instructions][nomad-driver-iis])
    75  
    76  ## Plugin Options ((#plugin_options))
    77  
    78  - `enabled` - The `IIS` driver may be disabled on hosts by setting this option to `false` (defaults to `true`).
    79  
    80  - `stats_interval` - This value defines how frequently you want to send `TaskStats` to nomad client. (defaults to `1 second`).
    81  
    82  An example of using these plugin options with the new [plugin
    83  syntax][plugin] is shown below:
    84  
    85  ```hcl
    86  plugin "win_iis" {
    87    client {
    88      enabled = true
    89      stats_interval = "30s"
    90    }
    91  }
    92  ```
    93  
    94  Please note the plugin name should match whatever name you have specified for the external driver in the [plugin_dir][plugin_dir] directory.
    95  
    96  ## Client Attributes
    97  
    98  The `IIS` driver will set the following client attributes:
    99  
   100  - `driver.win_iis.iis_version` - Sets to IIS version of IIS which is running on nomad client.
   101  
   102  [nomad-driver-iis]: https://github.com/Roblox/nomad-driver-iis
   103  [plugin]: /docs/configuration/plugin
   104  [plugin_dir]: /docs/configuration#plugin_dir
   105  [plugin-options]: #plugin_options