Composite Configuration Best Practices

This topic contains 2 replies, has 2 voices, and was last updated by  Don Jones 3 years, 4 months ago.

  • Author
    Posts
  • #16278

    Jim March
    Participant

    I want to try and use DSC to configure 3 different web farms with about 100 Websites.

    The web farms will all have the same IIS features installed, and the same SSL certificates (probably Centralized Certificate Store)
    – So I'd think that would be one resource.

    Now for the websites... Should I create a Composite Resource for each website? Each farm is going to host a different set of websitesbased on utilization.

    Then have a configuration script for Farm A, B, and C that references the common IIS settings, and each of the websites it will host?

    The idea here is that if one of the Websites on Farm A outgrows the resources, I can simply move the import-dscresource line from the Farm A, to the Farm B script.

  • #16279

    Jim March
    Participant

    Also, side note. Can you loop through things in your configuration?

    So instead of:

            # Install the IIS role
            WindowsFeature IIS
            {
                Ensure          = "Present"
                Name            = "Web-Server"
            }
    
            # Install the ASP .NET 4.5 role
            WindowsFeature AspNet45
            {
                Ensure          = "Present"
                Name            = "Web-Asp-Net45"
            }

    Could you have an arrary with the all the features you want "Present"?

  • #16282

    Don Jones
    Keymaster

    That sounds like a reasonable approach. We don't really have "best" practices yet – you gotta try stuff and let us know how it works ;).

    And yeah, you can have logic in the config – but remember, that only executes when you PRODUCE the MOF. It won't be logic IN the MOF.

You must be logged in to reply to this topic.