I am interested in finding out how folks are deploying their CakePHP applications. I have recently been approached about doing some freelance CakePHP development, which would be a nice opportunity for me to get some experience in the presentation tier (in my FT job I do Java EE development in the business and persistence tiers).
My thoughts are a bit disorganized at this point, but I'm considering the following scenarios:
Developer working in an IDE modifies a file, which is automatically (in the background) synchronized with a development web server running locally. This scenario is how I would ideally like to do development... make a change and be able to see the change in action without any extra steps.
Developer working in an IDE modifies a file, which is automatically (in the background) synchronized via FTP with a development web server running remotely. This scenario would be useful when I'm traveling using my netbook (which runs my IDE slowly enough as it is without a web server in the mix).
- Administrator deploys the latest version of a CakePHP application from a source code repository to a web server running locally.
- Administrator deploys the latest version of a CakePHP application from a source code repository to a web server via FTP.
- Administrator deploys an older version of a CakePHP application from a source code repository to a web server running locally.
- Administrator deploys an older version of a CakePHP application from a source code repository to a web server via FTP.
The development tools that I'm most comfortable with are Eclipse, Ant, and Subversion. My preference is to continue using those, but I would consider switching if doing so makes it easy to achieve the scenarios.
Questions:
- Are these reasonable scenarios, or should do I need to think about development and deployment in a different way?
- What tools exist that can help simplify development/deployment? Would it be better for me to roll my own solution with Ant, scripts, etc?
- How do we handle database issues during deployment? How are database connection properties specified for a particular deployment? What if updating to a newer version (or reverting back to an older version) of the CakePHP application requires a change to the database schema and data migration?
- How do we configure properties that vary between deployments? For example consider increased debug and logging levels used during development, preventing payments from being sent to payment gateways during development, etc.
- How does upgrading or reverting a deployment affect customers? For example what if they are in the middle of a transaction (e.g. purchasing a product)?
- How do we handle different CakePHP installation types? Files may need to be installed in different locations depending on the installation type. How can we know where files should be installed? The CakePHP book describes development, production, and advanced installations.
Sorry for so many questions in one post, but I think the questions are all related and thought it would be useful to keep the discussion in one place.