NYCPlanning / data-engineering

Primary repository for NYC DCP's Data Engineering team
20 stars 0 forks source link

Improve QA App Deployment & Performance #579

Open sf-dcp opened 7 months ago

sf-dcp commented 7 months ago

Issue Description

We would like to improve deployment and maintenance process of the QA app. We currently use DO Droplet service (comparable to AWS ec2 instance) to host our QA app. Some issues that have come up while using Droplet are:

Proposed Approach

Migrate the QA app from Droplet to the DO App Platform service. App Platform is a Platform-as-a-Service and it takes care of the underlying infrastructure. There are multiple options to deploy an app to App Platform; in our case, the most convenient option seems to deploy app from a container image. This link describes the process.

Components of the approach:

Considerations of Proposed Approach

Deployment

With the proposed approach, we still need to redeploy the app manually if we choose to use an image directly from Docker hub (from Github Actions). App Platform offers automatic re-deployment of source code coming from DO registry images or a Github repo.

Failures

[TODO]

Cost

For the platform app basic plan with the specs similar to the current plan (except hard disk), the cost is ~$20/month. I believe this pricing is for 1 node and we have to choose a pro plan to have multiple nodes. We are currently paying ~$16/month (see Damon's comment below).

Security

[TODO]

Other

App platform is not suitable for storage. For example, we may have logic where we pull data from s3 to droplet for a qa page (ex: data viz). This won't work with the app platform; instead, we would have to pull data directly from DO storage OR add a volume resource (extra $$).

Relevant references:

damonmcc commented 7 months ago

the DO droplet named de-qaqc costs $16 per month and the specs are:

sf-dcp commented 6 months ago

Update:

Manually deployed the app from DO console and generate an app-spec.yml file that can be used for future app creation/deployment. The following roadblocks were identified:

If variables & security software can be figured out, we can transition to Platform App and add an authentication page to streamlit.