Skip to content

Commit f776eca

Browse files
authored
IIS Manage Task : Updated the readme and made minor changes in the UI (#3734) (#3736)
* IIS Manage Task : Updated the readme and made minor changes in the UI * Addressed review comments * Updated readme
1 parent f3472ac commit f776eca

File tree

4 files changed

+148
-40
lines changed

4 files changed

+148
-40
lines changed
Lines changed: 76 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,76 @@
1-
2-
1+
# IIS Web Application Management
2+
3+
## Overview
4+
5+
This task is used to manage an IIS website, web application, virtual directory or an application pool.
6+
7+
The task runs on the deployment target machine(s) registered with the Deployment Group configured for the task/phase. [Deployment Groups](https://opsstaging.www.visualstudio.com/en-gb/docs/release/getting-started/machine-group-agents?branch=users%2Fahomer%2Frelease-master) are logical groups of deployment target machines with agents installed on each of them. They also specify the security context and runtime targets for the agents. When authoring a Team Services Release definition, you can specify the deployments targets for a [phase](https://opsstaging.www.visualstudio.com/en-gb/docs/build/concepts/process/phases) using the deployment group.
8+
9+
10+
## Contact Information
11+
12+
Please contact the alias RM\_Customer\_Queries at microsoft dot com, if you are facing problems in making this task work. Also, if you would like to share feedback about the task and the new features that you would like to see in it, then do send an email to the alias.
13+
14+
## Pre-requisites for the task
15+
16+
The following pre-requisites need to be setup for the task to work properly.
17+
18+
### IIS Web Server
19+
20+
There should be a IIS web server already installed and configured on the pre-existing machines or virtual machines. The task updates websites, webapps and application pools but does not install or configure IIS web server on the machines. Also to deploy a webapp, use a different task [IIS WebApp Deployment On Deployment Group](https://github.com/Microsoft/vsts-tasks/blob/master/Tasks/IISWebAppDeploymentOnMachineGroup)
21+
22+
### Pre-existing Deployment Group
23+
24+
This task requires a Deployment group to execute. If the web application is to be created/updated on pre-existing machines (physical or virtual machines) then download the agent installer on each of the machines and register them with an existing Deployment group. If there is no pre-existing Deployment group, you can create one in the Deployment groups hub.
25+
26+
Carry out the following steps to create a Deployment group:
27+
* Open your Visual Studio Team Services account in your web browser.
28+
* Open the Deployment groups tab of the Build & Release hub and choose +Deployment group to create a new group
29+
* Enter a name for the group in the Details tab and then save the group.
30+
* In the Register machines using command line section, choose Regenerate script with PAT.
31+
* Choose the icon to copy the script.
32+
* Sign into the Azure virtual machine/physical machine where you wish to execute this task.
33+
* Open an Administrator Powershell command prompt and paste the script you copied, then execute it to register the machine with this group.
34+
* When prompted to configure tags for the agent, press Y and enter web.
35+
* When prompted for the user account, press Return to accept the defaults.
36+
* Wait for the script to finish with a message Service vstsagent.account.computername started successfully.
37+
* In the Deployment groups page of the Build & Release hub, open the Machines tab and verify that the agent is running. If the tag named web is not visible, refresh the page.
38+
39+
## Parameters of the task
40+
41+
The task can be used to create/update a web application, website, virtual Directory, App pool in an IIS web server. The task parameters are described in detail below. The parameters listed with a \* are required parameters for the task.
42+
43+
* **Configuration type\*:** Choose whether you want to create/update an IIS web application or an IIS website or an IIS virtual directory or an IIS application pool. IIS Virtual Directory or an IIS Web Application are created as a child of an existing IIS Website.
44+
45+
* **Action\*:** Select the action to be performed. Create or Update , start, stop actions are supported based on the Configuration type selected. For App pool, Recycle option is also available.
46+
47+
The following parameters are selectively shown based on the configuration type and the action chosen:
48+
49+
* **Website Name\*:** The display name of the IIS Website to create or reconfigure. For IIS Virtual directory or IIS Web Application, provide the name of the parent website under which the directory/application will be created or updated.
50+
* **Physical path\*:** Provide the physical path where the content of the website/virtual directory/web application will be stored. The content can reside on the local Computer, or in a remote directory, or on a network share, like 'C:\Fabrikam or \\ContentShare\Fabrikam'.
51+
* **Virtual path\*:** Provide the virtual path in IIS relative to the parent website.
52+
Example: To create an application Site/Application enter /Application. The parent website should be already existing.
53+
To create a virtual directory Site/Application/VDir enter /Application/Vdir. The parent website and application should be already existing.
54+
* **Physical path authentication\*:** Select the authentication mechanism that will be used to access the physical path of the website/virtual directory/web application.
55+
* **Add binding\*:** Select the option to add port binding for the website.
56+
* **Create or update app pool\*:** Select the option to create or update an application pool. If checked, the website/application will be created in the specified app pool.
57+
58+
The following parameters are shown for an IIS Application Pool:
59+
60+
* **Name\*:** Name of the Application Pool in IIS
61+
* **.NET version\*:** The version of the .NET common language runtime that tis loaded by the application pool. Choose v2.0 for applications built against .NET 2.0, 3.0 or 3.5. Choose v4.0 for .NET 4.0 or 4.5. If the applications assigned to this application pool do not contain managed code, then select the 'No Managed Code' option from the list.
62+
* **Managed pipeline mode\*:** Select the managed pipeline mode that specifies how IIS processes requests for managed content. Use classic mode only when the applications in the application pool cannot run in the Integrated mode.
63+
* **Identity\*:** Configure the built-in account under which an application pool's worker process runs. Select one of the predefined security accounts or configure a custom account.
64+
* **Username\*:** The Windows/domain account of the custom user that the application pool will run under. Example: YOURDOMAIN\YourAccount. You will need to ensure that this user has permissions to run as an application pool.
65+
* **Password\*:** The password for the custom account given above. The best practice is to create a variable in the Build or Release definition, and mark it as 'Secret' to secure it, and then use it here, like '$(userCredentials)'. Note: Special characters in password are interpreted as per [command-line arguments](https://go.microsoft.com/fwlink/?linkid=843470)
66+
67+
The following parameters are shown for an IIS Binding:
68+
* **Protocol\*:** Select HTTP for the website to have an HTTP binding, or select HTTPS for the website to have a Secure Sockets Layer (SSL) binding.
69+
* **IP address\*:** Provide an IP address that end-users can use to access this website. If 'All Unassigned' is selected, then the website will respond to requests for all IP addresses on the port and for the host name, unless another website on the server has a binding on the same port but with a specific IP address.
70+
* **Port\*:** Provide the port, where the Hypertext Transfer Protocol Stack (HTTP.sys) will listen to the website requests.
71+
* **Server Name Indication required\*:** Select the option to set the Server Name Indication (SNI) for the website. SNI extends the SSL and TLS protocols to indicate the host name that the clients are attempting to connect to. It allows, multiple secure websites with different certificates, to use the same IP address.
72+
* **Host name\*:** Enter a host name (or domain name) for the website. Example: www.contoso.com. Leave empty to use any host header. If a host name is specified, then the clients could use the host name instead of the IP address to access the website.
73+
* **SSL certificate thumbprint\*:** Provide the thumb-print of the Secure Socket Layer certificate that the website is going to use for the HTTPS communication as a 40 character long hexadecimal string. The SSL certificate should be already installed on the Computer, at Local Computer, Personal store.
74+
75+
### Advanced Deployment Options
76+
* **Additional appcmd.exe commands:** Enter additional AppCmd.exe commands. For more than one command use a line separator, like list apppools, list sites, recycle apppool /apppool.name:ExampleAppPoolName

Tasks/IISWebAppManagementOnMachineGroup/Strings/resources.resjson/en-US/resources.resjson

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
"loc.description": "Create or update a Website, Web App, Virtual Directories, and Application Pool",
55
"loc.instanceNameFormat": "Manage $(IISDeploymentType)",
66
"loc.group.displayName.Website": "IIS Website",
7-
"loc.group.displayName.ApplicationPoolForWebsite": "IIS application pool",
8-
"loc.group.displayName.ApplicationPool": "IIS application pool",
9-
"loc.group.displayName.ApplicationPoolForApplication": "IIS application pool",
7+
"loc.group.displayName.ApplicationPoolForWebsite": "IIS Application pool",
8+
"loc.group.displayName.ApplicationPool": "IIS Application pool",
9+
"loc.group.displayName.WebApplication": "IIS Application",
10+
"loc.group.displayName.VirtualDirectory": "IIS Virtual directory",
11+
"loc.group.displayName.ApplicationPoolForApplication": "IIS Application pool",
1012
"loc.group.displayName.Advanced": "Advanced",
1113
"loc.input.label.IISDeploymentType": "Configuration type",
1214
"loc.input.help.IISDeploymentType": "You can create or update sites, applications, virtual directories, and application pools.",

Tasks/IISWebAppManagementOnMachineGroup/task.json

Lines changed: 35 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"version": {
1717
"Major": 0,
1818
"Minor": 2,
19-
"Patch": 1
19+
"Patch": 2
2020
},
2121
"minimumAgentVersion": "2.111.0",
2222
"instanceNameFormat": "Manage $(IISDeploymentType)",
@@ -29,19 +29,31 @@
2929
},
3030
{
3131
"name": "ApplicationPoolForWebsite",
32-
"displayName": "IIS application pool",
32+
"displayName": "IIS Application pool",
3333
"isExpanded": true,
3434
"visibleRule": "IISDeploymentType = IISWebsite && ActionIISWebsite = CreateOrUpdateWebsite && CreateOrUpdateAppPoolForWebsite = true"
3535
},
3636
{
3737
"name": "ApplicationPool",
38-
"displayName": "IIS application pool",
38+
"displayName": "IIS Application pool",
3939
"isExpanded": true,
4040
"visibleRule": "ActionIISApplicationPool = CreateOrUpdateAppPool"
4141
},
42+
{
43+
"name": "WebApplication",
44+
"displayName": "IIS Application",
45+
"isExpanded": true,
46+
"visibleRule": "IISDeploymentType = IISWebApplication"
47+
},
48+
{
49+
"name": "VirtualDirectory",
50+
"displayName": "IIS Virtual directory",
51+
"isExpanded": true,
52+
"visibleRule": "IISDeploymentType = IISVirtualDirectory"
53+
},
4254
{
4355
"name": "ApplicationPoolForApplication",
44-
"displayName": "IIS application pool",
56+
"displayName": "IIS Application pool",
4557
"isExpanded": true,
4658
"visibleRule": "IISDeploymentType = IISWebApplication && CreateOrUpdateAppPoolForApplication = true"
4759
},
@@ -56,7 +68,7 @@
5668
"name": "IISDeploymentType",
5769
"type": "pickList",
5870
"label": "Configuration type",
59-
"required": false,
71+
"required": true,
6072
"defaultValue": "IISWebsite",
6173
"options": {
6274
"IISWebsite": "IIS Website",
@@ -75,8 +87,8 @@
7587
"visibleRule": "IISDeploymentType = IISWebsite",
7688
"options": {
7789
"CreateOrUpdateWebsite": "Create Or Update",
78-
"StartWebsite": "Start Website",
79-
"StopWebsite": "Stop Website"
90+
"StartWebsite": "Start",
91+
"StopWebsite": "Stop"
8092
},
8193
"helpMarkDown": "Select the appropriate action that you want to perform on an IIS website. \n\n\"Create Or Update\" will create a website or update an existing website.\n\n Start, Stop will start or stop the website respectively."
8294
},
@@ -89,9 +101,9 @@
89101
"defaultValue": "CreateOrUpdateAppPool",
90102
"options": {
91103
"CreateOrUpdateAppPool": "Create Or Update",
92-
"StartAppPool": "Start Application Pool",
93-
"StopAppPool": "Stop Applcation Pool",
94-
"RecycleAppPool": "Recycle Application Pool"
104+
"StartAppPool": "Start",
105+
"StopAppPool": "Stop",
106+
"RecycleAppPool": "Recycle"
95107
},
96108
"helpMarkDown": "Select the appropriate action that you want to perform on an IIS Application Pool. \n\n\"Create Or Update\" will create app-pool or update an existing one.\n\nStart, Stop, Recycle will start, stop or recycle the application pool respectively."
97109
},
@@ -335,7 +347,7 @@
335347
"label": "Parent website name",
336348
"defaultValue": "",
337349
"required": true,
338-
"visibleRule": "IISDeploymentType = IISVirtualDirectory",
350+
"groupName": "VirtualDirectory",
339351
"helpMarkDown": "Provide the name of the parent Website of the virtual directory."
340352
},
341353
{
@@ -344,7 +356,7 @@
344356
"label": "Virtual path",
345357
"defaultValue": "",
346358
"required": true,
347-
"visibleRule": "IISDeploymentType = IISVirtualDirectory",
359+
"groupName": "VirtualDirectory",
348360
"helpMarkDown": "Provide the virtual path of the virtual directory. \n\nExample: To create a virtual directory Site/Application/VDir enter /Application/Vdir. The parent website and application should be already existing."
349361
},
350362
{
@@ -353,15 +365,15 @@
353365
"label": "Physical path",
354366
"defaultValue": "%SystemDrive%\\inetpub\\wwwroot",
355367
"required": true,
356-
"visibleRule": "IISDeploymentType = IISVirtualDirectory",
368+
"groupName": "VirtualDirectory",
357369
"helpMarkDown": "Provide the physical path where the virtual directory's content will be stored. The content can reside on the local Computer, or in a remote directory, or on a network share, like C:\\Fabrikam or \\\\\\\\ContentShare\\Fabrikam."
358370
},
359371
{
360372
"name": "VDPhysicalPathAuth",
361373
"type": "pickList",
362374
"label": "Physical path authentication",
363375
"required": false,
364-
"visibleRule": "IISDeploymentType = IISVirtualDirectory",
376+
"groupName": "VirtualDirectory",
365377
"defaultValue": "Application User (Pass-through)",
366378
"options": {
367379
"VDUserPassThrough": "Application User (Pass-through)",
@@ -375,6 +387,7 @@
375387
"label": "Username",
376388
"required": true,
377389
"defaultValue": "",
390+
"groupName": "VirtualDirectory",
378391
"visibleRule": "VDPhysicalPathAuth = VDWindowsAuth",
379392
"helpMarkDown": "Provide the user name that will be used to access the virtual directory's physical path."
380393
},
@@ -384,6 +397,7 @@
384397
"label": "Password",
385398
"required": false,
386399
"defaultValue": "",
400+
"groupName": "VirtualDirectory",
387401
"visibleRule": "VDPhysicalPathAuth = VDWindowsAuth",
388402
"helpMarkDown": "Provide the user's password that will be used to access the virtual directory's physical path. <br/>The best practice is to create a variable in the Build or Release definition, and mark it as 'Secret' to secure it, and then use it here, like '$(userCredentials)'. <br> Note: Special characters in password are interpreted as per <a href=\"https://go.microsoft.com/fwlink/?linkid=843470\">command-line arguments</a>"
389403
},
@@ -393,7 +407,7 @@
393407
"label": "Parent website name",
394408
"defaultValue": "",
395409
"required": true,
396-
"visibleRule": "IISDeploymentType = IISWebApplication",
410+
"groupName": "WebApplication",
397411
"helpMarkDown": "Provide the name of the parent Website under which the application will be created or updated."
398412
},
399413
{
@@ -402,7 +416,7 @@
402416
"label": "Virtual path",
403417
"defaultValue": "",
404418
"required": true,
405-
"visibleRule": "IISDeploymentType = IISWebApplication",
419+
"groupName": "WebApplication",
406420
"helpMarkDown": "Provide the virtual path of the application. \n\nExample: To create an application Site/Application enter /Application. The parent website should be already existing."
407421
},
408422
{
@@ -411,15 +425,15 @@
411425
"label": "Physical path",
412426
"defaultValue": "%SystemDrive%\\inetpub\\wwwroot",
413427
"required": true,
414-
"visibleRule": "IISDeploymentType = IISWebApplication",
428+
"groupName": "WebApplication",
415429
"helpMarkDown": "Provide the physical path where the application's content will be stored. The content can reside on the local Computer, or in a remote directory, or on a network share, like C:\\Fabrikam or \\\\\\\\ContentShare\\Fabrikam."
416430
},
417431
{
418432
"name": "ApplicationPhysicalPathAuth",
419433
"type": "pickList",
420434
"label": "Physical path authentication",
421435
"required": false,
422-
"visibleRule": "IISDeploymentType = IISWebApplication",
436+
"groupName": "WebApplication",
423437
"defaultValue": "Application User (Pass-through)",
424438
"options": {
425439
"ApplicationUserPassThrough": "Application User (Pass-through)",
@@ -433,6 +447,7 @@
433447
"label": "Username",
434448
"required": true,
435449
"defaultValue": "",
450+
"groupName": "WebApplication",
436451
"visibleRule": "ApplicationPhysicalPathAuth = ApplicationWindowsAuth",
437452
"helpMarkDown": "Provide the user name that will be used to access the application's physical path."
438453
},
@@ -442,6 +457,7 @@
442457
"label": "Password",
443458
"required": false,
444459
"defaultValue": "",
460+
"groupName": "WebApplication",
445461
"visibleRule": "ApplicationPhysicalPathAuth = ApplicationWindowsAuth",
446462
"helpMarkDown": "Provide the user's password that will be used to access the application's physical path. <br/>The best practice is to create a variable in the Build or Release definition, and mark it as 'Secret' to secure it, and then use it here, like '$(userCredentials)'. <br> Note: Special characters in password are interpreted as per <a href=\"https://go.microsoft.com/fwlink/?linkid=843470\">command-line arguments</a>"
447463
},
@@ -451,7 +467,7 @@
451467
"label": "Create or update app pool",
452468
"required": false,
453469
"defaultValue": "false",
454-
"visibleRule": "IISDeploymentType = IISWebApplication",
470+
"groupName": "WebApplication",
455471
"helpMarkDown": "Select the option to create or update an application pool. If checked, the application will be created in the specified app pool."
456472
},
457473
{

0 commit comments

Comments
 (0)