How can I use subversion to deploy web applications?

We are a small team of 4 developers working on a web application. We use trac + svn on a shared server for version control and ticket sales, and we are happy and satisfied with this. The same shared server also contains our web application. The application itself is a Perl CGI application that uses the CGI :: Application and a moderate number of standard (CPAN) and custom Perl modules that are installed in the usual (/ usr / lib / perl ...) and in a few unusual places (/ Home / user / Library / Perl ..). Although general information may not be relevant, the most important point is that the location / location of the libraries on our development machines is different from the location on the server ( ). We must live with it as a given. However, the library layout is identical to all development machines.

Here is a typical but clearly non-optimal work cycle that my colleagues follow:

  • Code and test on development machines.
  • Checkout / Commit / Update our code on SVN
  • Periodically " svn export" to the appropriate DocumentRoot server
  • Manual processing of the exported tree to install the library includes matching the library layout on the server
  • Check the application on a real server, raise tickets for each other
  • Go to 1

It is clear that there must be a better way and would like to hear from others who could handle this better than we do. For example, is there a way to svn exportautomate the installation of libraries? Or is there some completely different way to deal with this situation than we have done so far.

Thank you for your attention.

+5
6

, , . :

$> checkout from source or copy from working
$> run sed/perl -pi/copy to convert configs to the production values 
     (ie cp production.config myconfig)
$> upload to web server (rsync/ssh/ftp/etc)
$> ssh $SERVER migrate_db, set permissions, run unit tests, etc

ssh, , . dev ( script dev production

- .

+4

(, config.pl), . svn: ignore , . script , .

+3

, ? , ? svn.

, , . - , svn, script. , , . , , Apache, .

, , , . , script . , , script, , .

: svn checkout , svn. ( script), , apache - - .svn. , , svn rollback , .

+2

Linux, cron, . sed/awk , svn cron. script, , .

+1

Subversion , . , , 'svn merge' svnmerge.py .

.

DocumentRoot /usr/lib/perl, /home/user/lib/perl - Subversion, .

svn, , "cd/usr/lib/perl; svn up '.

, , .svn DocumentRoot, :

# Prevent any access to .svn directories.
<DirectoryMatch "^/.*/\.svn/">
    Options None
    AllowOverride None
    Order allow,deny
    Deny from all
</DirectoryMatch>

, DocumentRoot, , , "svn up -r PREV".

+1

Codesion . , / ftp, scp, rsync . , .

Codesion Publisher:

https://help.codesion.com/View.jsp?procId=01fabe5e83381dda4edda959b97b2c5b

+1
source

All Articles