Skip to content

Support for NPM on Windows#688

Merged
albertvaka merged 4 commits intomasterfrom
albertvaka/npm-use-addlocal
Mar 17, 2021
Merged

Support for NPM on Windows#688
albertvaka merged 4 commits intomasterfrom
albertvaka/npm-use-addlocal

Conversation

@albertvaka
Copy link
Copy Markdown
Contributor

@albertvaka albertvaka commented Mar 4, 2021

What does this PR do?

  • Use MSI's standard ADDLOCAL to install optional components instead of the custom NPM=true.
  • Allow creating the system-probe.yaml file on Windows as well.
  • Allow setting the network_config.enabled option in system-probe.yaml.

Motivation

Follow up to #683

The separate $windows_npm_install option is still needed since the class that installs the Agent and the class that configure the system-probe are separate.

ADDLOCAL works even if the Agent is already installed, while NPM=true only works for new installs. I haven't tested if Puppet will actually call the MSI again even if the same version is already installed, so this might have no effect, but we want to deprecated NPM=true anyway.

@albertvaka albertvaka requested a review from a team as a code owner March 4, 2021 12:14
is_expected.to contain_package('Datadog Agent').with(
ensure: 'installed',
install_options: ['/norestart', { 'APIKEY' => 'notakey', 'HOSTNAME' => 'notahost', 'TAGS' => '""', 'NPM' => 'true' }],
install_options: ['/norestart', { 'APIKEY' => 'notakey', 'HOSTNAME' => 'notahost', 'TAGS' => '""', 'ADDLOCAL' => 'MainApplication,NPM' }],
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll have to open up the file above, but the let statement above implies to me this is only A7.
There's no reason it won't work in A6, does there need to be another change for that?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is just the test. It only covers A7, but the code is the same for both Agents so I don't think we need to test both.

@albertvaka albertvaka changed the title NPM windows installer: Use ADDLOCAL instead of NPM=true Support for NPM on Windows Mar 11, 2021
@albertvaka albertvaka merged commit acd6ed3 into master Mar 17, 2021
@albertvaka albertvaka deleted the albertvaka/npm-use-addlocal branch March 17, 2021 11:04
cegeka-jenkins pushed a commit to cegeka/puppet-datadog_agent that referenced this pull request Feb 5, 2026
Use MSI's standard ADDLOCAL to install optional components instead of the custom NPM=true.
Allow creating the system-probe.yaml file on Windows as well.
Allow setting the network_config.enabled option in system-probe.yaml.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants