openfoodfoundation / ofn-install

Ansible scripts for provisioning and deploying Open Food Network
54 stars 112 forks source link

[Upgrade Ubuntu] us_prod #965

Open dacook opened 6 days ago

dacook commented 6 days ago

Slack thread: #instance-managers

1. Setting up the new server

config

setup

Enable passthrough on current server to allow new server to generate a certificate:

Then setup new server. Ensure you have the correct secrets (current secrets are usually fine). ansible-playbook -l x_prod2 -e "@../ofn-secrets/x_prod/secrets.yml" playbooks/

initial migration

ansible-playbook -l x_prod -e rsync_to=x_prod2 playbooks/

Make sure to clear cache so that instance settings are applied: cd ~/apps/openfoodnetwork/current; bin/rails runner -e production "Rails.cache.clear"

2. Testing

3. Migration

preparation

switchover: old server

switchover: new server

4. Cleanup (after 48hrs)

Rollback plan

dacook commented 6 days ago

There are some subdomains pointing to the server (see Cloudflare DNS), but they appear to be simple redirects (probably set up in nginx)

lauriewayne commented 6 days ago

There are some subdomains pointing to the server (see Cloudflare DNS), but they appear to be simple redirects (probably set up in nginx)

  • meet.openfoodnetwork.net
  • donate.openfoodnetwork.net

Yep! Cloudflare gives us three redirects and we only use two. We use them a good amount.