I've just taken over a few PHP app which had no deployment process at all (and no SCM), so my first step (towards capistrano) has been an rsync solution. However, not the sort of solution your client has.

My release process is designed to eventually be taken over by capistrano, so I have the same structure as it uses with the following in /srv/ao:

current -> releases/2010-01-06
releases
shared

My release process (which is manual right now) is this:

ssh to apa...@hostname
cd ~/src/ao
git pull origin tag _tagname_
cd /srv/ao
cp -al current/ releases/_tagname_
rsync -ruv ~/src/ao/www/ releases/_tagname_
mysql --options dbname < ~/src/ao/sql/up.sql
ln -snf current releases/_tagname_

No need to have any exclusions because I don't do the rsync with the -- delete (yet) - and I don't have any of the user-generated content in git.

I moved to this in about half an hour from having a Plesk setup with a single /var/www/vhosts/_hostname_/httpdocs directory. Just created the new structure, copied the content, updated the DocumentRoot, and restarted httpd.

The next step, btw, is what I'm doing now which is pulling all the user-generated content out into the shared directory and having it symlinked to from within the releases directory so I can use --delete in my rsync.

HTH.

On Jan 15, 2010, at 9:38 AM, Matt Aimonetti wrote:

Wow, I agree with both Nick and Patrick... something much be wrong with me ;)

I agree with Patrick that in general you should stick to standard tools like cap (or vlad). However cap isn't always very efficient and it might not be able to do something very specific you have to do. If that's the case, using a simpler solution like a custom git based solution can be very cool.

However in this very specific case you probably won't the only one having to deal with deployment, in the future, another contractor might have to work on the code. If I were you, I'd be kind and not use some home made deployment solution that only you understand, unless you want to force the client to depend on you ;)

- Matt



On Fri, Jan 15, 2010 at 8:06 AM, Patrick Crowley <[email protected]> wrote: > Anyone do the syncing thing rather than Capistrano? Do you do anything, maybe with Git, to be ready to roll back and sync the last known working version of the code?

Unless there is specific technical reason to not use Capistrano (which I doubt), I'd strongly recommend your client switch over to Cap. (Vlad is a good option too.)

The roll-your-own-deploy-script-with-rsync-and-ruby approach seems ripe for failure.

-- Patrick

--
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

--
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

-- 
SD Ruby mailing list
[email protected]
http://groups.google.com/group/sdruby

Reply via email to