Skip to content
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

[windows] Add option to support EXE Agent installer #410

Merged
merged 6 commits into from Mar 23, 2017

Conversation

Projects
None yet
3 participants
@olivielpeau
Copy link
Member

olivielpeau commented Mar 7, 2017

The EXE installer handles per-user to per-machine upgrades
gracefully, including edges cases that the present cookbook can't
reasonably handle on its own.

For this reason, we add the option to use the exe installer when needed
(i.e. for upgrades from Agent <= 5.10.1 to Agent >= 5.12.0).

Also added related documentation

[windows] Add option to support EXE Agent installer
The EXE installer handles per-user to per-machine upgrades
gracefully, including edges cases that the present cookbook can't
reasonably handle on its own.

For this reason, we add the option to use the exe installer when needed
(i.e. for upgrades from Agent <= 5.10.1 to Agent >= 5.12.0).

Also added related documentation

@olivielpeau olivielpeau added the feature label Mar 7, 2017

@olivielpeau olivielpeau added this to the 2.9.0 milestone Mar 7, 2017

@olivielpeau olivielpeau requested review from derekwbrown and degemer Mar 7, 2017

@derekwbrown
Copy link

derekwbrown left a comment

LGTM, modulo the one comment.

@@ -111,6 +111,13 @@
# Expected checksum to validate correct agent installer is downloaded (Windows only)
default['datadog']['windows_agent_checksum'] = nil

# Set to `true` to use the EXE installer on Windows, recommended to gracefully handle upgrades from per-user
# to per-machine installs for all known use cases. We recommend setting this option to `true` for Agent upgrades from

This comment has been minimized.

Copy link
@derekwbrown

derekwbrown Mar 7, 2017

I'm not sure I'd say "all known use cases". That's pretty broad :)

@olivielpeau olivielpeau force-pushed the olivielpeau/win-exe-installer branch from 918a8db to 2c165ab Mar 7, 2017

@@ -25,28 +25,48 @@
end

# If no version is specified, select the latest package
dd_agent_msi = dd_agent_version ? "ddagent-cli-#{dd_agent_version}.msi" : 'ddagent-cli.msi'
temp_file = ::File.join(Chef::Config[:file_cache_path], 'ddagent-cli.msi')
dd_agent_installer_basename = dd_agent_version ? "ddagent-cli-#{dd_agent_version}" : 'ddagent-cli'

This comment has been minimized.

Copy link
@degemer

degemer Mar 14, 2017

Member

Note: let's not forget to follow this naming convention when uploading the new Windows packages. (default name is different)

This comment has been minimized.

Copy link
@olivielpeau

olivielpeau Mar 14, 2017

Author Member

at this point the default installer URL is not different for the MSI (and the EXE has the same URL, except that it has an .exe extension).

In general though if we're concerned about the user experience of automatic upgrades failing when the default latest package is downloaded (shouldn't happen with this cookbook but could happen with user-maintained scripts) then we may consider using a different URL for the new installer.

@olivielpeau olivielpeau self-assigned this Mar 16, 2017

olivielpeau added some commits Mar 22, 2017

[windows] Change latest MSI/EXE url
The URL to the latest installer changes in 5.12.0 from `ddagent-cli`
to `ddagent-cli-latest` so that unattended upgrades don't make chef
runs fail.

Reflect this here. The new URLs work only since 5.12.0, so this change
should only be released once the 5.12.0 installers (msi and exe) are
generally available at these URLs

@olivielpeau olivielpeau force-pushed the olivielpeau/win-exe-installer branch from f6c4249 to 0507f83 Mar 22, 2017

[windows] Fix pkg removal issue on Chef >= 12.6 and `windows` >= 1.39
Tested the change on Chef 12.2 and 12.18, works well on clean installs
and upgrades.

Updated the spec tests assuming they run on Chef >= 12.6.

This should be removed (and the whole recipe should be cleaned up)
when we stop supporting Chef < 12.6 on Windows.
@olivielpeau

This comment has been minimized.

Copy link
Member Author

olivielpeau commented Mar 22, 2017

@degemer I've added a few commits since your review, could you have one last look at the changes? :)

@olivielpeau olivielpeau assigned degemer and unassigned olivielpeau Mar 22, 2017

@olivielpeau olivielpeau merged commit 3f6435b into master Mar 23, 2017

2 checks passed

ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@olivielpeau olivielpeau deleted the olivielpeau/win-exe-installer branch Mar 23, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.