voxpupuli / puppet-nodejs

Puppet module to install nodejs and global npm packages
https://forge.puppet.com/puppet/nodejs
Apache License 2.0
113 stars 248 forks source link

Auto Re-deployment of NodeJs Local Packages #376

Closed timur-han closed 6 years ago

timur-han commented 6 years ago

Hi,

Assuming that we have used the ensure present set in the module configuration, will the puppet-nodejs module check if a new latest version has been released and re-deploy the nodejs package if that is the case? Or will it just do nothing? Is there a way to automate such deployments so that we can automate the the delivery pipeline using this?

Thanks for your support and great contribution!

juniorsysadmin commented 6 years ago

Assuming that we have used the ensure present set in the module configuration, will the puppet-nodejs module check if a new latest version has been released and re-deploy the nodejs package if that is the case? Or will it just do nothing?

It will do nothing. Also see: https://github.com/voxpupuli/puppet-nodejs#upgrades

You can try using ensure => latest which will probably get the latest of the specified major version in the repo_url_suffix

We trigger a refresh of apt metadata each time with Class['Apt::Update'] -> Package<| tag == 'nodesource_repo' |> in https://github.com/voxpupuli/puppet-nodejs/blob/master/manifests/repo/nodesource/apt.pp . With yum, I think it depends on the default configured metadata expiry, which is very short by default on most RedHat-based distributions anyway. (This module does not make use of the metadata_expire yumrepo metaparameter introduced in recent Puppet versions)

timur-han commented 6 years ago

Okay, thank you for your answer.

We trigger a refresh of apt metadata each time with Class['Apt::Update'] -> Package<| tag == 'nodesource_repo' |> in https://github.com/voxpupuli/puppet-nodejs/blob/master/manifests/repo/nodesource/apt.pp . With yum, I think it depends on the default configured metadata expiry, which is very short by default on most RedHat-based distributions anyway. (This module does not make use of the metadata_expire yumrepo metaparameter introduced in recent Puppet versions)

By the way, we will be deploying the packages on Windows. Would it make a difference regarding this? aspect?

juniorsysadmin commented 6 years ago

By the way, we will be deploying the packages on Windows. Would it make a difference regarding this? aspect?

Er, yes. On Windows this module defaults to using the chocolatey provider (https://forge.puppet.com/puppetlabs/chocolatey) which means in theory ensure => latest is all that you need to do if you already have the chocolatey module installed. Note that this module hasn't been well tested on Windows, but apparently does work.

timur-han commented 6 years ago

Thanks for the prompt answer!