php - Local/Dev/Live deployment - best workflow -
situation
we our little company 3 people, each has localhost webserver , projects (previous , current) on 1 pc network shared disk. have virtual server, of our clients' sites , our site.
our standard workflow is:
coder pc → programmer localhost → dev domain (client.company.com) ↓ live version (client.com)
it happens, there 2 or 3 guys working on same projects @ same time - 1 on dev version, 2 on localhost.
when finished, try synchronize files on dev version , ideally not mess (thanks ilmv:]
) files, **knock knock* * doesn't happen often.
and 1 of deploys dev version on live webserver.
question
we looking way simplify workflow while updating websites - ideally sort of diff uploader or vcs (git/svn/vcs/...), not sure begin or way ideal, therefore ask you, fellow stackoverflowers experience website / application deployment , recommended workflow.
we need use mac in process, if won't problem, better.
thank you
edit: 1 of crucial parts moving website dev live after working update. edit: check maxvt's answer if no other appear :)
it involved question, there 3 major improvements need make improve processes.
use version control
if projects on shared disk, assume there's folder current state of each project. easy developers overwrite each other's changes, there's no history, , can't sure if project in consistent state or broken.
choose version system , start using it. it's less important 1 (of free ones - svn ok , more "centralized", git or mercurial great , allow greater flexibility), it's more important change, no matter how small, goes through version control.
simplify promotion, deployment , rollback
there sequence of steps needed move localhost dev, , dev production - synchronize files, restore database known state, configure server-specific settings... there may document describing needs done, or tribal knowledge. goal should begin simplifying , automating that, achieving single command or script work needed synchronize server (local, dev or production) revision of project in source control.
by automating deployment, can sure necessary actions done in proper order, , not have mistakes in deployment can happen when files correct configuration or command not run, breaking site.
introduce testing
how know revision you've deployed not compiles properly, works expected? each non-trivial project, should have tests verify important functionality (login, adding stuff, producing reports, etc.) make sure changes made developers left site operating properly.
there testing frameworks testing web apps (selenium comes mind). study them , apply them. ideally testing suite run part of one-liner deployment script.
once have done those, you've come long way having orderly, predictable, , resilient development process. clients , developers thank :)
Comments
Post a Comment