3

As a beginner I have come to the stage where I realize the problem with taking down my production server to make changes as often as I have, now that I have a couple of users on it.

I created an EC2 image of my live server and set up a separate instance on EC2, so now I have 2 EC2 instances, Stage and Production. I set up GitHub and push changes to stage and test my code there, and when it's all done and working, I push it to the production branch, and everything is good. And there is a slight issue here since I name my files config_stage.js and config_production.js and set up .gitignore on each server, and in my code, I would have it read the ENV flags and set up the appropriate configs, is this the correct approach?

And my main question is: how do you keep track of non-code changes to the server? For example, I installed HAProxy, Stunnel, Redis, MongoDB and several other things onto the Stage server for testing and now that it's all working and good, how do I deploy them to production? Right now, I'm just keeping track of everything I installed and copying configuration files over, which is very tedious and I'm afraid I may have missed a step somewhere.

Is there a better way to port these changes over from my test server to my live server?

4
  • 2
    short answer ?: puppet. Long answer ? puuuuuuuuuuuuuuuuppet.
    – Sirex
    Sep 19, 2012 at 3:30
  • 1
    ..or chef (if you like ruby), or even cfengine (if you don't like hair). Most people are biased on configuration management questions, but I think the agreement will be "you need configuration management"
    – Sirex
    Sep 19, 2012 at 3:32
  • Oh, so that's what "configuration management" is. Time to pick up a book.. this'll be fun. Thanks Sirex! Sep 19, 2012 at 3:41
  • 2
    generally accepted as a really good book is "pro puppet" for puppet people. Likely a good place to start, that and the tutorials online.
    – Sirex
    Sep 19, 2012 at 3:54

1 Answer 1

0

you could consider using fabric to collect, automate and document your deployment routines. it's extremely flexible, and provides a very neat solution to these problems.

Not the answer you're looking for? Browse other questions tagged .