Should I be using vagrant destroy/up/reload/provision or something of the sort every time I want to change one of my source files?
I think you have some misunderstanding and the correct answer (from the outside view) depends on your exact setup.
- The process of destroying a box (VM) is triggered through
vagrant destroy
. This throws all data away. In your case, you shut the VM down (usingvagrant down
). - As you tagged this post with chef, it seems that your server is provisioned through Chef and also the whole stack to run Django on it, isn't it?
- If your chef recipes are written correctly (or: with the intention to update your application), running a provisioning will update your code in the VM. In older Vagrant versions (IIRC <1.3), provisioning is done at
vagrant reload
. In newer versions, you would have to add the--provision
option, however this isn't even needed. To trigger a chef run, just callvagrant provision
. This just kicks off chef without reloading the whole box (which is, if your chef recipes are correct, not needed at all). - The frequently used phrase "if your chef recipes are correct" means that the recipes should, of course, do what is needed to not only bring the code changes into the box, but also to do the necessary things to make them active (flushing caches, restarting services, etc.). But that depends a lot.. I would say on Django. If such things are missing, the
down
/up
might have helped you just because it e.g. stopped and started Apache (after the reboot). - You would just have to make sure that the same thing that you now run by hand via SSH is also triggered by the Chef recipe.
I'm not sure, where the run
command is coming from. I couldn't find anything related to Django.
Without further code it's thus hard to give you detailed hints.
But provisioning your code into the VM and reloading things is kind of exactly a use case for Vagrant.