I have a set of binary assets (swf files) each about 150Kb in size. I am developing them locally on my home computer and I want to periodically deploy them for review. My current strategy is:
- Copy the .swf's into a transfer directory that is also a hg (mercurial) repo.
hg push
the changes to my slicehost VPNssh
onto my slicehost VPNcd
to my transfer directory andhg up
su www
andcp
the changed files into my public folder for viewing.
I would like to automate the process. Best case scenario is something close to:
- Copy the .swf's into a "quick deploy" directory
- Run a single local script to do all of the above.
I am interested in:
- advice on where to put passwords since I need to
su www
to transfer files into the public web directories. - how the division of responsibility between local machine and server is handled.
I think using rsync is a better tool than hg since I don't really need a revision history of these types of changes. I can write this as a python script, a shell script or however is considered a best practice.
Eventually I would like to build this into a system that can handle my modest deployment needs. Perhaps there is an open-source deployment system that handles this and other types of situations? I'll probably roll-my-own for this current need but long term I'd like something relatively flexible.
Note: My home development computer is OS X and the target server is some recent flavour of Ubuntu. I'd prefer a python based solution but if this is best handled from the shell I have no problems putting it together that way.