0

Lets take the example, I am having a jboss-4.2.3 installers as a .tar file. In general to install jboss, i ll 1. untar the jboss-4.2.3 into a prefefined folder (opt/server/jbossas/) into multiple servers 2. untar the openjdk into a preferined path (/opt/software/java)set the path in the bash.profile 3. Create server profile in the place where jboss is installed 4. Start the server.

Lets say that I have to do this in 16 nodes (servers). Now, I should store the jboss and openjdk installers at a central location and it should be transferred to the nodes before the 1st step can begin.

I wrote the manifest to perform the requirements form 1 to 4. But not sure how can I automate the transfer of the installers from a central repo. I am not worried about the type of central repo. It can be a ftp or puppet or anything else.

Please help me. I was going through filebucket. Will this help or should i write a manifest to get this file from a ftp server?

How to create a file repo which can be referred in puppet manifests?

  • currenetly, I am using exec in manifest to scp the file from the pupper master into a directory before executing the other tasks. But looking for a better way to do this. – Sivaraman Viswanathan Dec 20 '12 at 09:31

2 Answers2

0

I am not sure about your exact problem, but you can have a look at this and get an idea...

In most of the usage the files are transferred from the puppetmaster to the clients. If you have your policies defined in a module to untar and install the packages, e.g. module name jboss, you can keep the tarball in these kind of structure in the puppet master and run puppet agent from puppet client :

/etc/puppet/module/jboss/files/jboss_pkg.tar

Your policy for your clients should then say something like the following in the : In e.g,

/etc/puppet/modules/jboss/manifests/init.pp
class jboss {
    file { '/tmp/installation/jboss_pkg.tar' :
            source => "puppet:///modules/jboss/jboss_pkg.tar",
         }

    #You can then right a small script that will execute all the installation process. You can use 'exec' in puppet to do that.

    exec { 'install_jboss' :
           command => "/path/to/install_jboss.sh",
           require => File["/tmp/installation/jboss_pkg.tar"],
           onlyif => "/check/that/it/is/not/installed/already",
         }
     ## and write other execs to start the server or enable services etc...
 }

  # In site.pp
  node 'client.mytest.org' {
       include jboss
  }
iamauser
  • 11,119
  • 5
  • 34
  • 52
0

The general solution to provide installers to Puppet is to set up your own package repository (rather than just a file repo).

http://www.techrepublic.com/blog/opensource/create-your-own-yum-repository/609

Then, you can use Puppet's built in package resource for easy install/upgrade/uninstall

http://docs.puppetlabs.com/references/latest/type.html#package

The following projects seem to provide a rpm/deb version of JBoss that you can publish to your repository

https://github.com/floreal/jboss-deb-package

http://code.google.com/p/jboss-rpm/

ottodidakt
  • 3,631
  • 4
  • 28
  • 34