database - Synchronizing multiple servers and local machines with the same data / source code -


background:

building web app team of 2 developers. restful backend via flask. using linux, apache, redis, , postgres.

  • 3 servers:
    • 1 production
    • 1 development
    • 1 uat
  • 4 databases:
    • 1 prod/uat server
    • 1 dev server
    • 1 developer on local machine
    • 1 developer b on local machine
  • 2 local machines / developers

in addition 4 databases, developers each have 1 additional database serves testing. testing database needs exact same @ times between 2 developers.

developer b has own fork of data, sending pull requests master repo, worked on developer a.

problem:

we have no real protocols transfer data between each of databases. example, developers test databases different, causes chaos. moving data dev uat/prod done manually.

developers work in different environments , on different forks. use pull requests in github transfer code developer a's main repo.

question

what recommend solution our database woes? there better way share data? there better way developer , developer b share environment , source code?

i have been working on problem environment of similar size year. technology different, in short:

  • 2-3 developers
  • each developer has complete environment
  • integration, uat , production server pairs (all vms).
  • linux, mongodb, django , angular

code after few false starts have settled on feature branch approach , working proposition. see http://nvie.com/posts/a-successful-git-branching-model/. @ moment have master production , development branch. 1 person works on 'feature' (or pair). features should short-lived. might flip between multiple features when necessary. can merge 1 feature when need to. comes out quite cleanly when merge development. overhead minimal , step on each other's toes. when diff makes clear need fix manually. git ui tool helps.

database use shared database development. don't. every developer has independent environment. may need collections, uat or prod rather each other. have created comprehensive admin page. on environment can export collection set. there mechanisms send export needed. used take prod data , place in uat problem replication. can drop integration , dev repair. devs can share data using same application admin page.

release going chain dev -> integration -> uat -> prod handled application admin page. system can export, next stage. not automatically imported. import not automagic. admin on target environment told release available. can import admin page. same code , database collections.

it useful have integrated rather knowing script run. separate application if worked batter in environment.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -