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

RSS

ms_dotnet (21) Versions 3.2.0

Installs/Configures ms_dotnet

Berkshelf/Librarian
Policyfile
Knife
cookbook 'ms_dotnet', '= 3.2.0'
cookbook 'ms_dotnet', '= 3.2.0', :supermarket
knife cookbook site install ms_dotnet
knife cookbook site download ms_dotnet
README
Dependencies
Changelog
Quality

ms_dotnet Cookbook

Cookbook Version Build Status

Install the Microsoft .NET Framework.

Requirements

This cookbook supports and requires Chef 12.1+ to take advantage of the reboot and windows_package built-in resources.

Platforms

  • Windows XP
  • Windows Vista
  • Windows Server 2003 R2
  • Windows 7
  • Windows Server 2008 (R1, R2)
  • Windows 8 and 8.1
  • Windows Server 2012 (R1, R2)
  • Windows Server 2016

Cookbooks

The following cookbook is required as noted:

  • windows (> 1.36.1)

    ms_dotnet_framework LWRP leverage the windows_feature LWRP

Known Issues

Here are the known issues you can encounter with ms_dotnet recipes: * "Access denied" error on windows_package when running chef via WinRM * Cause: winrm limitation * Common environment: knife windows bootstrap, chef-provisioning, test-kitchen * Theoretical solution: try to simulate a local session by wrapping your chef-client call in psexec or a schedule task. * Test-Kitchen solution: with v1.8.0 you can use the winrm-elevated feature that'll run chef via a schedule task

Usage

This cookbook provides you two methods to install the major versions of .NET framework.

Common case - Recipes

In common cases you can use the attributes driven recipes provided by this cookbook to setup .NET.

Custom case - LWRP

In more custom cases, you might need to control in your own cookbook which .NET version should be installed and when the setup should be performed. You just need to use the ms_dotnet_framework LWRP which handles for you the setup mode - feature vs package - and may also install all known patches.

Resource/Provider

ms_dotnet_framework

Actions

  • :install - Install a specific .NET framework

Attribute Parameters

  • version - Name attribute. Specify the .NET version to install.
  • include_patches - Determine whether patches should also be applied (default: true)
  • feature_source - Specify custom source for windows features. Only avaiable on NT Version 6.2 (Windows 8/2012) or newer. (default: nil)
  • perform_reboot - Determine whether chef should perform required reboot after installing new packages or feature. (default: false)
  • package_sources - Specify custom sources URL for windows packages. URL are indexed by their content SHA256 checkum. (default: {})
  • require_support - Determine whether chef should fail when given version is not supported on the current OS (default: false)

NB: feature_source works only on NT Version 6.2 (Windows 8/2012) or newer.

Examples

Install .NET 4.5.2 from custom sources

ms_dotnet_framework '4.5.2' do
  action            :install
  include_patches   true
  perform_reboot    true
  package_sources   { '6c2c589132e830a185c5f40f82042bee3022e721a216680bd9b3995ba86f3781' => 'http://my-own.site.com/NetFx452.exe' }
  require_support   true
end

Attributes

This cookbook is mostly attributes driven, default values should be enough for common cases.

NB: because this cookbook is usefull only for windows, attributes are not available on other platforms

Common attributes

Below attributes are accessible via node['ms_dotnet']['ATTRIBUTE_NAME'] and are common to all recipes: * timeout - Control the execution timeout in seconds of .NET setup packages (default: 600)

.NET recipes attributes

Recipes ms_dotnet2, ms_dotnet3 and ms_dotnet4 are controlled by the following attributes accessible via node['ms_dotnet']['vX']['ATTRIBUTE_NAME'] - where X is the .NET major version:

  • version - Specify the .NET version to install (default: 2.0.SP2, 3.5.SP1, 4.0)
  • include_patches - Determine whether patches should also be applied (default: true)
  • feature_source - Specify custom source for windows features. Only avaiable on NT Version 6.2 (Windows 8/2012) or newer. (default: nil)
  • perform_reboot - Determine whether chef should perform required reboot after installing new packages or feature. (default: false)
  • package_sources - Specify custom sources URL for windows packages. URL are indexed by their content SHA256 checkum. (default: {})
  • require_support - Determine whether chef should fail when given version is not supported on the current OS (default: false)

NB: feature_source works only on NT Version 6.2 (Windows 8/2012) or newer.

Examples

Install .NET 3.5 SP1 using a Windows UNC Share

Custom node file to install .NET 3.5 SP1 with no patch on a Windows Server 2012R2, using a Windows share for features binaries: json { "name": "my-node.examples.com", "run_list": [ "recipe[ms_dotnet::ms_dotnet3" ], "normal": { "ms_dotnet": { "v3": { "include_patches": "false", "feature_source": "\\ShareSvr\sxs" } } } }

Install .NET 4.5.2 using a package hosted on a custom site

Custom node file to install .NET 4.5.2 from a custom site: json { "name": "my-node.examples.com", "run_list": [ "recipe[ms_dotnet::ms_dotnet4" ], "normal": { "ms_dotnet": { "v4": { "version": "4.5.2", "package_sources": { "6c2c589132e830a185c5f40f82042bee3022e721a216680bd9b3995ba86f3781": "http://my-own.site.com/NetFx452.exe" } } } } }

Recipes

ms_dotnet::default

This recipe does nothing.

ms_dotnet::ms_dotnet2, ms_dotnet::ms_dotnet3, ms_dotnet::ms_dotnet4

Each of these recipes allow you to install a specific major version of .NET Framework, just by including the recipe in your node run_list. They are attribute driven recipes, please referes to the Attributes section of this README to know how to control their behavior.

ms_dotnet::regiis

This recipe register .NET 4 to IIS once and only if IIS service exist.

Libraries

Default

Provides convenients method for the ms_dotnet cookbook.

version_helper

Provides a factory to get specific VersionHelper instance.

PackageHelper

References all official .NET setup & patches packages supported by this cookbook.

packages

Retrieve a Hash containing .NET setup packages info - name, checksum, url & not_if guard.

core?

Determine whether the current node is running on a Core version of Windows.

server?

Determine whether the current node is running on a Server version of Windows.

x64?

Determine whether the architecture of the current node is 64-bits.

VersionHelper

Base abstract class inheriting from PackageHelper and providing convenient methods to determine which .NET version the current node supports, and how the setup should be handled.

features

Get windows features required by the given .NET version

installed_version

Get installed .NET version on the current node

package

Get windows package required by the given .NET version

patches

Get windows patches required by the given .NET version

prerequisites

Get windows packages required before installing the given .NET version

supported_versions

Get all .NET versions supported on the current node OS

V2Helper, V3Helper, V4Helper

Subclass of the VersionHelper, providing helpers for a specific major version of the .NET Framework.

Contributing

  1. Fork the repository on Github
  2. Create a named feature branch (like add_component_x)
  3. Write your change
  4. Write tests for your change (if applicable)
  5. Run the tests, ensuring they all pass
  6. Submit a Pull Request using Github

License and Authors

Authors: Baptiste Courtois (b.courtois@criteo.com), Jeremy Mauro (j.mauro@criteo.com)

Copyright 2014-2015, Criteo.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

ms_dotnet CHANGELOG

This file is used to list changes made in each version of the ms_dotnet cookbook.

3.2.0

  • PR 43 smurawski - Migrate framework LWRP to custom resource

3.1.1

  • PR 38 Jakauppila - Update .NET 4.6 prerequisites (KB3173424)

3.1.0

  • b.courtois - Support Windows Server 2016.
  • PR 35 b.courtois - Add ability to perform required reboot when installing prerequisites and patches.
  • PR 34 b.courtois - Fix patches feature due to invalid prerequisites variable.
  • PR 31 Matasx - Add support for .NET version 4.6.2.
  • PR 31 Matasx - Resolve 0x80240017 WU_E_NOT_APPLICABLE issue with KB2919442.

3.0.0

Improvments

  • Introduce new framework LWRP to setup a specific .NET Version with all its prerequisites and patches.
  • Detection of the current installed version is now way more accurate.
  • Setup of .NET 3.5 is working properly.
  • Proper support of .NET 4.6 and .NET 4.6.1.
  • Packages and sources overriding is attribute driven.
  • Attribute structure is now the same for .NET 2, 3.5 and 4.
  • Add chefspecs and rspecs tests.

Breaking changes

Default recipes and attributes structure have been updated to use the new LWRP. Refers to the README for description and examples of the new attributes.

2.6.1

  • kamaradclimber - Define Windows::VersionHelper::ProductType constants only once

2.6.0

  • b.courtois - Use version helper everywhere to remove references to Win32::Version
  • b.courtois - Add new helper to retrieve windows version info from ohai
  • b.courtois - Use NetFx3ServerFeatures instead of NetFx3 for .NET3.5

2.5.1

  • b.courtois - Trust windows_feature behavior in recipe ms_dotnet3

2.5.0

  • b.courtois - Supports custom source for .Net 3.5 install
  • b.courtois - Use travis container-based infrastructure
  • b.courtois - Use travis bundler caching
  • b.courtois - Don't test agains ruby 1.9.3 anymore

2.4.0

  • Y.Siu - Support .Net3.5 on Windows 8.1 and Server 2012R2.

2.3.0

  • b.courtois - Register aspnet to iis once and only if ISS is present.

2.2.1

  • minkaotic - Fix .NET 3.5 install guard clause.

2.2.0

  • b.courtois - Do not use the windows_reboot resource and its request action.

2.1.1

  • b.courtois - Update constraint to leverage windows cookbook >=1.36.1

2.1.0

  • b.courtois - Fix .NET4.5 support on windows 7/Server 2008R2

2.0.0

  • b.courtois - Fail chef run when an invalid .NET4 version is specified
  • b.courtois - Better support of recents windows version for .NET4
  • b.courtois - Add ms_dotnet3 recipe
  • b.courtois - Fix ms_dotnet2 recipe and stop to use ms_dotnet2 attributes

1.2.0

  • b.courtois - Fail chef run when an invalid .NET4 version is specified

1.1.0

  • b.courtois - Fix attributes computation

1.0.0

  • b.courtois - Merge recipes ms_dotnet4 and ms_dotnet45
  • b.courtois - Add basic support for Server 2012 & 2012R2

0.2.0

  • b.courtois - include default recipe on msdotnet2 core install

0.1.0

  • j.mauro - Initial release of ms_dotnet

Collaborator Number Metric
            

3.2.0 passed this metric

Contributing File Metric
            

3.2.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of http://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

3.2.0 failed this metric

FC069: Ensure standardized license defined in metadata: ms_dotnet/metadata.rb:1
Run with Foodcritic Version 10.3.1 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

License Metric
            

3.2.0 passed this metric

No Binaries Metric
            

3.2.0 passed this metric

Publish Metric
            

3.2.0 passed this metric

Supported Platforms Metric
            

3.2.0 passed this metric

Testing File Metric
            

3.2.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of http://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

3.2.0 passed this metric