Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Upgrade Ubuntu] ca_prod #940

Open
41 of 51 tasks
Tracked by #157
dacook opened this issue Sep 23, 2024 · 5 comments
Open
41 of 51 tasks
Tracked by #157

[Upgrade Ubuntu] ca_prod #940

dacook opened this issue Sep 23, 2024 · 5 comments
Assignees

Comments

@dacook
Copy link
Member

dacook commented Sep 23, 2024

Checklist based on https://github.com/openfoodfoundation/ofn-install/wiki/Migrating-a-Production-Server

Setup

Migration

  • deploy.yml matching version
  • transfer_assets.yml
  • old server: make a tiny data change to verify later
  • old server: 🚧 maintenance_mode.yml
  • old server: stop sidekiq
  • db_transfer.yml
  • transfer_assets.yml again, because ca_prod stores images locally (s3_access_key: not set).
  • old server: stop puma, postgres (ensure other integrations no longer touch it)
  • old server: shutdown redis-jobs. copy /var/lib/redis-jobs/dump.rdb to new server
  • new server: systemctl restart puma; start sidekiq; start redis-jobs
  • Rails.cache.clear (or migrate redis-cache/dump.rdb also)
  • ⏭️ temporary_proxy.yml redirect traffic to new prod
  • check everything is working
  • Update DNS to point to new server
  • Update DNS for waterlooregionfood.ca also

Cleanup (after 48hrs)

Rollback plan

  • If an error occurs before the temporary proxy is active, and can't be resolved quickly, then restore service back to current server
  • If an error occurs after proxy is active, users may have interacted with the new server (eg made payments.
    • if serious, consider putting into maintenance mode (and stop sidekiq) to avoid further changes
    • otherwise seek to resolve issue in-place.

Follow up

@dacook dacook mentioned this issue Sep 23, 2024
7 tasks
@github-project-automation github-project-automation bot moved this to All the things 💤 in OFN Delivery board Sep 23, 2024
@dacook dacook changed the title ca_prod [Upgrade Ubuntu] ca_prod Sep 23, 2024
@dacook dacook moved this from All the things 💤 to In Progress ⚙ in OFN Delivery board Oct 16, 2024
@dacook dacook self-assigned this Oct 16, 2024
@dacook
Copy link
Member Author

dacook commented Oct 16, 2024

Hi @tschumilas and @David-OFN-CA , I'm ready to provision a new server for your upgrade. I've found I can choose the same options as the current one on Digital Ocean, at the same price. Before I kick off, I want to confirm with you first:

New droplet:

  • Based in Toronto
  • Ubuntu 20 (as per our current upgrade plan)
  • Regular CPU and SSD plan
  • 8gb RAM / 4 CPUs (same as before)
  • 160 gb SSD (twice as much as before)

$48.00/month (same as before)

I hope to be able to complete the setup within a day, but would then need to perform the switch-over to the new server, which would need to be co-ordinated. It should be a seamless process, but I would choose a time that has least impact just in case. So there would be a time where there are two servers being paid for (perhaps 1-2weeks).

Regarding timing for the switchover, I would suggest 10pm EDT Sunday, which is 1pm my time and gives me time to resolve any issues. Can you let me know if this is ok, or if you'd prefer any other time of day or week?

@tschumilas

This comment was marked as resolved.

@dacook

This comment was marked as resolved.

@dacook
Copy link
Member Author

dacook commented Nov 4, 2024

All done!
Go-live occurred around 2024-10-31 14:45 (AEDT)
https://openfoodnetwork.slack.com/archives/CG7NJ966B/p1730346315048729?thread_ts=1727068302.322209&cid=CG7NJ966B

Including the Waterloo api cache service.

@dacook dacook closed this as completed Nov 4, 2024
@github-project-automation github-project-automation bot moved this from In Progress ⚙ to Done in OFN Delivery board Nov 4, 2024
@dacook dacook moved this from Done to In Progress ⚙ in OFN Delivery board Nov 6, 2024
@dacook
Copy link
Member Author

dacook commented Nov 6, 2024

Actually we need to update the DNS for waterloo. waiting on access

@dacook dacook reopened this Nov 6, 2024
@github-project-automation github-project-automation bot moved this from In Progress ⚙ to Dev ready 👋 in OFN Delivery board Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Dev ready 👋
Development

No branches or pull requests

2 participants