On Jul 6, 2012, at 3:26 PM, Mike Reed wrote: > Hey Guys, > > Thank you Peter and John for your continued input into this one. I > absolutely agree with both of you about building our own packages and as I've > been working with puppet and trying to configure these systems, it's become > apparent that our own internal repository would be beneficial for a number of > reasons. > > With that said, I'm quite new to the 'nix world and I suspect building out > packages/repository would take a little time and probably a few days of > googl'in. So for the very immediate future, I'd like to get this working so > I can get our initial puppet build going. packages/repository are definitely > on my list tho.
I get need to prioritize your to-do list, but do it sooner rather than later. :) > I'd like to quickly mention that the impetus behind this is that I'd like to > run this against machines that we've built up without puppet and if possible, > I'd like to refrain from things like the below manifest being run on a > machine which already has boost installed, albeit manually without puppet. > > I changed the class to the following: > > class boost_install { > # This will place the gzip locally in /tmp. File is pulled from > puppet. > file { "/tmp/boost_1_41_0.tar.bz2" : > source => "puppet:///boost_install/boost_1_41_0.tar.bz2" , > ensure => present , > } > > # This will extract the boost gzip to the /tmp directory. > exec { "untar_boost" : > command => "tar -xjvf /tmp/boost_1_41_0.tar.bz2" , > cwd => "/tmp/" , > creates => "/tmp/boost_1_41_0" , > path => ["/bin" , "/usr/sbin"] , > require => File["/tmp/boost_1_41_0.tar.bz2"] , > } > > # This will run the boost bootstrapper > exec { "/tmp/boost_1_41_0/bootstrap.sh" : > subscribe => Exec["untar_boost"] , > } > } > > From the above code, I expect a few things to happen: > 1. The exec "untar_boost" should only fire if "/tmp/boost_1_41_0.tar.bz2" is > present Correct, and because of your 'creates' parameter, it won't run again on consecutive runs. > 2. The exec "/tmp/boost_1_41_0/bootstrap.sh" should only fire if the untar > boost occurs, which I believe is dependent upon the file being in that > location. Correct. > (I'm thinking this will work as a temporary dependency as I'm not sure how to > make a dependency for the initial file being pulled down. In other words, I > expect the file to be pulled down on every run which I guess is something > I'll have to fix later). I'm thinking if I change from /tmp to something > like /usr/src/puppet_pkgs then the files won't be deleted upon reboot and I > can use them as a temporary placeholder until I figure out a more elegant > solution to this hack that I've put together. The file won't be pulled down on every run unless is gets removed from /tmp. Because you can't count on files sticking around in /tmp, I don't like to use it as a destination for any of my file resources. Your /usr/src/puppet_pkgs idea is a good one -- at least until you start packaging your software deployments. I recommend putting "start using fpm" on your to-do list, as well: https://github.com/jordansissel/fpm/ -- It's a huge time-saver and makes package creation dead-simple. -- Peter Bukowinski -- 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+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.