At my company we have both shared dev servers and personal local servers. The point is, you cannot have the best of both worlds, but you can have both worlds :) I'm on the side against shared dev servers but I'm going to mentions both below.
Running a local server is a real nightmare for those who are not that much into sysadmin. You did say your devs mostly use Macs and that just makes things worse. Using a virtual machine does solve the problem of the different OS, but still requires them to be able to manage a server, which is not their specialty. I have found the solution to be Vagrant. It lets me create provisioning code for a Virtualbox virtual machine, and my devs can be freed from maintenance tasks. While I have to spend days to get started and maybe hours on each new project, this has saved lots of time that I would otherwise have to help people with installing and configuring packages.
Some more advantages of Vagrant:
- The devs can use whatever tool they want, including Notepad on Windows.
- Dev environments can be destroyed and re-created at will.
- No need for a creepy shared account, which make every code commit traceable to the developer.
Using a shared server has its own disadvantages:
- It is easy for two devs to edit the same file (especially if they use different editors, because they can't detect if the file is already opened).
- Because 2 devs should not edit the same file, parallel execution of tasks is more tricky. Imagine you find yourself having to edit a file, but your friend is already doing some work on it, and he is not going to finish any time soon.
- It requires devs to be extra careful when doing a
git commit
, because you don't want to commit other people's changes.
That being said, there are cases where you do need a shared dev server. In my experience this include:
- Staging server, which is the place where the code stay before it is deployed to production server. Not all devs need access to this server.
- Developing/testing a feature that requires a callback from a third party. One example of this is payment with Paypal.
The easiest way to setup a shared dev server is to create an application user, maybe with the name of the project as the username. This user should own all the files related to the project. Then add the public keys of your devs to /home/<application>/.ssh/authorized_keys
and your devs can simply login as that user to do things. It will be helpful to have a convention when committing code using the shared account, such as to include your initials in the commit message, so that you can know which commits belong to which devs.
sudo rm -rf /
?