Hello all! I’m new to Meteor and this community but I’ve heard great things so I’m hoping somebody can help me with a predicament I’m facing at work.
My work is using a Meteor based web app to manage a lot of day-to-day tasks.
It was developed when Meteor was at version 1.1 and hasn’t been touched much since.
I have been tasked with upgrading to Meteor 1.5 and adding some new features. I’m the sole developer on the system.
I have upgraded and added the features, and everything is working correctly on my development machine.
I’ve been told I need to create a deployment and rollback plan in case the new system doesn’t work as expected.
My question really is this:
Once I copy the new code-base to the production server and start using it, how can I roll-back to the current running code-base?
Will I be able to simply switch back and run the old code base or are there some global Meteor files that will be upgraded to 1.5 rendering the current 1.1 code-base unusable?
Many Thanks,
Matt
Depending on how your app was previously deployed (MUP, presumably?), you probably won’t be able to deploy using the same flow, as previous versions of MUP aren’t compatible with new versions of Meteor.
Regardless of your situation, I’d strongly suggest spinning up a new server and testing deployment there before you even think about touching your production server.
Thanks for the reply!
The app is actually just running in development mode (command line: meteor run --port)
(I don’t have any control over this - I understand this is not how it should be done)
Security is not an issue as it’s only accessible internally.
In this case, do you think it is possible to run the new code in a different directory and just switch back to running the old code if something goes wrong?
Yikes. I’m assuming there is a forever script (or something similar) behind that, making sure that it starts up again on reboot, etc.
In that case, then yes, you could basically just git clone your new project into a new folder. Where is your mongoDB? If you are running in development, then I’m guessing it’s possible that your mongoDB instance is the one that meteor spins up in dev. If that’s the case, then you’d need to dump that db and restore it into your new project once that mongo instance is ready.
Given your scenario, yes, you should be able to switch back to the old version simply by stopping the new app and restarting the old one.
This is all assuming you have a basic nginx setup that simply routes incoming port 80 requests to the port where Meteor is running (presumably 3000).
OK Perfect, thanks for your help!