forked from voxpupuli/puppet-dotnet
-
Notifications
You must be signed in to change notification settings - Fork 2
Update #2
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
Open
dutsmiller
wants to merge
15
commits into
reidmv:update
Choose a base branch
from
dutsmiller:update
base: update
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Update #2
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Previously a Powershell exec was used to install packages. This commit converts that task to a package-based resource. It allows cleaner, easier to read code. Switch from download_file to remote_file. This allows for better subscribe/notify of the dotnet defined type as remote_file does not have any intermediate file fragment resources which may be used or changed even if the file to download is not changed. The remote_file resource is also platform agnostic, unlike download_file, more meaning it may be accessible and familar to a wider range of potential users/contributors.
Use Puppet 4's type system to deal with validation and remove dependency on stdlib. Use the $::os fact to get Windows release version and remove dependency on windowsfacts.
Some versions of .NET are in-place upgrades of others. Installation of .NET 4.5, for example, will replace the 4.0 package. In order to disallow Puppet from continuously trying to install .NET 4.0 in the event dotnet resources for both 4.0 and 4.5 have been added to the catalog, create a package=absent resource for each conflicting version. This will cause the conflict to be caught when a catalog is compiled for the node.
Some OSes have some versions of .NET built in and so do not need to have it installed via package. It seems likely this was auto-detected based on registry key presence/absence via exec previously. Because we're now managing the package directly, we should be more explicit about whether or not the package actually needs to be installed.
Regex adjustments to make it easier to read which versions support which installation types.
Set gemfile to use PUPPET_GEM_VERSION and set default to 4.0
This is not a comprehensive test overhaul, but does update the functional tests to work with the updated code.
Previously the dotnet define logic would attempt to install .NET 3.5 as a feature on Server 2008. This was incorrect, as in Server 2008 .NET 3.5 was not available as a feature and needed the package installation.
Windows 7 does not install .NET as a package, nor does it have the ServerManager module. Therefore provide an alternative means of managing the feature via DISM.
The Puppet Exec resource uses the return code of command, unless, and onlyif to determine success/failure or if action is necessary. Previously, the onlyif in dotnet::install::feature would never exit with a non-zero exit code, even if the Test-Path command returned a False object. Return object and exit code are not the same thing. This commit modifies the onlyif to ensure that if the Test-Path command returns false a non-zero exit code will occur.
This will allow specification of different feature names. Necessary specifically because the feature name to install .NET 3.5 on Server 2012 is not the same feature as to install 4.5. The feature name for .NET 3.5 in Server 2012 is not AS-NET-Framework, which we use as the default feature. This commit also updates the dotnet type to attempt installation of the correct feature when 3.5 is specified on Server 2012.
A custom fact 'dotnet4version' was created to pull specific version from windows registry. This is then used to determine if desired .NET version has already been installed via non-msi method (from windows update for example). If desired version is already installed, this prevents the downloading and attempted installation of the package from occurring on each agent run.
2ddda63 to
ae4c4a4
Compare
11f5c32 to
c23d04f
Compare
ab9392f to
f9308aa
Compare
126e037 to
044d80c
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I apologize in advance if I'm messing up the process, this is my first pull request.