Closed knolleary closed 3 years ago
The migration is making good progress. To summarise where things are now:
Remaining actions:
refresh-downloads
task to a GH Action or Lambda. This needs some more thought. It current takes 20 mins to refresh the whole set of downloads. That will get expensive on Lambda and will eat the free allowance on GH Actions. Need to make it more efficient somehow.
A copy of the flow library app is now running on DigitalOcean.
I will be updating the DNS to move over today. That should be a transparent DNS switch as the 'old' version and the 'new' version are identical and stateless.
I plan to do the database migration starting 9am on Friday 13th. Not sure how long it will take - the migration of the test database didn't take too long, but is much smaller than the production one.
The server that hosts flows.nodered.org goes away in early December. I had planned to migrate to a new system next year, but I was notified last week the current server goes away in 6 weeks and we have to find a new home. This has come as a bit of a surprise given I had just renewed for another 2 years - but that's another story.
Whilst we're at it, the mlab mongodb instance we are using also needs to be migrated in the same timeframe to their new cloud.mongodb.com offering.
Migration of Mongodb
This is actually fairly straightforward. mlab have provided detailed steps and a migration tool to get things moved over. I have already done it with the development database and tested against it - looks good.
Actions:
Removing local filesystem dependency
This is more complex due to some of the design choices made in the early days of the flow library. Specifically, it copies gists and nodes to the local file system so their content can be served up easily.
The need to have persistent local file storage limits the choices for a quick and easy migration to another hosting provided. So before we migrate, we need to break this dependency on the file system.
The follow steps need to happen:
Flows - currently stores README and flow.json on disk so they can be served up and rendered by the web app. We already store node's README in the mongodb, so it wouldn't be a big change to do the same for flows.
Nodes - currently we unpack the tar file locally so we can examine the module's node types and serve up any custom node icons. We also use the presence of the tar file to know if we've already examined a given version.
Tasks - there are a number of tasks that get run via cron to keep the flow library up to date. They will need reworking to run as standalone serverless functions. Currently plan is to deploy them to AWS Lambda.
There are a bunch of other tasks that exist, but some are fairly redundant now.
Migration of server
Once all of the above tasks have been completed, the flow library will consist of:
And all of that before December 6th.