I am trying to setup a simple puppet config to pull a .dmg file off an http server and install that package on to a mac laptop. I seem to have the configuration working somewhat, but the package does not get installed on the laptop. I am trying to do a simple install of Firefox and have obtained the latest .dmg file from the Firefox website. I am then placing the file on a local web server. Here is my init.pp file : define pkg_deploy($sourcedir = false) { $sourcedir_real = $sourcedir ? { false => "http://webserver.foo/packages", default => $sourcedir } package { $name: ensure => installed, provider => pkgdmg, source => "$sourcedir_real/$name" } } class mac-firefox { pkg_deploy { "Firefox3.0.6.dmg": } } I can see the laptop put out a "GET" for the file and it seems that the file is being transfered to the mac. However, that is as far as I can trace. I do not see the dmg get ''mounted'' on the laptop nor does the package get installed. Any help would be appreciated. More information gladly provided if needed. Thanks, -kurt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
engle, does it work when you avoid the define and just do a standard package install? Note that the pkgdmg provider relies upon marker files for packages in /var/db/.puppet_installed_* so if that marker already exists, it won''t reinstall it. (There''s no necessary link between the dmg name and the packages that are contained within it) That may be your problem. On Tue, Mar 3, 2009 at 3:29 PM, engle <kurt.engle@gmail.com> wrote:> > I am trying to setup a simple puppet config to pull a .dmg file off an > http server and install that package on to a mac laptop. I seem to > have the configuration working somewhat, but the package does not get > installed on the laptop. > > I am trying to do a simple install of Firefox and have obtained the > latest .dmg file from the Firefox website. I am then placing the file > on a local web server. > > Here is my init.pp file : > > define pkg_deploy($sourcedir = false) { > $sourcedir_real = $sourcedir ? { > false => "http://webserver.foo/packages", > default => $sourcedir > } > package { $name: > ensure => installed, > provider => pkgdmg, > source => "$sourcedir_real/$name" > } > } > > class mac-firefox { > pkg_deploy { "Firefox3.0.6.dmg": } > } > > I can see the laptop put out a "GET" for the file and it seems that > the file is being transfered to the mac. However, that is as far as I > can trace. I do not see the dmg get ''mounted'' on the laptop nor does > the package get installed. > > Any help would be appreciated. More information gladly provided if > needed. > > Thanks, > -kurt > > > >-- Nigel Kersten Systems Administrator Tech Lead - MacOps --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Nigel, thanks for the quick response. Avoiding the ''define'': I am not seeing a marker file being installed in /var/db. I have tried to install the package with the standard package install using puppet... no go. I get errors regarding the package path: ...Execution of ''/usr/sbin/installer -pkg http://server/packages/firefox.3.0.6-1.dmg -target /'' returned 1: installer: Error the package path specified was invalid: <path>''. The file is there and the path is correct. Using the ''define'': I have actually made a little progress on this one. I am now getting an hdutil error about no mountable filesystems in /tmp or /tmp/ Firefox3.0.6-1.dmg. I am seeing the puppet client doing a ''GET'' from the the web server but I am not seeing the file anywhere on the client system. Could this be a permissions issue on the client? Also, in all my errors, I get: ''err: //Node[default]/mac-firefox/ Pkg_deploy[Firefox3.0.6-1.dmg]/Package[Firefox3.0.6-1.dmg]/ensure: change from absent to present failed: Thanks again for your help. -kurt On Mar 3, 3:51 pm, Nigel Kersten <nig...@google.com> wrote:> engle, does it work when you avoid the define and just do a standard > package install? > > Note that the pkgdmg provider relies upon marker files for packages in > /var/db/.puppet_installed_* so if that marker already exists, it won''t > reinstall it. (There''s no necessary link between the dmg name and the > packages that are contained within it) > > That may be your problem. > > > > On Tue, Mar 3, 2009 at 3:29 PM, engle <kurt.en...@gmail.com> wrote: > > > I am trying to setup a simple puppet config to pull a .dmg file off an > > http server and install that package on to a mac laptop. I seem to > > have the configuration working somewhat, but the package does not get > > installed on the laptop. > > > I am trying to do a simple install of Firefox and have obtained the > > latest .dmg file from the Firefox website. I am then placing the file > > on a local web server. > > > Here is my init.pp file : > > > define pkg_deploy($sourcedir = false) { > > $sourcedir_real = $sourcedir ? { > > false => "http://webserver.foo/packages", > > default => $sourcedir > > } > > package { $name: > > ensure => installed, > > provider => pkgdmg, > > source => "$sourcedir_real/$name" > > } > > } > > > class mac-firefox { > > pkg_deploy { "Firefox3.0.6.dmg": } > > } > > > I can see the laptop put out a "GET" for the file and it seems that > > the file is being transfered to the mac. However, that is as far as I > > can trace. I do not see the dmg get ''mounted'' on the laptop nor does > > the package get installed. > > > Any help would be appreciated. More information gladly provided if > > needed. > > > Thanks, > > -kurt > > -- > Nigel Kersten > Systems Administrator > Tech Lead - MacOps--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Wed, Mar 4, 2009 at 8:31 AM, engle <kurt.engle@gmail.com> wrote:> > Nigel, thanks for the quick response. > > Avoiding the ''define'': > I am not seeing a marker file being installed in /var/db. I have tried > to install the package with the standard package install using > puppet... no go. I get errors regarding the package path: ...Execution > of ''/usr/sbin/installer -pkg http://server/packages/firefox.3.0.6-1.dmg > -target /'' returned 1: installer: Error the package path specified was > invalid: <path>''. > > The file is there and the path is correct.Something is wrong there. Installer is trying to install the dmg, not the package inside it. What if you manually specify the package provider to be "pkgdmg" ? Does that change behavior?> > Using the ''define'': > I have actually made a little progress on this one. I am now getting > an hdutil error about no mountable filesystems in /tmp or /tmp/ > Firefox3.0.6-1.dmg. I am seeing the puppet client doing a ''GET'' from > the the web server but I am not seeing the file anywhere on the client > system. Could this be a permissions issue on the client? > > Also, in all my errors, I get: ''err: //Node[default]/mac-firefox/ > Pkg_deploy[Firefox3.0.6-1.dmg]/Package[Firefox3.0.6-1.dmg]/ensure: > change from absent to present failed: > > Thanks again for your help. > > -kurt > > > On Mar 3, 3:51 pm, Nigel Kersten <nig...@google.com> wrote: >> engle, does it work when you avoid the define and just do a standard >> package install? >> >> Note that the pkgdmg provider relies upon marker files for packages in >> /var/db/.puppet_installed_* so if that marker already exists, it won''t >> reinstall it. (There''s no necessary link between the dmg name and the >> packages that are contained within it) >> >> That may be your problem. >> >> >> >> On Tue, Mar 3, 2009 at 3:29 PM, engle <kurt.en...@gmail.com> wrote: >> >> > I am trying to setup a simple puppet config to pull a .dmg file off an >> > http server and install that package on to a mac laptop. I seem to >> > have the configuration working somewhat, but the package does not get >> > installed on the laptop. >> >> > I am trying to do a simple install of Firefox and have obtained the >> > latest .dmg file from the Firefox website. I am then placing the file >> > on a local web server. >> >> > Here is my init.pp file : >> >> > define pkg_deploy($sourcedir = false) { >> > $sourcedir_real = $sourcedir ? { >> > false => "http://webserver.foo/packages", >> > default => $sourcedir >> > } >> > package { $name: >> > ensure => installed, >> > provider => pkgdmg, >> > source => "$sourcedir_real/$name" >> > } >> > } >> >> > class mac-firefox { >> > pkg_deploy { "Firefox3.0.6.dmg": } >> > } >> >> > I can see the laptop put out a "GET" for the file and it seems that >> > the file is being transfered to the mac. However, that is as far as I >> > can trace. I do not see the dmg get ''mounted'' on the laptop nor does >> > the package get installed. >> >> > Any help would be appreciated. More information gladly provided if >> > needed. >> >> > Thanks, >> > -kurt >> >> -- >> Nigel Kersten >> Systems Administrator >> Tech Lead - MacOps > > >-- Nigel Kersten Systems Administrator Tech Lead - MacOps --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Here is my manifest file: class mac-firefox { $firefox_pkg = "firefox3.0.6.dmg" package { $firefox_pkg: provider => pkgdmg, source => "http://nicola6.lane.edu/packages/ $firefox_pkg", ensure => installed, } } Here is the error: notice: Starting catalog run debug: Loaded state in 0.01 seconds debug: Prefetching pkgdmg resources for package debug: //Node[default]/mac-firefox/Package[firefox3.0.6.dmg]: Changing ensure debug: //Node[default]/mac-firefox/Package[firefox3.0.6.dmg]: 1 change (s) debug: Puppet::Type::Package::ProviderPkgdmg: Executing ''/usr/bin/curl -o /tmp/firefox3.0.6.dmg -C - -k -s --url http://nicola6.lane.edu/packages/firefox3.0.6.dmg'' debug: Success: curl transfered [firefox3.0.6.dmg] debug: Puppet::Type::Package::ProviderPkgdmg: Executing ''/usr/bin/ hdiutil mount -plist -nobrowse -readonly -noidme -mountrandom /tmp / tmp/firefox3.0.6.dmg'' err: //Node[default]/mac-firefox/Package[firefox3.0.6.dmg]/ensure: change from absent to present failed: Execution of ''/usr/bin/hdiutil mount -plist -nobrowse -readonly -noidme -mountrandom /tmp /tmp/ firefox3.0.6.dmg'' returned 1: hdiutil: mount failed - not recognized debug: Finishing transaction 9556694 with 1 changes debug: Storing state debug: Stored state in 0.12 seconds notice: Finished catalog run in 1.14 seconds The weird thing is that if I use the pkg_deploy define the manifest seems to run without errors, but the package does not get installed. define pkg_deploy($sourcedir = false) { $sourcedir_real = $sourcedir ? { false => "http://nicola6.lane.edu/packages", default => $sourcedir } package { $name: ensure => installed, provider => pkgdmg, source => "$sourcedir_real/$name" } } class mac-firefox { pkg_deploy { "Firefox3.0.6.dmg": } } Output: notice: Starting catalog run debug: Loaded state in 0.03 seconds debug: Prefetching pkgdmg resources for package debug: //Node[default]/mac-firefox/Pkg_deploy[Firefox3.0.6.dmg]/Package [Firefox3.0.6.dmg]: Changing ensure debug: //Node[default]/mac-firefox/Pkg_deploy[Firefox3.0.6.dmg]/Package [Firefox3.0.6.dmg]: 1 change(s) debug: Puppet::Type::Package::ProviderPkgdmg: Executing ''/usr/bin/curl -o /tmp/Firefox3.0.6.dmg -C - -k -s --url http://nicola6.lane.edu/packages/Firefox3.0.6.dmg'' debug: Success: curl transfered [Firefox3.0.6.dmg] debug: Puppet::Type::Package::ProviderPkgdmg: Executing ''/usr/bin/ hdiutil mount -plist -nobrowse -readonly -noidme -mountrandom /tmp / tmp/Firefox3.0.6.dmg'' debug: Puppet::Type::Package::ProviderPkgdmg: Executing ''/usr/bin/ hdiutil eject /tmp/dmg.R54j5J'' notice: //Node[default]/mac-firefox/Pkg_deploy[Firefox3.0.6.dmg]/ Package[Firefox3.0.6.dmg]/ensure: created I can look in the /tmp dir and see the dmg file come down, I can see the dmg.R54j5J file get created and then go away on the eject command. It seems that I am damn close. Is it a problem with the dmg file? At this point, I am using the dmg file off the Firefox web site. Thanks for your help, it is very much appreciated. -kurt On Mar 4, 8:36 am, Nigel Kersten <nig...@google.com> wrote:> On Wed, Mar 4, 2009 at 8:31 AM, engle <kurt.en...@gmail.com> wrote: > > > Nigel, thanks for the quick response. > > > Avoiding the ''define'': > > I am not seeing a marker file being installed in /var/db. I have tried > > to install the package with the standard package install using > > puppet... no go. I get errors regarding the package path: ...Execution > > of ''/usr/sbin/installer -pkghttp://server/packages/firefox.3.0.6-1.dmg > > -target /'' returned 1: installer: Error the package path specified was > > invalid: <path>''. > > > The file is there and the path is correct. > > Something is wrong there. Installer is trying to install the dmg, not > the package inside it. > > What if you manually specify the package provider to be "pkgdmg" ? > Does that change behavior? > > > > > > > Using the ''define'': > > I have actually made a little progress on this one. I am now getting > > an hdutil error about no mountable filesystems in /tmp or /tmp/ > > Firefox3.0.6-1.dmg. I am seeing the puppet client doing a ''GET'' from > > the the web server but I am not seeing the file anywhere on the client > > system. Could this be a permissions issue on the client? > > > Also, in all my errors, I get: ''err: //Node[default]/mac-firefox/ > > Pkg_deploy[Firefox3.0.6-1.dmg]/Package[Firefox3.0.6-1.dmg]/ensure: > > change from absent to present failed: > > > Thanks again for your help. > > > -kurt > > > On Mar 3, 3:51 pm, Nigel Kersten <nig...@google.com> wrote: > >> engle, does it work when you avoid the define and just do a standard > >> package install? > > >> Note that the pkgdmg provider relies upon marker files for packages in > >> /var/db/.puppet_installed_* so if that marker already exists, it won''t > >> reinstall it. (There''s no necessary link between the dmg name and the > >> packages that are contained within it) > > >> That may be your problem. > > >> On Tue, Mar 3, 2009 at 3:29 PM, engle <kurt.en...@gmail.com> wrote: > > >> > I am trying to setup a simple puppet config to pull a .dmg file off an > >> > http server and install that package on to a mac laptop. I seem to > >> > have the configuration working somewhat, but the package does not get > >> > installed on the laptop. > > >> > I am trying to do a simple install of Firefox and have obtained the > >> > latest .dmg file from the Firefox website. I am then placing the file > >> > on a local web server. > > >> > Here is my init.pp file : > > >> > define pkg_deploy($sourcedir = false) { > >> > $sourcedir_real = $sourcedir ? { > >> > false => "http://webserver.foo/packages", > >> > default => $sourcedir > >> > } > >> > package { $name: > >> > ensure => installed, > >> > provider => pkgdmg, > >> > source => "$sourcedir_real/$name" > >> > } > >> > } > > >> > class mac-firefox { > >> > pkg_deploy { "Firefox3.0.6.dmg": } > >> > } > > >> > I can see the laptop put out a "GET" for the file and it seems that > >> > the file is being transfered to the mac. However, that is as far as I > >> > can trace. I do not see the dmg get ''mounted'' on the laptop nor does > >> > the package get installed. > > >> > Any help would be appreciated. More information gladly provided if > >> > needed. > > >> > Thanks, > >> > -kurt > > >> -- > >> Nigel Kersten > >> Systems Administrator > >> Tech Lead - MacOps > > -- > Nigel Kersten > Systems Administrator > Tech Lead - MacOps--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Wed, Mar 4, 2009 at 9:34 AM, engle <kurt.engle@gmail.com> wrote:> It seems that I am damn close. Is it a problem with the dmg file? At > this point, I am using the dmg file off the Firefox web site.ahah. That''s your problem. The dmg from the Firefox site contains an app, not a pkg, so it can''t be installed... I haven''t used it much, but I believe there is an appdmg provider as well ? That might be more appropriate? I tend to believe in using pkgs for deployment with puppet, and haven''t experimented with the appdmg provider. -- Nigel Kersten Systems Administrator Tech Lead - MacOps --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
Nigel, that did the trick. I changed my provider to appdmg and the dmg from Firefox installed properly. I will have to look into what we are using to build these packages. I am somewhat new to Mac''s and the concept of packages, hence, the source of my confusion. What is the recommended process of creating a package for use with puppet? Thanks again for all your help, -kurt On Mar 4, 9:37 am, Nigel Kersten <nig...@google.com> wrote:> On Wed, Mar 4, 2009 at 9:34 AM, engle <kurt.en...@gmail.com> wrote: > > It seems that I am damn close. Is it a problem with the dmg file? At > > this point, I am using the dmg file off the Firefox web site. > > ahah. That''s your problem. > > The dmg from the Firefox site contains an app, not a pkg, so it can''t > be installed... > > I haven''t used it much, but I believe there is an appdmg provider as > well ? That might be more appropriate? > > I tend to believe in using pkgs for deployment with puppet, and > haven''t experimented with the appdmg provider. > > -- > Nigel Kersten > Systems Administrator > Tech Lead - MacOps--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
On Wed, Mar 4, 2009 at 9:50 AM, engle <kurt.engle@gmail.com> wrote:> > Nigel, that did the trick. I changed my provider to appdmg and the dmg > from Firefox installed properly. > > I will have to look into what we are using to build these packages. I > am somewhat new to Mac''s and the concept of packages, hence, the > source of my confusion. > > What is the recommended process of creating a package for use with > puppet?Apple''s tool is PackageMaker which you get with the free developer tools. A third party tool that is somewhat more reliable is Iceberg. http://s.sudre.free.fr/Software/Iceberg.html We actually have a Makefile based system here that we''re looking at possibly open sourcing in the next few months. -- Nigel Kersten Systems Administrator Tech Lead - MacOps --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---