MajidBenam / seshat

This is the beginning of the Seshat Project code.
0 stars 3 forks source link

Reproducible deployment #4

Open edwardchalstrey1 opened 8 months ago

edwardchalstrey1 commented 8 months ago

It could be useful to extend the instructions to support re-deployment of the website if needed, for example if the AWS server VM was accidentally deleted or corrupted in some way.

For example, these instructions could provide setup steps similar to what has been added for a local setup, but with additional/modified steps to correctly configure the cloud VM. That way, so long as a backup of the database is available, this paired with the code from GitHub will mean there is no chance to lose the site, and it could also be hosted elsewhere if needed.

A stretch goal could be to write scripts with an infrastructure-as-code tool such as Pulumi or Terraform which can automate this deployment.

MajidBenam commented 8 months ago

This is an excellent suggestion as well, and it's crucial for ensuring a smoother experience. No one wants to deal with server hiccups and potential data losses. I've always been diligent about keeping database backups and notes for redeployment, but I haven't quite reached that desired automation level with clean scripts.

Terraform does seem like a solid choice, given its simplicity and AWS integration. While I'm still getting up to speed with Terraform, if you've got the know-how and the inclination to take the lead on this, I'm all for it. However, if you'd rather not or do not have the time, I'll definitely roll up my sleeves and give it a shot in the near future.

edwardchalstrey1 commented 8 months ago

Proposed development plan for working on this at Turing, bearing in mind there could be a delay in getting a credited AWS subscription:

  1. Attempt to set up a dev Seshat environment on a linux VM on Azure using our existing project subscription which can be viewed at a url and document the manual steps
  2. Translate these steps into IAC (Pulumi or Terraform) and test on Azure
  3. In tandem, speak to Turing IT about getting access to credited AWS subscription
  4. Test deployment on AWS and update IAC code as needed

Note: it may be easier to get set up with AWS at Turing than I expect, in which case we can skip the Azure steps

edwardchalstrey1 commented 5 months ago

Current docs:

edwardchalstrey1 commented 4 months ago

Linked issue on fork: https://github.com/edwardchalstrey1/seshat/issues/79