News for hackers. Stuff that matters.
Re:Production is Red, Development is Blue by Loic on Monday January 10, 2011 @02:19PM (#2089411)
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
Re:Production is Red, Development is Blue by abstractbill on Monday January 10, 2011 @02:28PM (#2089430)
Never 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.

Re:Production is Red, Development is Blue by ynniv on Monday January 10, 2011 @04:03PM (#2089733)
I 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.
Re:Production is Red, Development is Blue by pak on Monday January 10, 2011 @04:34PM (#2089831)
Or for those less python-happy: just use 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.

Re:Production is Red, Development is Blue by alttab on Monday January 10, 2011 @06:42PM (#2090162)
I'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.

Re:Production is Red, Development is Blue by pak on Friday January 14, 2011 @07:00PM (#2105918)
I'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) which I have seen in action and it works but is very XML-heavy.