Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

iisposh (4) Versions 2.2.8

Installs/Configures IIS Features

Policyfile
Berkshelf
Knife
cookbook 'iisposh', '= 2.2.8', :supermarket
cookbook 'iisposh', '= 2.2.8'
knife supermarket install iisposh
knife supermarket download iisposh
README
Dependencies
Changelog
Quality 0%

Description

Manage websites, application pools, web applications, and virtual directories in IIS 7.0,7.5,8.0

Requirements

Platforms

  • Windows Server 2008 (R1, R2)
  • Windows Server 2012 (R1, R2) (Testing In Progress)

Resource/Provider

iisposh_pool

Manage application pools in IIS

Actions

  • :create: - creates an application pool
  • :config: - configure an application pool
  • :delete: - delete an existing application pool
  • :start: - start an application pool
  • :stop: - stop an application pool
  • :restart: - restart an application pool

Attribute Parameters

  • name: name of application pool
  • properties: List of all properties to be set for application pool

Examples

# Create an application pool named TestPool with the following properties set
# recycling.periodicRestart.privatememory" = 4, processmodel.maxprocesses = 3, managedPipeLineMode = Integrated, managedRunTimeVersion = v4.0
# processModel.IdentityType = SpecificUser, Autostart = True, processmodel.username = mydomain\username, processmodel.password = mypassword, recycling.logEventOnRecycle = Time,Requests,IsapiUnhealthy,OnDemand,ConfigChange

iisposh_pool 'pool' do 
    name "TestPool"
    properties(
            "recycling.periodicRestart.privatememory" => 4,
            "processmodel.maxprocesses" => 3,
            "managedPipeLineMode" => "Integrated",
            "managedRunTimeVersion" => "v2.0",
            "processModel.IdentityType" => "SpecificUser",
            "autostart" => "True",
            "processmodel.username" => "mydomain\\username",
            "processmodel.password" => "mypassword",
            "recycling.logEventOnRecycle" => "Time,Requests,IsapiUnhealthy,OnDemand,ConfigChange"   
    )
    action :create
end

# Delete the TestPool Application Pool

iisposh_pool 'pool' do 
    name "TestPool"
    action :delete
end

iisposh_website

Allows easy management of IIS Websites

Actions

  • :create: - creates a new website
  • :config: - configure a website
  • :delete: - delete an existing website
  • :start: - start a website
  • :stop: - stop a website
  • :restart: - restart a website

Attribute Parameters

  • name: name of website
  • path: Physical path of website files
  • pool: Application pool of the website
  • properties: List of all properties to be set for website
  • bindings: Set website web bindings [["protocol", "port#","hostheader", "IPAddress"]]
  • powershell_code: String used to convert ruby hashtable to powershell hashtable
  • binding_string: String used to convert ruby array into format usable by powersehll

Examples

# create a new website at the location C:\inetpub\wwwroot\testsite with default binding of port 80

iisposh_website 'website' do 
    name "TestSite"
    action :create
end

# create a new website at the location C:\inetpub\wwwroot\testsite with the following properties set
# name = TestSite, applicationPool = TestPool, ServerAutoStart = True, logFile.logFormat = W3C, logfile.deirectory = c:\weblogs, logfile.logExtFileFalgs = Date,Time,ClientIP,ServerIP,Method,UriStem,UriQuery,HttpStatus,BytesSent,TimeTaken,UserAgent
# bindings = http,3030

iisposh_website 'website' do 
    name "TestSite"
    bindings [["http", "3030", "", ""]]
    properties(
            "applicationPool" => "TestPool",
            "physicalPath"  => "c:\\inetpub\\wwwroot\\testsite",
            "ServerAutoStart" => "True",
            "logfile.logformat" => "W3C",
            "logfile.directory" => "c:\\weblogs",
            "logfile.logExtFileFlags" => "Date,Time,ClientIP,ServerIP,Method,UriStem,UriQuery,HttpStatus,BytesSent,TimeTaken,UserAgent"
    )
    action :create
end

# Delete the TestSite website

    iisposh_website 'website' do 
        name "TestSite"
        action :delete
    end

# configure a website with the following properties
# name = TestSite, applicationPool = TestPool, ServerAutoStart = True, logFile.logFormat = W3C, logfile.deirectory = c:\weblogs, logfile.logExtFileFalgs = Date,Time,ClientIP,ServerIP,Method,UriStem,UriQuery,HttpStatus,BytesSent,TimeTaken,UserAgent
# bindings = http,3030  

iisposh_website 'website' do 
    name "TestSite"
    bindings [["http", "3030", "", ""]]
    properties(
            "applicationPool" => "TestPool",
            "physicalPath"  => "c:\\inetpub\\wwwroot\\testsite",
            "ServerAutoStart" => "True",
            "logfile.logformat" => "W3C",
            "logfile.directory" => "c:\\weblogs",
            "logfile.logExtFileFlags" => "Date,Time,ClientIP,ServerIP,Method,UriStem,UriQuery,HttpStatus,BytesSent,TimeTaken,UserAgent"
    )
    action :config
end 

# configure a website with the following properties
# name = TestSite, applicationPool = TestPool, ServerAutoStart = True, logFile.logFormat = W3C, logfile.deirectory = c:\weblogs, logfile.logExtFileFalgs = Date,Time,ClientIP,ServerIP,Method,UriStem,UriQuery,HttpStatus,BytesSent,TimeTaken,UserAgent

iisposh_website 'website' do 
    name "TestSite"
    properties(
            "applicationPool" => "TestPool",
            "physicalPath"  => "c:\\inetpub\\wwwroot\\testsite",
            "ServerAutoStart" => "True",
            "logfile.logformat" => "W3C",
            "logfile.directory" => "c:\\weblogs",
            "logfile.logExtFileFlags" => "Date,Time,ClientIP,ServerIP,Method,UriStem,UriQuery,HttpStatus,BytesSent,TimeTaken,UserAgent"
    )
    action :config
end 

# restart the TestSite website

iisposh_website 'website' do 
    name "TestSite"
    action :resetart
end

iisposh_webapp

Manage web applications in IIS

Actions

  • :create: - create a web application
  • :config: - configure a web application
  • :delete: - delete a web application

Attribute Parameters

  • name: Name of web application
  • path: Physical Path of web application files
  • site: Name of the website in which the web application belongs to
  • pool: Name of the Application Pool the web application runs under
  • properties: List of properties to be set for the application pool

Examples

# Create a web application named "TestApp" located at "c:\temp" under the "TestSite" running under the "TestPool" application pool

iisposh_webapp 'webapp' do 
    name "TestApp"
    pool "TestPool"
    site "TestSite"
    path "c:\\temp"
    properties(
        "username" => "",   # example:  domain\\username
        "password" => ""
    )
    action :create 
end

# Delete the "TestApp" web application under the "TestSite" website

iisposh_webapp 'webapp' do 
    name "TestApp"
    site "TestSite"
    action :delete 
end

iisposh_vdir

Manage Virtual Directories in IIS

Actions

  • :create: - create a virtual directory
  • :config: - configure a virtual directory
  • :delete: - delete a virtual directory

Attribute Parameters

  • name: Name of virtual directory
  • path: Physical Path of virtual directory files
  • site: Name of the website in which the virtual directory belongs to
  • properties: List of properties to be set for the virutal directory

Examples

# Create a virtual directory named "TestDir" under the "TestSite" website with a path of c:\Temp with the following properties set
# logonMetohod = ClearText, AllowSubDir Config = True

iisposh_vdir 'vdir' do 
    name "Testdir"
    site "TestSite"
    path "c:\\temp"
    properties(
        "logonMethod" => "ClearText",
        "allowSubDirConfig" => "True"

    )

    action :create
end

# Delete the "TestDir" Virtual Director in the "TestSite" website

iisposh_vdir 'vdir' do 
    name "Testdir"
    site "TestSite"
    action :delete
end

Helpers

  • See powershell folder
    • Wrote a powershell script to help discover settings of currently deployed components in IIS. Pools, WebApps, Sites etc
  • files\default\test.ps1
    • To aid in testing of powershell outside of chef and LWRPs, test.ps1 was created to help test the different function calls.

Author

Dependent cookbooks

windows_feature ~> 1.0

Contingent cookbooks

There are no cookbooks that are contingent upon this one.

2.2.8

Fix the powershell/DiscoverSettings.ps1 not walking more than 2 levels when displaying output.
Added fuctionality to validate case sensitivity of properties.

2.0.0

Refactoring of iisposh now that we know the requirements.

0.1.0

Initial release of iisposh

Foodcritic Metric
            

2.2.8 failed this metric

FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/pool.rb:138
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/pool.rb:171
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/pool.rb:203
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/pool.rb:237
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/pool.rb:270
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/pool.rb:302
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/pool.rb:334
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/pool.rb:358
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/pool.rb:381
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/vdir.rb:80
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/vdir.rb:81
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/vdir.rb:113
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/vdir.rb:114
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/vdir.rb:148
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/vdir.rb:149
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/vdir.rb:150
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/vdir.rb:181
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/vdir.rb:182
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/vdir.rb:212
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/vdir.rb:213
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/webapp.rb:72
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/webapp.rb:73
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/webapp.rb:107
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/webapp.rb:108
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/webapp.rb:141
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/webapp.rb:142
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/webapp.rb:143
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/webapp.rb:144
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/webapp.rb:175
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/webapp.rb:176
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/webapp.rb:210
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/webapp.rb:211
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/webconfiguration.rb:35
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/webconfiguration.rb:67
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/website.rb:146
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/website.rb:177
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/website.rb:195
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/website.rb:211
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/website.rb:242
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/website.rb:274
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/website.rb:306
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/website.rb:338
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/website.rb:361
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/providers/website.rb:384
FC002: Avoid string interpolation where not required: /tmp/cook/9053dd63f3b0d4f4e0b6e79d/iisposh/recipes/default.rb:6