puppet "package" resource type for multi-file installer

26 views
Skip to first unread message

Ty Young

unread,
Apr 18, 2018, 10:55:40 PM4/18/18
to Puppet Users
I'm still ramping up on Puppet 5.4.0, but I'm stuck on something.

I have a customer needing to automate installation of a software package on Windows nodes. The installer is most easily transported as a .zip file, but (obviously) would need to be unzipped before running the enclosed .bat file to perform the installation. 

Any suggestions?  

Thanks

Christopher Wood

unread,
Apr 19, 2018, 7:57:09 AM4/19/18
to puppet...@googlegroups.com
Sounds like this thing would be useful?

https://forge.puppet.com/puppet/archive
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [1]puppet-users...@googlegroups.com.
> To view this discussion on the web visit
> [2]https://groups.google.com/d/msgid/puppet-users/f8366287-59aa-46db-b20b-8e180b3b24a8%40googlegroups.com.
> For more options, visit [3]https://groups.google.com/d/optout.
>
> References
>
> Visible links
> 1. mailto:puppet-users...@googlegroups.com
> 2. https://groups.google.com/d/msgid/puppet-users/f8366287-59aa-46db-b20b-8e180b3b24a8%40googlegroups.com?utm_medium=email&utm_source=footer
> 3. https://groups.google.com/d/optout

Thomas Müller

unread,
Apr 19, 2018, 7:59:39 AM4/19/18
to Puppet Users


Am Donnerstag, 19. April 2018 04:55:40 UTC+2 schrieb Ty Young:
I'm still ramping up on Puppet 5.4.0, but I'm stuck on something.

I have a customer needing to automate installation of a software package on Windows nodes. The installer is most easily transported as a .zip file, but (obviously) would need to be unzipped before running the enclosed .bat file to perform the installation. 


puppet-archive (https://forge.puppet.com/puppet/archive) could help you solve the transfering/un-zip-ing part.

If you are adventurous you might start to use chocolatey: https://github.com/chocolatey/choco/wiki/CreatePackages  and https://forge.puppet.com/chocolatey/chocolatey - which really helps do streamline the installation part.

- Thomas

Ty Young

unread,
Apr 20, 2018, 9:59:32 AM4/20/18
to Puppet Users
puppet/archive sounds cool, potentially.  Thanks for the recommendations, guys.    Just to be sure I've communicated clearly:
  • my Puppet master (5.4) is RHEL7 and contains a Windows installer .zip file in /somedir
  • one or more nodes onto which I want to push my installer .zip file are Windows servers
  • after I push the .zip file up, I want Puppet to unzip it into a temp location (i.e. C:\temp\) then install it

I'm not 100% sure on the usage for puppet/archive in this use case.


Thanks

ty

John Gelnaw

unread,
Apr 23, 2018, 2:20:52 PM4/23/18
to Puppet Users

refreshonly and notify are your friends.

file { 'zipfile':
  notify
Exec['unzip'],
  source
=> 'file:///downloads/someZipFile.zip'
}

exec { 'unzip zipfile -d /some/file':
 
alias => 'unzip',
  refreshonly
=> true,
  notify
=> Exec['installer']
}

exec { '/some/file/setup.exe /a':
 
alias => 'installer',
  refreshonly
=> true
}

Nice thing about this setup is if you change the local zip file, it'll redownload, extract and run setup again, making a nice upgrade / reinstall process.

Reply all
Reply to author
Forward
0 new messages