在centos上使用subversion和puppet建议的工作流程是什么

时间:2013-05-22 02:37:01

标签: svn workflow puppet

这适用于将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

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

0 个答案:

没有答案