Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing settings for xWebAppPoolDefaults #324

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
42a28d1
added missing application pool default settings
onurbiyik Dec 18, 2017
bdf9689
Unit tests for application pool defaults with all attributes
onurbiyik Dec 19, 2017
c6c3788
updated release notes
onurbiyik Dec 19, 2017
333190d
Updated sample usage in readme and in sample file
onurbiyik Dec 19, 2017
48ab094
Added required new lines at the end of files
onurbiyik Dec 19, 2017
5a6860f
Integration tests
onurbiyik Dec 21, 2017
fa2b938
changes in unit tests
onurbiyik Dec 21, 2017
e596854
added missing application pool default settings
onurbiyik Dec 18, 2017
bfcd8b3
Unit tests for application pool defaults with all attributes
onurbiyik Dec 19, 2017
3d81178
Updated sample usage in readme and in sample file
onurbiyik Dec 19, 2017
9aa67f2
Added required new lines at the end of files
onurbiyik Dec 19, 2017
17d1cf4
Integration tests
onurbiyik Dec 21, 2017
9ea2641
changes in unit tests
onurbiyik Dec 21, 2017
12da9cf
merged with latest original fork source
onurbiyik May 4, 2018
47ea0a3
added missing application pool default settings
onurbiyik Dec 18, 2017
c678fc5
Unit tests for application pool defaults with all attributes
onurbiyik Dec 19, 2017
1f47806
updated release notes
onurbiyik Dec 19, 2017
ebe8ae6
Updated sample usage in readme and in sample file
onurbiyik Dec 19, 2017
f674888
Added required new lines at the end of files
onurbiyik Dec 19, 2017
8bf7e72
Integration tests
onurbiyik Dec 21, 2017
014e5c5
changes in unit tests
onurbiyik Dec 21, 2017
b8a2165
added missing application pool default settings
onurbiyik Dec 18, 2017
f9100cb
Added required new lines at the end of files
onurbiyik Dec 19, 2017
51f0f84
Merge branch 'PoolDefaults' of https://github.com/onurbiyik/xWebAdmin…
onurbiyik May 8, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
829 changes: 699 additions & 130 deletions DSCResources/MSFT_xWebAppPoolDefaults/MSFT_xWebAppPoolDefaults.psm1

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,54 @@
class MSFT_xWebAppPoolDefaults : OMI_BaseResource
{
[Key, Description("Dummy value because we need a key, always 'Machine'"), ValueMap{"Machine"}, Values{"Machine"}] string ApplyTo;
[write, Description("applicationPools/applicationPoolDefaults/managedRuntimeVersion"), ValueMap{"","v2.0","v4.0"}, Values{"","v2.0","v4.0"}] string ManagedRuntimeVersion;
[write, Description("applicationPools/applicationPoolDefaults/processModel/identityType"), ValueMap{"ApplicationPoolIdentity","LocalService","LocalSystem","NetworkService"}, Values{"ApplicationPoolIdentity","LocalService","LocalSystem","NetworkService"}] string IdentityType;

[Write, Description("When set to true, indicates to the World Wide Web Publishing Service (W3SVC) that the application pool should be automatically started when it is created or when IIS is started.")] Boolean autoStart;
[Write, Description("Indicates the .NET configuration file for the application pool.")] String CLRConfigFile;
[Write, Description("When set to true, enables a 32-bit application to run on a computer that runs a 64-bit version of Windows.")] Boolean enable32BitAppOnWin64;
[Write, Description("When set to true, indicates that delegated settings in Web.config files will processed for applications within this application pool. When set to false, all settings in Web.config files will be ignored for this application pool.")] Boolean enableConfigurationOverride;
[Write, Description("Indicates the request-processing mode that is used to process requests for managed content. The values that are allowed for this property are: Integrated, Classic."), ValueMap{"Integrated","Classic"},Values{"Integrated","Classic"}] String managedPipelineMode;
[Write, Description("Indicates the managed loader to use for pre-loading the application pool.")] String managedRuntimeLoader;
[Write, Description("Indicates the CLR version to be used by the application pool. The values that are allowed for this property are: v4.0, v2.0, and ''."), ValueMap{"v4.0","v2.0",""},Values{"v4.0","v2.0",""}] String managedRuntimeVersion;
[Write, Description("When set to true, the Windows Process Activation Service (WAS) creates and passes a token for the built-in IUSR anonymous user account to the Anonymous authentication module. The Anonymous authentication module uses the token to impersonate the built-in account. When this property is set to false, the token will not be passed.")] Boolean passAnonymousToken;
[Write, Description("Indicates the startup type for the application pool. The values that are allowed for this property are: OnDemand, AlwaysRunning."), ValueMap{"OnDemand","AlwaysRunning"},Values{"OnDemand","AlwaysRunning"}] String startMode;
[Write, Description("Indicates the maximum number of requests that HTTP.sys will queue for the application pool. The value must be a valid integer between 10 and 65535.")] UInt32 queueLength;
[Write, Description("Configures the action that IIS takes when a worker process exceeds its configured CPU limit. The values that are allowed for this property are: NoAction, KillW3wp, Throttle, and ThrottleUnderLoad."), ValueMap{"NoAction","KillW3wp","Throttle","ThrottleUnderLoad"},Values{"NoAction","KillW3wp","Throttle","ThrottleUnderLoad"}] String cpuAction;
[Write, Description("Configures the maximum percentage of CPU time (in 1/1000ths of one percent) that the worker processes in the application pool are allowed to consume over a period of time as indicated by the cpuResetInterval property. The value must be a valid integer between 0 and 100000.")] UInt32 cpuLimit;
[Write, Description("Indicates the reset period (in minutes) for CPU monitoring and throttling limits on the application pool. The value must be a string representation of a TimeSpan value. The valid range (in minutes) is 0 to 1440. Setting the value of this property to 0 disables CPU monitoring.")] String cpuResetInterval;
[Write, Description("Indicates whether a particular worker process assigned to the application pool should also be assigned to a given CPU.")] Boolean cpuSmpAffinitized;
[Write, Description("Indicates the hexadecimal processor mask for multi-processor computers, which indicates to which CPU the worker processes in the application pool should be bound. Before this property takes effect, the cpuSmpAffinitized property must be set to true for the application pool. The value must be a valid integer between 0 and 4294967295.")] UInt32 cpuSmpProcessorAffinityMask;
[Write, Description("Indicates the high-order DWORD hexadecimal processor mask for 64-bit multi-processor computers, which indicates to which CPU the worker processes in the application pool should be bound. Before this property takes effect, the cpuSmpAffinitized property must be set to true for the application pool. The value must be a valid integer between 0 and 4294967295.")] UInt32 cpuSmpProcessorAffinityMask2;
[Write, Description("Indicates the account identity under which the application pool runs. The values that are allowed for this property are: ApplicationPoolIdentity, LocalService, LocalSystem, NetworkService, and SpecificUser."), ValueMap{"ApplicationPoolIdentity","LocalService","LocalSystem","NetworkService","SpecificUser"}, Values{"ApplicationPoolIdentity","LocalService","LocalSystem","NetworkService","SpecificUser"}] String identityType;
[Write, Description("Indicates the custom account crededentials. This property is only valid when the identityType property is set to SpecificUser."), EmbeddedInstance("MSFT_Credential")] String Credential;
[Write, Description("Indicates the amount of time (in minutes) a worker process will remain idle before it shuts down. The value must be a string representation of a TimeSpan value and must be less than the restartTimeLimit property value. The valid range (in minutes) is 0 to 43200.")] String idleTimeout;
[Write, Description("Indicates the action to perform when the idle timeout duration has been reached. The values that are allowed for this property are: Terminate, Suspend."), ValueMap{"Terminate","Suspend"}, Values{"Terminate","Suspend"}] String idleTimeoutAction;
[Write, Description("Indicates whether IIS loads the user profile for the application pool identity.")] Boolean loadUserProfile;
[Write, Description("Indicates that IIS should generate an event log entry for each occurrence of the specified process model events.")] String logEventOnProcessModel;
[Write, Description("Indicates the logon type for the process identity. The values that are allowed for this property are: LogonBatch, LogonService."), ValueMap{"LogonBatch","LogonService"},Values{"LogonBatch","LogonService"}] String logonType;
[Write, Description("Indicates whether the IIS_IUSRS group Security Identifier (SID) is added to the worker process token.")] Boolean manualGroupMembership;
[Write, Description("Indicates the maximum number of worker processes that would be used for the application pool. The value must be a valid integer between 0 and 2147483647.")] UInt32 maxProcesses;
[Write, Description("Indicates whether pinging (health monitoring) is enabled for the worker process(es) serving this application pool.")] Boolean pingingEnabled;
[Write, Description("Indicates the period of time (in seconds) between health monitoring pings sent to the worker process(es) serving this application pool. The value must be a string representation of a TimeSpan value. The valid range (in seconds) is 1 to 4294967.")] String pingInterval;
[Write, Description("Indicates the maximum time (in seconds) that a worker process is given to respond to a health monitoring ping. The value must be a string representation of a TimeSpan value. The valid range (in seconds) is 1 to 4294967.")] String pingResponseTime;
[Write, Description("Indicates the environment to be set based on the user profile for the new process.")] Boolean setProfileEnvironment;
[Write, Description("Indicates the period of time (in seconds) a worker process is given to finish processing requests and shut down. The value must be a string representation of a TimeSpan value. The valid range (in seconds) is 1 to 4294967.")] String shutdownTimeLimit;
[Write, Description("Indicates the period of time (in seconds) a worker process is given to start up and initialize. The value must be a string representation of a TimeSpan value. The valid range (in seconds) is 1 to 4294967.")] String startupTimeLimit;
[Write, Description("Indicates an executable to run when a worker process is orphaned.")] String orphanActionExe;
[Write, Description("Indicates parameters for the executable that is specified in the orphanActionExe property.")] String orphanActionParams;
[Write, Description("Indicates whether to assign a worker process to an orphan state instead of terminating it when the application pool fails. If true, an unresponsive worker process will be orphaned instead of terminated.")] Boolean orphanWorkerProcess;
[Write, Description("Indicates the response behavior of a service when it is unavailable. The values that are allowed for this property are: HttpLevel, TcpLevel. If set to HttpLevel and the application pool is stopped, HTTP.sys will return HTTP 503 error. If set to TcpLevel, HTTP.sys will reset the connection."), ValueMap{"HttpLevel","TcpLevel"},Values{"HttpLevel","TcpLevel"}] String loadBalancerCapabilities;
[Write, Description("Indicates whether rapid-fail protection is enabled. If true, the application pool is shut down if there are a specified number of worker process crashes within a specified time period.")] Boolean rapidFailProtection;
[Write, Description("Indicates the time interval (in minutes) during which the specified number of worker process crashes must occur before the application pool is shut down by rapid-fail protection. The value must be a string representation of a TimeSpan value. The valid range (in minutes) is 1 to 144000.")] String rapidFailProtectionInterval;
[Write, Description("Indicates the maximum number of worker process crashes permitted before the application pool is shut down by rapid-fail protection. The value must be a valid integer between 0 and 2147483647.")] UInt32 rapidFailProtectionMaxCrashes;
[Write, Description("Indicates an executable to run when the application pool is shut down by rapid-fail protection.")] String autoShutdownExe;
[Write, Description("Indicates parameters for the executable that is specified in the autoShutdownExe property.")] String autoShutdownParams;
[Write, Description("Indicates whether the W3SVC service should start another worker process to replace the existing worker process while that process is shutting down. If true, the application pool recycle will happen such that the existing worker process exits before another worker process is created.")] Boolean disallowOverlappingRotation;
[Write, Description("Indicates whether the W3SVC service should rotate worker processes in the application pool when the configuration has changed. If true, the application pool will not recycle when its configuration is changed.")] Boolean disallowRotationOnConfigChange;
[Write, Description("Indicates that IIS should generate an event log entry for each occurrence of the specified recycling events.")] String logEventOnRecycle;
[Write, Description("Indicates the maximum amount of virtual memory (in KB) a worker process can consume before causing the application pool to recycle. The value must be a valid integer between 0 and 4294967295. A value of 0 means there is no limit.")] UInt32 restartMemoryLimit;
[Write, Description("Indicates the maximum amount of private memory (in KB) a worker process can consume before causing the application pool to recycle. The value must be a valid integer between 0 and 4294967295. A value of 0 means there is no limit.")] UInt32 restartPrivateMemoryLimit;
[Write, Description("Indicates the maximum number of requests the application pool can process before it is recycled. The value must be a valid integer between 0 and 4294967295. A value of 0 means the application pool can process an unlimited number of requests.")] UInt32 restartRequestsLimit;
[Write, Description("Indicates the period of time (in minutes) after which the application pool will recycle. The value must be a string representation of a TimeSpan value. The valid range (in minutes) is 0 to 432000. A value of 0 means the application pool does not recycle on a regular interval.")] String restartTimeLimit;
[Write, Description("Indicates a set of specific local times, in 24 hour format, when the application pool is recycled. The value must be an array of string representations of TimeSpan values. TimeSpan values must be between 00:00:00 and 23:59:59 seconds inclusive, with a granularity of 60 seconds. Setting the value of this property to '' disables the schedule.")] String restartSchedule[];

};
53 changes: 50 additions & 3 deletions Examples/Sample_xWebAppPoolDefaults.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,56 @@ Configuration Sample_xWebAppPoolDefaults
# Configures the application pool defaults.
xWebAppPoolDefaults PoolDefaults
{
ApplyTo = 'Machine'
ManagedRuntimeVersion = 'v4.0'
IdentityType = 'ApplicationPoolIdentity'
ApplyTo = 'Machine'
autoStart = $true
CLRConfigFile = ''
enable32BitAppOnWin64 = $false
enableConfigurationOverride = $true
managedPipelineMode = 'Integrated'
managedRuntimeLoader = 'webengine4.dll'
managedRuntimeVersion = 'v4.0'
passAnonymousToken = $true
startMode = 'OnDemand'
queueLength = 1000
cpuAction = 'NoAction'
cpuLimit = 90000
cpuResetInterval = (New-TimeSpan -Minutes 5).ToString()
cpuSmpAffinitized = $false
cpuSmpProcessorAffinityMask = 4294967295
cpuSmpProcessorAffinityMask2 = 4294967295
identityType = 'ApplicationPoolIdentity'
idleTimeout = (New-TimeSpan -Minutes 20).ToString()
idleTimeoutAction = 'Terminate'
loadUserProfile = $true
logEventOnProcessModel = 'IdleTimeout'
logonType = 'LogonBatch'
manualGroupMembership = $false
maxProcesses = 1
pingingEnabled = $true
pingInterval = (New-TimeSpan -Seconds 30).ToString()
pingResponseTime = (New-TimeSpan -Seconds 90).ToString()
setProfileEnvironment = $false
shutdownTimeLimit = (New-TimeSpan -Seconds 90).ToString()
startupTimeLimit = (New-TimeSpan -Seconds 90).ToString()
orphanActionExe = ''
orphanActionParams = ''
orphanWorkerProcess = $false
loadBalancerCapabilities = 'HttpLevel'
rapidFailProtection = $true
rapidFailProtectionInterval = (New-TimeSpan -Minutes 5).ToString()
rapidFailProtectionMaxCrashes = 5
autoShutdownExe = ''
autoShutdownParams = ''
disallowOverlappingRotation = $false
disallowRotationOnConfigChange = $false
logEventOnRecycle = 'Time,Requests,Schedule,Memory,IsapiUnhealthy,OnDemand,ConfigChange,PrivateMemory'
restartMemoryLimit = 0
restartPrivateMemoryLimit = 0
restartRequestsLimit = 0
restartTimeLimit = (New-TimeSpan -Minutes 1440).ToString()
restartSchedule = @('00:00:00', '08:00:00', '16:00:00')
}


}
}
Loading