pariyatti / kosa

Digital library service
GNU Affero General Public License v3.0
8 stars 3 forks source link

Upgrade production and sandbox to Ubuntu 22.04 LTS (Jammy) #53

Closed deobald closed 1 year ago

deobald commented 2 years ago

A new LTS of Ubuntu was released on April 21st. By mid-May it should be safe to upgrade (create new Lightsail VMs and redeploy). As of 2023-04-09, our upgrade process probably looks like:

  1. [ ] backup our current 20.04 VMs
  2. [ ] stop + rename current VMs?
  3. [ ] create new Lightsail VMs with Ubuntu 22.04
  4. [ ] restore backups to new VMs
  5. [ ] redirect DNS
deobald commented 1 year ago

It looks like this is finally available on Lightsail:

lightsail-22 04

Hopefully AWS will release new Ubuntu LTS versions in a more timely fashion for future releases.

balwa commented 1 year ago

In place upgrades are easier for terraform modules. Renaming of the instances or redirecting the dns is currently non trivial as the EC2 VMs are directly setup to resolve the DNS to their server names. So, lets say if we were to call the next version testing kosa-sandbox-next, the DNS record of kosa-sandbox-next.pariyatti.app shall be setup by terraform provisioning.

So the upgrade process will involve running a temporary server called kosa-sandbox-next

That can be tested independently for any issues. After fixing the issues that arise, the kosa sandbox system can be upgraded in place on a weekend with 30 minutes downtime window. Should a restore be needed, the changes can be reverted and we would get the old version back.

deobald commented 1 year ago

Makes sense. Thanks for clarifying!

balwa commented 1 year ago

Over the weekend as this temp environment was already tested, i ran terraform destroy for sandbox-next and while the terraform module config can continue to exist for any changes that we would like to test temporarily, the underlying infrastructure has been cleaned up for cost efficiency. We shall be scheduling an upgrade of lightsail for sandbox and prod to 22.04 over next few weeks.