[Gllug] Practical release and deployment - how?

Chris Jones cmsj at tenshu.net
Wed Nov 7 17:04:46 UTC 2007


Hi

Ziya Suzen wrote:
> What do you use (as tools or practices) for releasing and deploying
> your code (internal to the company)?

bzr and lots of workflows built around its fantastic flexibility :)

> servers. However this is proving to be a little burden since I can't
> really track my changes during development since I can't commit
> anything until it's ready to be deployed. I should probably use

This is one of the major advantages of distributed revision control
(bzr, git, mercurial, etc) because you can branch so easily and commit
changes to that branch and then push your changes to a centralised
branch for deployment only when you are ready. You never lose history.

By way of an example:

cmsj at mylaptop: bzr branch sftp://codeserver/srv/code/website1 website1
(this makes a local branch of the website1 code tree)

cmsj at mylaptop: cd website1 ; vi index.php
(you're now in the local branch, making your change)

cmsj at mylaptop:~/website1: bzr commit -m "Improved index frobnication"
(your change is now committed to your local branch and you presumably
make a lot more changes)

cmsj at mylaptop:~/website1: bzr push sftp://testserver/var/www/website1
(your cumulative changes are now pushed to a bzr branch on a test web
server for QA validation)

(I assume here that you don't need to make further changes)

cmsj at mylaptop:~/website1: bzr push sftp://codeserver/code/website1
(you've now pushed your changes to the proper codeserver)

cmsj at server:/var/www/website1: bzr pull sftp://codeserver/code/website1
(you've now pulled the latest changes from the code server to the live
web server and, modulo any DB changes, your revisions are all live)

(I've shortcutted this a little, and there are slightly better methods
to use than sftp:// in modern versions of bzr, but there are plenty of
docs on bazaar-vcs.org and it's fantastic for this kind of development
where you don't necessarily always want to push every individual change
to a central server)

> svn/branches is almost impossible since designers will require
> click-the-button-tools to be able to work with such a system. What are
> your thoughts about managing these in web installations?

Designers shouldn't really be deploying things directly, so they should
be pushing to a branch somewhere that someone else either packages or
pushes to the appropriate machines.

Cheers,
-- 
Chris Jones
  cmsj at tenshu.net
   www.tenshu.net
-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list