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?

4

2 回答 2

0

为 Puppet 提供安装程序的一般解决方案是设置您自己的软件包存储库(而不仅仅是一个文件存储库)。

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

然后,您可以使用 Puppet 的内置包资源来轻松安装/升级/卸载

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

以下项目似乎提供了 JBoss 的 rpm/deb 版本,您可以将其发布到您的存储库

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

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

于 2012-12-21T04:43:20.523 回答
0

我不确定你的确切问题,但你可以看看这个并得到一个想法......

在大多数情况下,文件从 puppetmaster 传输到客户端。如果您在模块中定义了解压缩和安装软件包的策略,例如模块名称 jboss,您可以将 tarball 保留在 puppet master 中的此类结构中,并从 puppet 客户端运行 puppet 代理:

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

然后,您的客户政策应在以下内容中说明如下内容: 例如,

/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
  }
于 2012-12-20T23:36:18.563 回答