I would like to get a general consensus for the minimal/boilerplate professional PHP team development environment. I can not find this information anywhere on the web. In the open-source world there are so many choices and so many ways to do things but I've yet to find any common best-practice for the infrastructure/plumbing side of things.
我想就最小/样板专业PHP团队开发环境达成一致意见。我无法在网络上找到这些信息。在开源世界中有很多选择和很多方法可以做,但我还没有找到任何基础设施/管道方面的常见最佳实践。
Consider a small shop with a team of 5-10 developers/designers, doing LAMP CRUD apps. They need to manage development, staging and production builds. They want quality software and they can't be stepping on each others toes trying to get things done. Deployment needs to be easy and fast. Sometimes there will be hotfixes. Rolling back production server to a previous version needs to be just as fast.
考虑一个由5-10名开发人员/设计人员组成的小型商店,负责制作LAMP CRUD应用程序。他们需要管理开发,登台和生产构建。他们需要高质量的软件,他们不能踩着彼此的脚趾试图完成任务。部署需要简单快捷。有时候会有修补程序。将生产服务器回滚到以前的版本需要同样快。
Things to consider are:
需要考虑的事项是:
-
Source code management (SVN, git, Hg)
源代码管理(SVN,git,Hg)
-
Database schema/data continuous integration, tied to Source-code revision. This is one I'm particularly interested in.
数据库架构/数据持续集成,与源代码修订相关联。这是我特别感兴趣的一个。
-
Individual development environments (e.g. each developer has a VMware instance of the development environment to tinker with (DB server, web server, code, data, etc))
个人开发环境(例如,每个开发人员都有一个开发环境的VMware实例来修补(DB服务器,Web服务器,代码,数据等))
-
Managing central development, staging and production builds
管理*开发,升级和生产构建
-
Production deployment (e.g. tar balls, .rpm/.deb)
生产部署(例如tar球,.rpm / .deb)
-
Automated testing (e.g. SVN commit hooks, nightly cron tests for slower tests)
自动测试(例如SVN提交挂钩,夜间cron测试,用于较慢的测试)
-
Team communication (bug tracking, internal documentation, irc/im, etc)
团队沟通(错误跟踪,内部文档,irc / im等)
I've left this open to edit by the community so feel free to edit/add. Ideally someone can visit this page and a few hours later have the foundations in place for their team to start developing.
我已将此版本保留为社区编辑,因此您可以*编辑/添加。理想情况下,有人可以访问此页面,几个小时后就可以为他们的团队开始开发奠定基础。
2 个解决方案
#1
1
I'll start. feel free to edit and improve this
我会开始的。随时编辑和改进这一点
This is for a ficticious product called: dundermifflin.com
这是一个名为dundermifflin.com的虚构产品
-
Setup a development virtual machine running the same software you plan on using in production: e.g. Ubuntu with PostgreSQL, Apache and PHP5.
设置运行您计划在生产中使用的相同软件的开发虚拟机:例如Ubuntu与PostgreSQL,Apache和PHP5。
-
Each developer runs their own copy of this VM with the hostname set to their username, (e.g. phpguy.dundermifflin.com)
每个开发人员都运行自己的VM副本,主机名设置为用户名(例如phpguy.dundermifflin.com)
-
Setup a central staging server (same as the development VM). This is staging.dundermifflin.com.
设置*登台服务器(与开发VM相同)。这是staging.dundermifflin.com。
-
Setup a central Subversion server with a new repository for dundermifflin.com. This is devel.dundermifflin.com.
使用dundermifflin.com的新存储库设置*Subversion服务器。这是devel.dundermifflin.com。
- 4a. Add post-commit hook to run tests for "trunk" commits
- 4b. Add post-commit hook to package/deploy to staging server for commits tagged "staging"
- 4c. Add post-commit hook to package/deploy to production server for commits tagged "release"
4A。添加post-commit hook以运行“trunk”提交的测试
4B。将post-commit钩子添加到包/部署到登台服务器以进行标记为“staging”的提交
4C。将post-commit hook添加到打包/部署到生产服务器以进行标记为“release”的提交
This method does not address database continuous integration which means rolling back SVN to a previous revision will break the build unless your database is very static. Suggestions?
此方法不涉及数据库持续集成,这意味着将SVN回滚到先前的版本将破坏构建,除非您的数据库非常静态。建议?
-
Use Bugzilla on the central Subversion server (devel.dundermifflin.com) for bug tracking.
在*Subversion服务器(devel.dundermifflin.com)上使用Bugzilla进行错误跟踪。
-
Write a shell script to run PHPUnit/SimpleTest tests (to be called by item 4a).
编写一个shell脚本来运行PHPUnit / SimpleTest测试(由项目4a调用)。
#2
0
For continuous integration, linked with your version control system, and automated unit testing I find this article very interesting:
对于持续集成,与您的版本控制系统和自动化单元测试相关联,我发现这篇文章非常有趣:
Continuous builds with CruiseControl, Ant and PHPUnit
使用CruiseControl,Ant和PHPUnit进行持续构建
#1
1
I'll start. feel free to edit and improve this
我会开始的。随时编辑和改进这一点
This is for a ficticious product called: dundermifflin.com
这是一个名为dundermifflin.com的虚构产品
-
Setup a development virtual machine running the same software you plan on using in production: e.g. Ubuntu with PostgreSQL, Apache and PHP5.
设置运行您计划在生产中使用的相同软件的开发虚拟机:例如Ubuntu与PostgreSQL,Apache和PHP5。
-
Each developer runs their own copy of this VM with the hostname set to their username, (e.g. phpguy.dundermifflin.com)
每个开发人员都运行自己的VM副本,主机名设置为用户名(例如phpguy.dundermifflin.com)
-
Setup a central staging server (same as the development VM). This is staging.dundermifflin.com.
设置*登台服务器(与开发VM相同)。这是staging.dundermifflin.com。
-
Setup a central Subversion server with a new repository for dundermifflin.com. This is devel.dundermifflin.com.
使用dundermifflin.com的新存储库设置*Subversion服务器。这是devel.dundermifflin.com。
- 4a. Add post-commit hook to run tests for "trunk" commits
- 4b. Add post-commit hook to package/deploy to staging server for commits tagged "staging"
- 4c. Add post-commit hook to package/deploy to production server for commits tagged "release"
4A。添加post-commit hook以运行“trunk”提交的测试
4B。将post-commit钩子添加到包/部署到登台服务器以进行标记为“staging”的提交
4C。将post-commit hook添加到打包/部署到生产服务器以进行标记为“release”的提交
This method does not address database continuous integration which means rolling back SVN to a previous revision will break the build unless your database is very static. Suggestions?
此方法不涉及数据库持续集成,这意味着将SVN回滚到先前的版本将破坏构建,除非您的数据库非常静态。建议?
-
Use Bugzilla on the central Subversion server (devel.dundermifflin.com) for bug tracking.
在*Subversion服务器(devel.dundermifflin.com)上使用Bugzilla进行错误跟踪。
-
Write a shell script to run PHPUnit/SimpleTest tests (to be called by item 4a).
编写一个shell脚本来运行PHPUnit / SimpleTest测试(由项目4a调用)。
#2
0
For continuous integration, linked with your version control system, and automated unit testing I find this article very interesting:
对于持续集成,与您的版本控制系统和自动化单元测试相关联,我发现这篇文章非常有趣:
Continuous builds with CruiseControl, Ant and PHPUnit
使用CruiseControl,Ant和PHPUnit进行持续构建