Flujo de trabajo remoto de Symfony2 + Netbeans (con git)

I'm hoping someone have encountered this problem before and will be able to help

So, the problem goes like this: There's 2 developers, each one of them needs 2 versions of a website (development + production). Due to very different operating systems, triple configuration difficulities and administration restrictions on them it's impossible to run projects locally. But there's a bunch of problems while running them remotely:

  • How to run Symfony2 CLI commands in Netbeans (since those commands need access to db)?
  • How to differentiate between production/development? I have allowed external access to db for 2 IP addresses, but theres only one parameters.ini file. And once it's used to connect to localhost (when run by http), and second it's used to connect via remote host (when CLI command is run in netbeans)

More info you may ask, so here it goes:

  • Dev #1: Kubuntu 12.04 x64 3.2.0-25-generic NB@7.1.2
  • Dev #2: Windows 7 x64 NB@7.1.2
  • Server: Ubuntu Server 12.04 x64
  • SQL: PostgreSQL
  • webserver: Apache2

Our workflow now looks (or at least should look) something like this:

  1. Dev #1 does something locally, but on run changes are being moved to the server so he can check how it went on beta1.sitename.com.
  2. Each change is commited to user branch in git when suitable.
  3. After testing changes are baing merged to master, tested, pulled to a sitename.com, and then tested again.
  4. After this the cycle repeats :)

PS. Valid answer would also be a hint how proper workflow in that kind of situation should be. I've tried already with post-* git handles, and it didn't work really well either...

preguntado el 12 de junio de 12 a las 22:06

1 Respuestas

First of all I would highly recommend trying to solve the development machine issue. There is vagabundo which can be used together with chef or puppet (or a specialiced virtual base machine) to move the development environment into a virtual machine executed on the developers pc. This would also solve many issues regarding the remote server.

If this cannot be done, here are some thoughts:

Netbeans commands won't work remotly. Have your developers ssh into the machine and execute their commands their.

I don't get your development/production environment problem. Their should a at least on virtual host with different config/cache/logs for each developer so the configs can be set correctly. The parameters.ini should not be in your git repository (You can handle this by creating a parameters.ini.dist and ignoring the parameters.ini file) so you can have different parameters. Another interesting thing (presented on the symfony live 2012 Paris) is that you can do SET_ENV SMFONY_PARÁMETRO_NAME inside your apache vhost and then use %parameter.name% inside your config files (mind the two underscorse). This could be usefull in your case.

There really is no workflow I know of which could handle multiple developers on one machine with different configs and the like. It's just a mess and you either solve your problems with complex scripts which are run everytime something happens or by finding a better solution like virtual machines or different vhosts with different directories on your servers.

Respondido el 13 de junio de 12 a las 11:06

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.