Web Application Deployment
I'm not sure how many people here deploy reasonably large applications regularly. But how do you deploy your applications at scale?
How we do it
Our process is relatively simple considering the size of the application -
We have utilized a GlusterFS shared NFS drive so that all machines have a consistent state. Permissions restrict writing on the web nodes for security.
We have a structure similar to the following when mounted:
When exececuted deploy.sh makes a full copy of the dev folder to N+1 revision, clears the oldest revision if needed, and then sets the production symlink.
The web server polls the production symlink for changes, and when detected updates its internal webroot path to the appropriate revision dir (saves on a symlink lookup on every file load). Caches are emptied and warmed up at this time. We do something similar on the job queue workers too.
The problem with the method
We want to make it possible to do a full system deployment, in a testing environment at any time (think for automated testing and the like). There are few problems here -
- dev does not align with any version control commits/branches
- revisions don't align with version control commits/branches either. Makes it hard to align with CI.
So while this process has served us well for 4 years. We are looking to improve or replace it.
How do you do application deployment? or, how would you modify the process to meet these new requirements.
The Advantages of this method we would like to preserve
Quick progression between staging (dev) and production. Bugs found can be fixed quickly.
Deployment process is easy & quick leading to regular deployments.
Simple to maintain, deploy.sh is only a handful of lines long.