On Tue, Jun 12, 2012 at 7:50 AM, Mark Baxter <mark.bax...@visma.com> wrote: > HI. > > Firstly, I'm bound to be doing something utterly basically wrong here, so if > I am I apologise. > > Right now I have a fairly simple setup where the JAR files for a > Weblogic-based application server are stored in the file server on my Puppet > Master. I run scripts on the client that downloads the files from the file > server, puts them in the right place etc etc. All very simple. I am now > trying to automate the other side, getting the files into the file server. > I've looked all over the place online and I just can't seem to find any > answers.
Yeah, unfortunately your situation isn't unique. > Basically, the JAR files are in a zip file on another server. Right now I > have to manually download it and place the files in the right place on the > file server. Instead I'd like Puppet to do this for me. There's two ways to do this. One deploy in two stages: 1. Write a manifests so the puppet master fetch new jar files to the modules directory and extract it. staging::deploy { 'dukesbank.zip': source => 'http://buildserver/jar/dukesbank1.0.zip', target => '/etc/puppet/modules/dukesbank/files/', } 2. Trigger a puppet agent run on the client to fetch new files from puppet master (i.e. mco). > The awkward bit is that due to annoying internal office politics this not > only has to be done by a script being run (puppetd -onetime) but it should > be run on the client (due to access control for who may have to run the > scripts) and not on the Puppet Master. So is there any way to, from a > client, trigger the Puppet Master to download a file to update the files on > the file server? I realise that what could be done is that the client > downloads the zip locally, instead of from the file server, but ideally I'd > like to download only once due to the possibility of changes being made to > the zip file between downloads. The second method is you ask development to version the file. You can use something like puppet-staging to bring files from your build server directly to the puppet agent: staging::file { 'dukesbank.jar': source => 'http://buildserver/jar/dukesbank1.0.jar', } I was experimenting with hiera lookup with these modules and haven't had time to get them in a publishable state. There's a bit of dependencies, but you can take a look and get some ideas: https://github.com/nanliu/puppet-staging https://github.com/nanliu/puppet-jboss/blob/master/manifests/deploy.pp https://github.com/nanliu/puppet-dukesbank/blob/master/manifests/jboss.pp Since puppet 3.0 will support hiera lookup, I'm planning to remove heira functions from the staging module and move the repo to puppetlabs after it gets some review. Thanks, Nan -- 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.