yarlagadda ramya
2013-Jan-30 08:24 UTC
[Puppet Users] Ordering The path to be followed in installing JBOSS-AS-7.1.1
Hi all, I actually downloaded Jboss-as-7.1.1.final.tar.gz file from net and stored it in a directory..through LINUX. Now using the local machines IP with which am working, i wrote manifest for the following things to happen: 1)Downloading the same tar file to another directory. 2)Changing its permission. 3)copying it to another directory and untarring it there. This is the manifest that i wrote: $software = "/app/tcs/puppetdemo/software" $server = "/app/tcs/puppetdemo/server" $URL = "http://192.168.24.171:8080/softwares/jboss-as-7.1.1.Final.tar.gz" exec{"/usr/bin/wget $URL": cwd =>"$software", } exec{"/bin/chmod -R 0775 /app/tcs/puppetdemo/software/": } exec {"/bin/tar -C /app/tcs/puppetdemo/server/ -zxf /app/tcs/puppetdemo/software/jboss-as-7.1.1.Final.tar.gz": } But here the untaring exec command i.e.,the 3rd exec is executing first and throwing an error..as that particular tar file is not there for untaring and then the first exec that is downloading the tar file is happening. I want all the steps to happen in an order i.e., Downloading>>Changing permission>>copying>>untarring. Can any body please help me with this. -- 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Matthew Burgess
2013-Jan-30 10:43 UTC
Re: [Puppet Users] Ordering The path to be followed in installing JBOSS-AS-7.1.1
On Wed, Jan 30, 2013 at 8:24 AM, yarlagadda ramya <rams.15891@gmail.com> wrote:> $software = "/app/tcs/puppetdemo/software" > $server = "/app/tcs/puppetdemo/server" > $URL = "http://192.168.24.171:8080/softwares/jboss-as-7.1.1.Final.tar.gz" > > exec{"/usr/bin/wget $URL": > cwd =>"$software", > } > > exec{"/bin/chmod -R 0775 /app/tcs/puppetdemo/software/": > } > > exec {"/bin/tar -C /app/tcs/puppetdemo/server/ -zxf > /app/tcs/puppetdemo/software/jboss-as-7.1.1.Final.tar.gz": > } > > But here the untaring exec command i.e.,the 3rd exec is executing first and > throwing an error..as that particular tar file is not there for untaring and > then the first exec that is downloading the tar file is happening. I want > all the steps to happen in an order i.e., Downloading>>Changing > permission>>copying>>untarring. > > Can any body please help me with this.It looks like you are under the impression that your manifest will be executed in the order that you write it. However, that is not the case. Puppet will apply the classes/resources in any order it wants to, unless explicitly told that there is a relationship between them. I can highly recommend the PuppetLabs documentation, in particular the ''Learning Puppet'' guide, which is a nice walkthrough for new users (http://docs.puppetlabs.com/learning/). In particular, ''Ordering'' at http://docs.puppetlabs.com/learning/ordering.html. In the short term though, this should fix your current manifests: $software = "/app/tcs/puppetdemo/software" $server = "/app/tcs/puppetdemo/server" $URL = "http://192.168.24.171:8080/softwares/jboss-as-7.1.1.Final.tar.gz" exec{"/usr/bin/wget $URL": cwd =>"$software", } exec{"/bin/chmod -R 0775 /app/tcs/puppetdemo/software/": require => Exec["/usr/bin/wget $URL"] } exec {"/bin/tar -C /app/tcs/puppetdemo/server/ -zxf /app/tcs/puppetdemo/software/jboss-as-7.1.1.Final.tar.gz": require => Exec["/bin/chmod -R 0775 /app/tcs/puppetdemo/software/" } There are potentially better ways of getting the jboss tarball into your target directory with the correct permissions, meaning that those exec''s aren''t required in the first place. See the documentation on the File resource at http://docs.puppetlabs.com/references/3.0.latest/type.html#file. Regards, Matt. -- 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Louis Coilliot
2013-Jan-30 11:01 UTC
Re: [Puppet Users] Ordering The path to be followed in installing JBOSS-AS-7.1.1
Hello, I''ve made a simple puppet module for installing JBoss as 7 (domain or standalone), using a rpm for jboss. https://github.com/lofic/puppet-lofic/tree/master/modules/jboss7 http://www.kermit.fr/repo/rpm/el6/x86_64/jboss/ Maybe that could help. I don''t know on which OS you need to install Jboss. Louis Coilliot 2013/1/30 Matthew Burgess <matthew.2.burgess@gmail.com>:> On Wed, Jan 30, 2013 at 8:24 AM, yarlagadda ramya <rams.15891@gmail.com> wrote: > >> $software = "/app/tcs/puppetdemo/software" >> $server = "/app/tcs/puppetdemo/server" >> $URL = "http://192.168.24.171:8080/softwares/jboss-as-7.1.1.Final.tar.gz" >> >> exec{"/usr/bin/wget $URL": >> cwd =>"$software", >> } >> >> exec{"/bin/chmod -R 0775 /app/tcs/puppetdemo/software/": >> } >> >> exec {"/bin/tar -C /app/tcs/puppetdemo/server/ -zxf >> /app/tcs/puppetdemo/software/jboss-as-7.1.1.Final.tar.gz": >> } >> >> But here the untaring exec command i.e.,the 3rd exec is executing first and >> throwing an error..as that particular tar file is not there for untaring and >> then the first exec that is downloading the tar file is happening. I want >> all the steps to happen in an order i.e., Downloading>>Changing >> permission>>copying>>untarring. >> >> Can any body please help me with this. > > It looks like you are under the impression that your manifest will be > executed in the order that you write it. > > However, that is not the case. Puppet will apply the > classes/resources in any order it wants to, unless explicitly told > that there is a relationship between them. > > I can highly recommend the PuppetLabs documentation, in particular the > ''Learning Puppet'' guide, which is a nice walkthrough for new users > (http://docs.puppetlabs.com/learning/). In particular, ''Ordering'' at > http://docs.puppetlabs.com/learning/ordering.html. > > In the short term though, this should fix your current manifests: > > $software = "/app/tcs/puppetdemo/software" > $server = "/app/tcs/puppetdemo/server" > $URL = "http://192.168.24.171:8080/softwares/jboss-as-7.1.1.Final.tar.gz" > > exec{"/usr/bin/wget $URL": > cwd =>"$software", > } > > exec{"/bin/chmod -R 0775 /app/tcs/puppetdemo/software/": > require => Exec["/usr/bin/wget $URL"] > } > > exec {"/bin/tar -C /app/tcs/puppetdemo/server/ -zxf > /app/tcs/puppetdemo/software/jboss-as-7.1.1.Final.tar.gz": > require => Exec["/bin/chmod -R 0775 /app/tcs/puppetdemo/software/" > } > > There are potentially better ways of getting the jboss tarball into > your target directory with the correct permissions, meaning that those > exec''s aren''t required in the first place. See the documentation on > the File resource at > http://docs.puppetlabs.com/references/3.0.latest/type.html#file. > > Regards, > > Matt. > > -- > 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 puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > >-- 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 puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.