SVN网站开发部署解决方案

SVN Website Development and Deployment Solution(SVN网站开发部署解决方案)
本文介绍了SVN网站开发部署解决方案的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

情况是这样的:我们有多个具有不同程度命令行经验的开发人员,我们正在为我们的网站整合部署解决方案.生产环境是2台SUSE Linux box.开发环境也是 SUSE Linux box.每个开发人员在他们的主目录中都有/将有一个 SVN 树的副本,用于开发和测试.

Here is the situation: we have multiple developers with varying degrees of commandline experience and we are putting together a deployment solution for our websites. The production environment is 2 SUSE Linux boxes. The development environment is a SUSE Linux box as well. Each developer has/will have a copy of the SVN tree in their home directory for development and testing.

目标是拥有一个易于使用且易于恢复的发布系统,可与多个生产服务器配合使用.如果非网络开发人员(仍然是不在网络世界中的编码员)也可以轻松恢复任何网站,那将是一个奖励.在理想情况下,发布就像在要发布的网站上运行单个命令一样简单.此命令将更新生产服务器并在其唤醒后留下恢复路径.

The goal is to have a release system that is easy to use and easy to revert that will work with multiple production servers. It would be a bonus if a non-web developer (still a coder just not in the web world) could easily revert any of the websites as well. In an optimal world, release would be as simple as running a single command on the website that you want to release. This command would update the production servers and leave a revert path in it's wake.

我们目前的部署解决方案有点笨拙,很难恢复,而且慢得像泥巴.我们目前使用 SVN 检入所有文件.然后运行一个脚本,该脚本基本上在 SVN 中创建一个标签.然后运行第二个脚本,该脚本进入 2 个生产服务器中的每一个,并运行svn up".

Our current deployment solution is a bit clunky, quite difficult to revert and slow as dirt. We currently check in all files using SVN. Then a script is run that essentially creates a tag in SVN. A second script is then run that goes onto each of the 2 production servers and runs an 'svn up'.

有什么建议吗?

推荐答案

Capistrano 是一个很好的解决方案.尽管最初是为 Ruby on Rails 平台开发的,但我已经在许多 PHP 项目中成功地使用了它.它自动执行通过 SSH 执行的操作.部署是原子的,因为每个部署都被检出到一个新目录.

Capistrano is a great solution. Although originally developed for the Ruby on Rails platform, I've used it successfully on a number of PHP projects. It automates actions performed via SSH. Deployments are atomic because each deployment is checked out to a new directory.

当前副本是通过使用符号链接打开的.最新版本的源代码来自 Subversion.您还可以设置静态配置文件以在生产环境中使用.

The current copy is switched on by use of a symbolic link. The latest version of the source is pulled from Subversion. You can also set up static configuration files to use in the production environment.

Capistrano 还支持回滚,但如果您在部署之间进行数据库更改,则必须小心.考虑使用类似 dbdeploy 或 rails migrations 来解决这个问题.

Capistrano also supports rollbacks, although you have to be careful here if you are making database changes between deployments. Consider using something like dbdeploy or rails migrations to solve this problem.

这篇关于SVN网站开发部署解决方案的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

相关文档推荐

DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)