Ajeet Raina
2012-Sep-03 09:29 UTC
[Puppet Users] Class for transfering files from Server to Client
I have installed JBOSS application manually following these steps: [code] 1.$ su -c "yum install java-1.6.0-openjdk-devel" 2.$ java –version 3.wget http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.zip 4.$ unzip jboss-as-7.1.1.Final.zip -d /usr/share 5.$ adduser jboss 6.$ chown -fR jboss.jboss /usr/share/jboss-as-7.1.1.Final/ 7.$ su jboss 8.$ cd /usr/share/jboss-as-7.1.1.Final/bin/ 9.$ ./add-user.sh You should see the following message on the console after executing the command: What type of user do you wish to add? a) Management User (mgmt-users.properties) b) Application User (application-users.properties) (a): a We select “a”, next you should see the following message: Enter the details of the new user to add. Realm (ManagementRealm) : Username : jboss Password : Re-enter Password : * hit enter for Realm to use default, then provide a username and password We select the default value for the Realm (ManagementRealm), by hitting enter, and select “jboss” as our username. By default, we supply “jb0ss” as our password, of course, you can provide any password you prefer here. Step 4: Start the JBoss AS 7 server: Once the appropriate JBoss users are created, we are now ready to start our new JBoss AS 7 server. With JBoss AS 7, a new standalone and domain model has been introduced. In this tutorial, we focus on starting up a standalone server. The domain server will be part of a future tutorial. Startup a JBoss 7, standalone instance: A standalone instance of JBoss 7 can be starting by executing: $ ./standalone.sh -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0& =========================================================== [/code] Now I want to execute those steps through puppet. I started writing class under init.pp to put it through simple way: Creating JBOSS User and Group [code] # Create group, user, and home folder group { jbossas: ensure => present } user { jbossas: ensure => present, managehome => true, gid => ''jbossas'', require => Group[''jbossas''], comment => ''JBoss Application Server'' } file { ''/home/jbossas'': ensure => present, owner => ''jbossas'', group => ''jbossas'', mode => 0775, require => [ Group[''jbossas''], User[''jbossas''] ] } # Download the JBoss AS distribution ~100MB file file { $dist_dir: ensure => directory, owner => ''jbossas'', group => ''jbossas'', mode => 0775, require => [ Group[''jbossas''], User[''jbossas''] ] [/code] I need help how shall I write class for: 1. Transfering jboss installatable tar to remote client machine. 2. An easier way of executing the commands in steps (rather than putting it under variables declaration at start). Ajeet -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/SURCUtyWBbcJ. 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.
Dom
2012-Sep-03 13:38 UTC
[Puppet Users] Re: Class for transfering files from Server to Client
Hi Ajeet, Instead of using puppet for these steps, I would recommend the native package management for your operating system, then use puppet to distribute and maintain versions. For instance, RPM was designed to do all the things you require, as well as dealing with changes to the application files themselves, contained in the .zip you are working with. If any incremental changes are required, such as a minor point release upgrade, it may be difficult to deal with using puppet alone. You can also create an in-house repository to distribute an RPM. -Domenick On Monday, September 3, 2012 5:29:03 AM UTC-4, Ajeet Raina wrote:> > I have installed JBOSS application manually following these steps: > > [code] > 1.$ su -c "yum install java-1.6.0-openjdk-devel" > 2.$ java –version > 3.wget > http://download.jboss.org/jbossas/7.1/jboss-as-7.1.1.Final/jboss-as-7.1.1.Final.zip > 4.$ unzip jboss-as-7.1.1.Final.zip -d /usr/share > 5.$ adduser jboss > 6.$ chown -fR jboss.jboss /usr/share/jboss-as-7.1.1.Final/ > 7.$ su jboss > 8.$ cd /usr/share/jboss-as-7.1.1.Final/bin/ > 9.$ ./add-user.sh > > You should see the following message on the console after executing the > command: > What type of user do you wish to add? > a) Management User (mgmt-users.properties) > b) Application User (application-users.properties) > (a): a > > We select “a”, next you should see the following message: > > Enter the details of the new user to add. > Realm (ManagementRealm) : > Username : jboss > Password : > Re-enter Password : > * hit enter for Realm to use default, then provide a username and password > > We select the default value for the Realm (ManagementRealm), by hitting > enter, and select “jboss” as our username. By default, we supply “jb0ss” as > our password, of course, you can provide any password you prefer here. > > Step 4: Start the JBoss AS 7 server: > > Once the appropriate JBoss users are created, we are now ready to start > our new JBoss AS 7 server. With JBoss AS 7, a new standalone and domain > model has been introduced. In this tutorial, we focus on starting up a > standalone server. The domain server will be part of a future tutorial. > > Startup a JBoss 7, standalone instance: > > A standalone instance of JBoss 7 can be starting by executing: > > $ ./standalone.sh -Djboss.bind.address=0.0.0.0 > -Djboss.bind.address.management=0.0.0.0& > > ===========================================================> > [/code] > > Now I want to execute those steps through puppet. > > I started writing class under init.pp to put it through simple way: > > Creating JBOSS User and Group > [code] > > # Create group, user, and home folder > group { jbossas: > ensure => present > } > user { jbossas: > ensure => present, > managehome => true, > gid => ''jbossas'', > require => Group[''jbossas''], > comment => ''JBoss Application Server'' > } > file { ''/home/jbossas'': > ensure => present, > owner => ''jbossas'', > group => ''jbossas'', > mode => 0775, > require => [ Group[''jbossas''], User[''jbossas''] ] > } > > # Download the JBoss AS distribution ~100MB file > file { $dist_dir: > ensure => directory, > owner => ''jbossas'', > group => ''jbossas'', > mode => 0775, > require => [ Group[''jbossas''], User[''jbossas''] ] > [/code] > > I need help how shall I write class for: > 1. Transfering jboss installatable tar to remote client machine. > 2. An easier way of executing the commands in steps (rather than putting it under variables declaration at start). > > Ajeet > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/ZbbQydi6iosJ. 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.
jcbollinger
2012-Sep-04 13:29 UTC
[Puppet Users] Re: Class for transfering files from Server to Client
On Monday, September 3, 2012 8:38:49 AM UTC-5, Dom wrote:> > Hi Ajeet, > > Instead of using puppet for these steps, I would recommend the native > package management for your operating system, then use puppet to distribute > and maintain versions. For instance, RPM was designed to do all the things > you require, as well as dealing with changes to the application files > themselves, contained in the .zip you are working with. If any incremental > changes are required, such as a minor point release upgrade, it may be > difficult to deal with using puppet alone. You can also create an in-house > repository to distribute an RPM. > > -Domenick > >>+1 *Always* use native packages for installing software if it is possible to do so, even if that requires building the packages yourself (which is not that hard for most platforms). John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To view this discussion on the web visit https://groups.google.com/d/msg/puppet-users/-/erd3LW_1nusJ. 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.
Maybe Matching Threads
- JBOSS installation and Configuration through puppet
- How to add a new line at a particular place in a file..
- Whats the best approach to create a repo of the installers to be used for installing and upgrading in the puppet managed nodes
- How manage xml elements as resources?
- Just what is puppet doing here?