Deploy MSI package from Sonatype Nexus using chef


I want to install the msi package from sonatype Nexus using Chef. Here what I need to achieve is , If the new version of msi is arrived in nexus repository chef should take the latest and deploy it automatically.

Can you tell me how can I do it.

Thanks, Ram


You want to use the windows_package and if you want to automatically want to install the latest version, make sure not to specify a version or a checksum:

windows_package 'my_software' do
  source 'http://my/nexus/repo/package.msi'

Note that this is not idempotent and that file will be downloaded on every chef run. It also assumes that every new version of the MSI will have the exact same url.


For the record this is a cross post from StackOverflow:

@ramaduraiu Please don’t immediately cross-post questions as it means you’ll use up 2x the time from our volunteers to answer you.


@coderanger Sure . But I couldn’t get the correct answer from that post That was why I put it.


Thank you @Matt_Wrock


For working with Nexus I can really recommend the artifact cookbook [1]. It should work like this:

nexus_configuration_object ="http://nexus-url", "snapshots", "username", "password")

artifact_package "tomcat" do
  location "com.rpm:tomcat:msi:1.2.3"
  nexus_configuration nexus_configuration_object
  action :install