Author Posts

June 17, 2014 at 4:02 am

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.

June 17, 2014 at 4:22 am

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"?

June 17, 2014 at 6:50 am

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.