3 ms·
You should never ssh into a production system, everything should be going through automated scripts. Doing this will really save your life. For me this means:
by Loic 16y ago
You should never ssh into a production system, everything should be going through automated scripts. Doing this will really save your life. For me this means:
$ fab deploy
... oups errors on the website even if tested on stagging ...
$ fab getdebuglog
$ fab rollback
... fix test ...
$ fab deploy
fab is fabric, a very very nice deployment tool in Python: http://www.fabfile.org http://www.fabfile.org
- abstractbill 16y agoNever say never. I've done development on production machines, sometimes even when logged in as root ;) But I agree with the sentiment - think very hard before doing this, and don't make it a habit.
- ynniv 16y agoI make a lot of mistakes, but at least when I do them by hand I know who to blame. Saying that people "should never" log into a production system is a tad dogmatic.
- pak 16y agoOr for those less python-happy: just use expect http://en.wikipedia.org/wiki/Expect http://en.wikipedia.org/wiki/Expect Slightly weird syntax, but learnable in a few hours. You are likely to already have it on your machines.
- alttab 16y agoI've built *Nix testing frameworks using Expect. Would one use Expect/Fabric/etc. to manage deployments and development environments? Having the ability to immediately stage an environment to reproduce an error without configuration issues would really take a lot of treachery out of trying to evolve larger systems.
- pak 16y agoI've seen it used to manage deployments, and it's not perfect, but it's a lot better than expecting a whole team of engineers to muck about on the production servers and remember to get everything just right. In fact, an expect script [can be] nicely self-documenting, because somebody can look at it and see "oh these are the steps to deploy X" because the scripts basically read as "at the foo prompt, enter bar" over and over again, with some branching to handle varying responses (missing prereq, error messages). The "ultimate" in building environments would probably have to be something more comprehensive and declarative like bcfg (http://trac.mcs.anl.gov/projects/bcfg2 http://trac.mcs.anl.gov/projects/bcfg2) which I have seen in action and it works but is very XML-heavy.