Digital Ocean Reserved IP

AI-generated summary

Octoberon is planning to use a Digital Ocean reserved (floating) IP to swap their production and staging Discourse servers once AWS S3 and CloudFront CDN are configured. The goal is to improve resilience and enable seamless future swaps. Their plan includes: (1) creating a reserved IP on the current production server, (2) updating DNS to point to that IP, (3) taking the production server offline, backing it up, and restoring it to the staging server, (4) rebaking posts and syncing assets to S3, and (5) switching the reserved IP to the updated staging server to make it the new production server. They’re seeking validation that they haven’t missed any steps or overlooked simpler alternatives — especially appreciating that the reserved IP allows rollback to the original server if issues arise during the transition.

I have a production server and a staging server (droplets) with Digital Ocean. I want to switch them around using a reserved (floating) IP address (once I’ve got AWS S3 and CloudFront CDN working) so the staging server will become production and vice versa. This will also allow me to switch over easily in future for better resilience.

I think I understand how this all works but I want to sanity check I’ve got it right. This is the basic plan:

  1. Create a reserved IP on the production server.
  2. Change the production domain’s DNS record to point to the reserved IP. Allow time for the DNS change to propogate.
  3. When the DNS changes are complete, take the production server offline, back it up and restore to the staging server so it’s a replica of the production site.
  4. Rebake the restored posts on the staging server and generally do what’s necessary to get everything available in the S3 bucket (instructions elsewhere, I know).
  5. Switch the reserved IP to the fully restored, S3 and CDN enabled staging server to make it the production server and start Discourse.

Have I missed anything? Are there easier methods to achieve any of these steps?

Having the reserved IP in place and working means that if anything goes wrong with the rebake etc, I can switch back to the original production server while I sort out the problem.