Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am a little new to cloud hosting. For the smallish projects I have done so far, I am used to having one sandbox/testing server and one production server, and that's it. Now I'm developing something that will likely come under a lot more strain, and I'd like to give Amazon's Elastic Beanstalk a try.

I have so far been developing a PHP application on an Ubuntu machine. Amazon's Elastic Beanstalk's AMIs, however, are all "Amazon Linux." Can I continue to develop on my Ubuntu machine, or should I switch to Amazon Linux for my testing environment as well?

share|improve this question

closed as not constructive by mgorven, Ward, Khaled, mdpc, petrus Mar 3 '13 at 20:25

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

You want your test environment to mirror as closely as possible the production environment, so there aren't surprises when your code runs on a different infrastructure. – ceejayoz Feb 25 '13 at 23:11
up vote 2 down vote accepted

You're asking two different questions.

Does my dev server need to be exactly like my production server?

You can do your development on whatever you want, and then deploy that code to whatever production environment you'd like.

Should my dev server be exactly like my production server?

Yes. - It makes life much easer.

If your development and production environments are different you will eventually have the "It works on my machine" developer moment, where some developer (maybe even you) writes (and hopefully extensively tests) some code on the development machine, then deploys it into production and it breaks horribly (missing/mismatched library versions, a different interpreter, package differences between the two systems, binaries not where the app expects them to be, etc.).

This means you'll spend hours (maybe days) re-writing parts of your code to deal with the fact that production isn't like the machine you developed on. Then one day you'll be in a release crunch and hacks start slipping in - if (is_production) { A } else { B } - and someone later will see that and think it's acceptable.

Your code quickly spirals into an unmaintainable mess, and your only option is Seppuku.

Bottom line?

Spare yourself the pain, suffering, and ritual disemboweling and try to develop and test on the same platform you're eventually going to deploy to.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.