我的Web服务器的版本控制 [英] Version control for my web server

查看:74
本文介绍了我的Web服务器的版本控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建基于Web2Py的Web应用程序,并且大部分开发工作都是在远程EC2开发服务器上进行的.我想对整个系统进行版本控制,包括所有python模块,网页和Apache配置文件.这些文件显然分散在我的Linux机器上,但是我希望能够使用一个命令来检出/提交.我是命令行上SVN的新手-是否可以使用带有符号链接的某种虚拟目录来执行此操作?

I'm building a Web2Py-based web application and am doing most of my development right on a remote EC2 development server. I would like to version control the entire system, including all python modules, web pages, and Apache config files. The files are obviously scattered across my Linux box, but I would like to be able to checkout/commit using a single command. I'm new to SVN on the command line- Is there a way to do this using a some sort of virtual directory with sym links?

欢迎任何想法.谢谢.

推荐答案

对于单个开发人员, Git ()更适合于方便使用.您可以非常轻松地在本地提交",并将更改推送到远程服务器(可能是您的EC2实例),它只需要SSH连接即可工作.但是我可能会选择 GitHub 这样的托管解决方案,或者其他任何具有SSH并能够安装的托管解决方案吉特我将GitHub用于公共项目 DreamHost 用于我的私人"项目.

For a single developer, Git ( book ) is better suited for convenience. You can "commit" locally very easily, and push changes to a remote server, which could be your EC2 instance, it just needs an SSH connection to work. But I would probably go with a hosted solution like GitHub or any other hosting solution that has SSH and the ability to install Git. I use GitHub for my public projects and DreamHost for my "private" projects.

您将所有文件放在一个目录结构中,然后使用某种自动化过程部署.对于Python,我建议使用类似 distutils 或什至 Chef ,如果您开始扩展到多个EC2实例,这将非常重要.即使没有多台服务器,Chef之类的东西也需要可重复的自动化部署,这才是有效的开发人员所要做的.

You would put all your files in one directory structure and then deploy them using some automated process. For Python I would suggest something Python standard like distutils or even easy_install. For more complicated environments, you want to consider something like Chef, which will be extremely important if you start scaling out to more than a single EC2 instance. Even without the multiple server needs something like Chef for repeatable automated deployments is what an efficient developer does.

请不要试图编写快速而肮脏的" shell脚本来进行部署,因为它们是脆弱的并且非常难以维护.如果您不喜欢Chef,请研究替代方法并花时间学习一种方法.花费的时间将弥补.

Just don't get tempted to write a "quick and dirty" shell script to do deployments, they are brittle and very un-maintainable. If you don't like Chef, research alternatives and take the time to learn one. The time spent will be made up for down the line.

这篇关于我的Web服务器的版本控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆