Deploying to multiple servers

2019-02-06 20:12发布

I have to deploy my php/html/css/etc code to multiple servers and i am looking at my options for software that allows easy and secure deployment to multiple servers.

Also helps if it could be tied into my SVN.

Any suggestions?

11条回答
我欲成王,谁敢阻挡
2楼-- · 2019-02-06 20:20

I concur -- set your svn tree up, and use rsync over ssh to copy the tree out to the remote locations. rsync will make it fast and efficient, only copying changes rather than full files.

You want to export your svn tree to some directory, then rsync from there to the remote host's directory tree.

查看更多
再贱就再见
3楼-- · 2019-02-06 20:21

I'll second Capistrano. It's incredibly powerful and flexible. Our current project uses Capistrano for deploying to different servers as well as multiple servers. We pass two arguments to the cap command: 1) the name of the set of machine specific config options to run and 2) the name of the action to run

ends up looking like this:

cap -f deploy.rb live deploy

or

cap -f deploy.rb dev deploy

Of course the default use case - deploy to lots of machines at once - is a doddle with Capistrano AND you don't need to have Capistrano on the machines you are deploying to. All in all, tasty technology.

查看更多
再贱就再见
4楼-- · 2019-02-06 20:21

You can also use kwateeSDCM which is free and allows remote installation via ssh. It also enables you to manage server-specific configuration from a central location and make upgrades seemless.

查看更多
混吃等死
5楼-- · 2019-02-06 20:28

If you're running on Redhat or Debian, consider packaging up your code into RPM's or Debs. Then build a yum or dpkg repository and put your packages there. You can then use your system's package management to do upgrades/rollbacks, etc. You can even use puppet to automate the process.

If you want to tie it into subversion, you can create a branch for each new version. Use the commit scripts to build the RPM's when a new branch shows up in a directory.

查看更多
我想做一个坏孩纸
6楼-- · 2019-02-06 20:29

Capistrano setup is just too complicated. We found that KwateeSDCM was very straightforward to use with a simple web interface and no scripting. We've got our deployment configuration done in no time for Dev and QA configuration on windows and linux servers.

查看更多
祖国的老花朵
7楼-- · 2019-02-06 20:32

I found capistrano to be very easy to use once it's setup. The configuration file can be a bit confusing at first for more complicated environments but it soon becomes worthwhile. I deploy to 14 servers on production. I also use multiple environments for deployment to a staging server. One quirk, there's a bug in Ruby that breaks parallel deployment but serially isn't too bad with svn exports.

查看更多
登录 后发表回答