oss-slu / shelter_volunteers

MIT License
2 stars 3 forks source link

Deploy application for testing #41

Open kate-holdener opened 10 months ago

kate-holdener commented 10 months ago

We have been running this application in a development environment. We need to deploy a live test instance of this application. Clients can access the test version of the application and provide their feedback.

Describe the solution you'd like The deployment should be scripted, as much as possible, that way we can reuse that code for production deployment (after adjusting configuration).

In developing this deployment, make sure to keep private information (api keys, passwords) private (using environment variables).

Additional context We will need some kind of cloud based account (AWS, Google Cloud, Microsoft Azure), for test and production deployments.

adhampton110 commented 3 weeks ago

@kate-holdener

Overview

Over the summer I spent some time looking at this issue, attempting to see if AWS would be a good hosting candidate for this application. I began working on a proof of concept application, named react-flask, that attempted to utilized some of the your technologies (ReactJS for Front-End, Flask for Back-end, Mongo for database). I needed to take a break from this project due to other priorities, but I have documented my progress, suggestions, and potential questions below.

My Progress

React Flask

Initial React Flask Design Architecture

This was the initial design architecture I sought to implement for the proof of concept. I split this proof of concept into two project: a project for the application and backend files] and a project for the infrastructure deployment. Both of these projects are currently private, but if interested in reviewing my source code don't hesitate to reach out on here or on slack !

My Success

I managed to setup the front-end portion of this application . I used S3 to store all of the front-end files, CloudFront to cache the files and to have the ability to use a custom domain, and Route 53 to route end-user requests.

My failures

I faced challenges building the backend. Here are the solutions I did/did-not try:

  1. Backend deployment using EC2. The largest hurdle I never overcame was successful communication between the front-end and back-end. I also had difficulties executing a successful blue-green deployment for the backend.
  2. Backend deployment I considered using ECS. This was my "in-progress" solution, but left unfinished due to work priorities.
  3. Backend deployment using EKS. I did not attempt this solution, but did not believe it would be a good fit for this project due to the ramp-up time to learn Kubernetes, on top of AWS. Additionally, cluster management is large maintenance task.
  4. Backend deployment using AWS Lambda and AWS API Gateway. I did not attempt this solution, but thinking it could be a viable solution. This solution caught my eye as it wouldn't require your backend to be continuously running.

Additionally, I did not even reach the database aspect of the proof of concept.

Closing Statements & Questions

As I'm closing the sticky notes I've had open for months, here are some questions I'd consider if you decide to go down the route of deploying the application to AWS:

  1. How do you plan to deploy the application's infrastructure? Additionally what measure will be taken to secure the application infrastructure?

    • Are you planning to use tools like Terraform, AWS Cloud Formation, or manually through the AWS Console.
  2. Who will be able to access the AWS Console and what should be the level of access for each user group?

  3. How do you want to host your backend? Do you want a continuous running backend that incurs costs for each minute that it is deployed or a backend that executes on a as-needed bases (meaning per api call)?

  4. Do you have enough resources to migrate pieces of this application to the cloud? Are there plans to migrate more applications into the cloud?

  5. "Who?" owns the application and who will pay for the costs that the applications incurs?

These aren't questions meant to scare or defer anyone from migrating to the cloud, but they are important questions to think about if you are considering this migration :)