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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to