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:

  1. make building of identical boxes in remote , local environments easy possible, , try make sure provisioning emphasizes idempotence.
  2. consider versioning/release structure; resources or never change? include in setup function instead of deploy function, , don't include them in sync run.
  3. 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.
  4. check out config management tools chef , puppet; if don't end using them, they'll give idea of how sysadmin professionals approach problem.

Comments

Popular posts from this blog

ios - iPhone/iPad different view orientations in different views , and apple approval process -

java Extracting Zip file -

C# WinForm - loading screen -