php - How to organize a web app deployment onto multiple servers at once? -
so - let's develop php app develop in vagrant box identical production envrionment. - end result have *.tar.zip file code...
how 1 organize deployment production environment there lot of application servers? mean - i'm confused how push code production synchronously @ once?
more information:
on server code stored this:
project +current_revision ->link revisions/v[n] +revisions +v1 +v2 +v3 ... +data so when have deploy changes run deploy script uploads updated tar onto server ssh, untars specific dir under revisions, symlinks current_revision , restart php-fpm.... way can rollback anytime symlinking older revision.
with multipe servers bothers me not boxes updated @ once, ie. technically glitches might possible.
if you're looking "ready-to-go" answer, you'll need provide more info setup. example, if plan use git vcs, write simple shell script pulls latest commit , rsyncs server(s). or if you're building on top of symfony, capifony great tool. if using aws, there's provider plugin written author of vagrant that's super easy use, , can specify regex machines bring up or provision.
if instead you're looking more of "roadmap", considerations you'll want take are:
- make building of identical boxes in remote , local environments easy possible, , try make sure provisioning emphasizes idempotence.
- consider versioning/release structure; resources or never change? include in
setupfunction instead ofdeployfunction, , don't include them in sync run. - separate development , system administration concerns; i.e. not package vagrant box *.tar.gz , tie through
config.vm.box_url. reason you'd have repackage every production server new box every time deploy, instead of changing files on server, or adding/removing packages server. - check out config management tools chef , puppet; if don't end using them, they'll give idea of how sysadmin professionals approach problem.
Comments
Post a Comment