0

这与 subversion 被用作版本控制的场景有关,puppet 不仅用于管理诸如 tomcat、Jboss 等包,还用于管理基于 perl 的应用程序及其 CPAN 模块以及基于 JBoss 的 Web 服务等应用程序,等以及Mysql和数据。

这是开发人员虚拟机的建议工作流程:

Every Virtual Machine ( VMware based)  has : /extra/puppet_dev/modules (maintained under svn)

The complete application runs with the following puppet apply :

sudo puppet apply --modulepath=/extra/puppet_dev/modules/ -e "include company::local"

That will apply the puppet module company, manifests local.pp:

vim /extra/puppet_dev/modules/company/manifests/local.pp, which basically is just calling the company module:

include standards, company

The structure of the whole company application is in its init file:

vim /extra/puppet_dev/modules/company/manifests/init.pp:


class company($instance_name='developer',$cpan_mirror='dite_cpan01'){
 include params, install
 if ( $kernelpageloc =="true" ){  include patches, config, catalyst, catalyst_patch
 }
 include company::index
 include company::jboss

 include webapp_structure, svn_instances, jdk, maven

 class {"apache" : mods => ["rewrite","fastcgi","ssl","jk","ldap","authnz_ldap"], site => "company-ssl-jk",}

 Class['webapp_structure'] -> Class['svn_instances'] -> Class['apache'] -> Class['jdk'] -> Class['company::index'] -> Class['company::jboss'] -> Class['maven']
}


From there we only work on the svn_instances module for svn:

/extra/puppet_dev/modules/svn_instances/manifests/init.pp :

class svn_instances ($instance_name='developer', $instance_level='dev', $build='RC3-1'){

After making your changes just run puppet apply again:


sudo puppet apply --modulepath=/extra/puppet_dev/modules/ -e "include company::local"

Test it and if if you want to apply to all developers virtual machines, just commit changes, you can test general configurations by running:

sudo puppet agent --test

我正在寻找的是一种定义 puppet 和 svn 边界的方法,以及它们如何协同工作,或者我们应该为 puppet 使用类似 subversion 模块的东西,并使用 puppet 来驱动 subversion 命令。请记住,Jenkins 也被用于监控 svn 提交,并将启动构建和测试。

4

0 回答 0