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] be_prod #959

Open
5 of 20 tasks
Tracked by #157
dacook opened this issue Nov 4, 2024 · 6 comments
Open
5 of 20 tasks
Tracked by #157

[Upgrade Ubuntu] be_prod #959

dacook opened this issue Nov 4, 2024 · 6 comments
Assignees

Comments

@dacook
Copy link
Member

dacook commented Nov 4, 2024

Slack thread: https://openfoodnetwork.slack.com/archives/CG7NJ966B/p1732147234656099

  • Check old server config for any additional services to be aware of. Document any necessary steps for migration.
  • take snapshot in case of failure
  • set up admin user in case need to investigate

migration

  • in-place upgrade to Ubuntu 18
    • sudo systemctl stop nginx puma sidekiq redis* postgres
    • sudo do-release-upgrade, press Y lots of times..
  • in-place upgrade to Ubuntu 20
  • test reboot
  • ensure playbooks work
    • provision.yml
    • deploy.yml

Testing

  • send test mail (/admin/mail_methods/edit).
  • terms of service file: /admin/terms_of_service_files
  • shop catalogue display correctly, with images, add to cart, begin checkout, login
  • note: check cookies if login won't work
  • Check integrations
    • Payments (check Stripe connect status /admin/stripe_connect_settings/edit)
    • New Relic
    • Bugsnag
  • Check there are no alarm bells, eg:
    • tiny data change is present. undo it.
    • upload a product image
    • ~/apps/openfoodnetwork/current/log/production.log and sidekiq.log

follow up

Rollback plan

  • If unable to resolve any issues in-place, restore snapshot
  • If unable to restore snapshot....contact OVH suport
  • If no response... seek contact with Emmanuel.. provision server on new hosting provider with own credit card?
@dacook dacook mentioned this issue Nov 4, 2024
9 tasks
@github-project-automation github-project-automation bot moved this to All the things 💤 in OFN Delivery board Nov 4, 2024
@dacook dacook changed the title be_prod [Upgrade Ubuntu] be_prod Nov 4, 2024
@dacook dacook self-assigned this Nov 20, 2024
@dacook dacook moved this from All the things 💤 to In Progress ⚙ in OFN Delivery board Nov 20, 2024
@dacook
Copy link
Member Author

dacook commented Nov 26, 2024

Vincent has left OMdM and I have had this email from his manager - maybe you could contact him:

On Fri, 22 Nov 2024 08:20:45 +0000 Emmanuel Bawin <[email protected]> wrote
Dear Nick,
Thanks for you message.
Indeed Vincent do not work anymore for us.
I will meet our different Belgian partners soon to clarify the repartition of roles.
Until this, I will be the point of contact.

@dacook
Copy link
Member Author

dacook commented Dec 9, 2024

Current stats:

htop
  1  [                                              0.0%]   Tasks: 55, 138 thr; 1 running
  2  [|                                             0.7%]   Load average: 0.08 0.10 0.09
  3  [|                                             1.3%]   Uptime: 563 days(!), 13:46:43
  4  [                                              0.0%]
  Mem[|||||||||||||||||||||||||||||||||||||||2.90G/7.61G]
  Swp[                                             0K/0K]

df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            3.8G     0  3.8G   0% /dev
tmpfs           780M   81M  699M  11% /run
/dev/sda1        97G   30G   67G  31% /

@dacook
Copy link
Member Author

dacook commented Dec 10, 2024

Sigh I've just realised I need to take a snapshot before starting, because I don't have any other rollback plan.
This requires an extra payment on the account, which requires the card security code.

Pausing and will proceed once snapshots are enabled.

@dacook
Copy link
Member Author

dacook commented Dec 12, 2024

Took about an hour, with about 15 mins unexpected downtime, but I now have a snapshot, which presumably I can restore in the case of an unresolvable issue.
Screenshot 2024-12-12 at 11 22 19 AM

@dacook
Copy link
Member Author

dacook commented Dec 12, 2024

Unfortunately the in-place upgrade won’t work (without a lot of manual hacking), so we need to provision a new server. I have found a local provider (is*hosting) and will attempt to set up as much as I can until Emmanuel can provide payment.

For reference:

On Thu, 12 Dec 2024 at 16:25, David Cook [email protected] wrote:

Hi Emmanuel,

I'm sorry to have to come back to you without success. Although in similar situations it had worked, I wasn't able to successfully upgrade your server in place, so we will need to choose a more reliable alternative.

From our previous communication, I guess that you'd prefer a server located close to Belgium. I have reviewed a few other options and will share my recommendation.

is*hosting seemed like a good option, so I have created an account and added the required VPS to the cart. It's ready to checkout, so if you are happy with this, can you please log in and add credit card details?
The login details are:
https://my.ishosting.com/en/cart
[email protected]
RndZ&z3U&6S8Cfv

If you would prefer to create the account yourself, or choose another hosting provider, note the key details needed for a server:
VPS
3+ CPU
8+ GB RAM
40+ GB storage
Ubuntu 20.04 (this is important)

@dacook
Copy link
Member Author

dacook commented Dec 12, 2024

Backup failed at 10am. I'm not sure if it continued to fail, need to login to check.
https://openfoodnetwork.slack.com/archives/CEF14NU3V/p1733959042938539


Logged in, it was just a single network error, all fine now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress ⚙
Development

No branches or pull requests

1 participant