cds-snc / notification-planning-core

Project planning for GC Notify Core Team
0 stars 0 forks source link

Determine Best Practice for Deploying Lambda Function without Docker Container #94

Open ben851 opened 1 year ago

ben851 commented 1 year ago

Description

As a developer/operator of GC Notify, I would like to be able to deploy the infrastructure without having dependencies on the application. Currently, we are unable to deploy the environment from scratch because AWS expects the docker image to exist when deploying a lambda function.

Affected components:

WHY are we building?

WHAT are we building?

Investigate different options for how to decouple the application from the infrastructure

VALUE created by our solution

We will be able to better maintain our infrastructure, and deploy to new test environments

Acceptance Criteria

QA Steps

ben851 commented 1 year ago

My initial thoughts:

  1. Separate the ECR repositories from the lambda deployment, but keep them in the same notification-terraform repository. Create terraform post hook to build the docker image, and push it to the newly created repository
  2. Create the beginnings of a notify-depot terraform - the infrastructure for the infrastructure. Then we would manage initial scratch deployments via additional pipelines:
    • notify-depot apply
    • build/push docker images
    • notify-terraform apply
ben851 commented 1 year ago
ben851 commented 1 year ago
ben851 commented 1 year ago

Currently blocked by task 103 - automate ACM certificate validation process, which is in turn blocked by task #36 move the DNS to notify aws accounts.

ben851 commented 1 year ago
sastels commented 1 year ago

waiting for the ACM validation changes

ben851 commented 1 year ago
ben851 commented 1 year ago

ACM validation deployed to Prod. Will dust off my docker PR and work on merging this afternoon.

jimleroyer commented 1 year ago

@ben851 was able to build the whole environment without code changes yesterday. But destroying an environment cause problems as some resources failed to get deleted. Ben will investigate a script to nuke everything if he can't get his ways using Terraform.

jimleroyer commented 1 year ago

We are reviewing that PR at the moment: https://github.com/cds-snc/notification-terraform/pull/764