Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Install updated version of script such that running instances cannot use an inconsistent state

by Corion (Pope)
on Jan 28, 2013 at 21:03 UTC ( #1015760=note: print w/replies, xml ) Need Help??


in reply to Install updated version of script such that running instances cannot use an inconsistent state

My approach is to have the following directory layout:

/corion/App-0.01/ /corion/App-0.02/ /corion/App-0.03/ /corion/App/ -> /corion/App-0.03 # a symlink

Then, when I'm staging App v0.04, I will copy all the files from 0.03 (plus the changes that make 0.04 0.04), stop the server for App v0.03, copy its database (most often, SQLite) to 0.04, and then move the symlink to point to 0.04 and start the (0.04) server again.

That way, I can easily fall back to using 0.03, should my testing have gone wrong or the database migration have gone wrong in some way. I also have now written me a shell script that shows me a diff between the new version directory and the current symlink before it copies the database, so I can do a final review of what changes go live.

  • Comment on Re: Install updated version of script such that running instances cannot use an inconsistent state
  • Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1015760]
help
Chatterbox?
[stevieb]: I test/prototype code on my Pi, then I migrate it over to Arduino when it's ready (if that's a better platform for what I'm doing). The whole RPi stuff was for learning at first, then it snowballed. I'm just trying to get my in-house CI...
[stevieb]: ...done, which obviously requires a specific hardware setup.
[stevieb]: I don't write tests for the lower-level distributions (ie. ICs, sensors etc) within those distributions, I have all tests in a master distribution which encompasess all of the sub-modules
[choroba]: so you do kind of "integration testing" only

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (5)
As of 2017-06-25 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How many monitors do you use while coding?















    Results (572 votes). Check out past polls.