Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SPIKE] Run smoke tests and user flow tests as ECS task or Lambda in VAEC #179

Closed
6 tasks done
ffafara-tw opened this issue Sep 25, 2020 · 4 comments
Closed
6 tasks done

Comments

@ffafara-tw
Copy link

ffafara-tw commented Sep 25, 2020

Goal

The goal of the spike is to evaluate whether ECS task or Lambda would be better suited for us to run smoke tests and user flow tests in VAEC after deployment .

Since we cannot hit these endpoints from within VAEC, we need to call the user flows/smoke tests from a different system—ECS or Lambda. Then, we can have all the testing included in prod in VAEC.

Checklist:

  • Create an ECS task that will run the tests
  • Create a Lambda that will run the tests
  • Compare costs of both solutions - lambda cheaper
  • Compare execution time - lambda faster (800 ms versus 69 seconds)
  • Compare ease of pipeline integration (how easy to trigger, how easy to extract results)
  • Prepare recommendation in the form of ADR

Timebox:

Suggested 2 days (1 day for Lambda, 1 day for ECS)

Comparison

ECS Implementation:

  • ECS task definition (1 for each env), refactor run_ci_migration script for our use case, put into pipeline- use same ECS steps from deployment-tw to deploy, set up logs - cloudwatch groups, new execution role, new security group, build docker container in pipeline & push to ECR (separate work flow), ECR lifecycle policy, new repository in ECR
  • ECS pipeline steps: building docker container, render, register, and run task definition

Lambda Implementation:

  • separate pipeline include AWS CLI command (fail pipeline if fail, succeed otherwise), terraform for lambda function, automate the zipping (maybe by terraform?), new role, new security group, pass in secrets referencing param store (pass name of env and then lambda retrieve secret using boto?), set up logs - cloudwatch groups
  • Lambda pipeline steps: pip install virtualenv, zip, execute lamdbda function (AWS CLI)

Overlap:

  • set up logs, separate workflow, new security group and role, probably the same for extracting results

Overall:
ECS: more resource intensive, longer deploy time
Lambda: quicker run, cheaper, more lightweight

marisahoenig added a commit that referenced this issue Oct 1, 2020
Co-authored-by: Filip Fafara <ffafara@thoughtworks.com>
marisahoenig added a commit that referenced this issue Oct 1, 2020
Co-authored-by: Ling Tran <ltran@thoughtworks.com>
marisahoenig added a commit that referenced this issue Oct 1, 2020
Co-authored-by: Ling Tran <ltran@thoughtworks.com>
marisahoenig added a commit that referenced this issue Oct 2, 2020
Co-authored-by: Ling Tran <ltran@thoughtworks.com>
marisahoenig added a commit that referenced this issue Oct 2, 2020
Co-authored-by: Ling Tran <ltran@thoughtworks.com>
marisahoenig added a commit that referenced this issue Oct 5, 2020
Co-authored-by: Ling Tran <ltran@thoughtworks.com>
@marisahoenig
Copy link

marisahoenig commented Oct 5, 2020

ADR added to vanotify-team repo here & our work on ECS and Lambda is on branch 179-ecs-lambda-spike

@marisahoenig
Copy link

marisahoenig commented Oct 5, 2020

Notes/Resources for Lambda:

@marisahoenig marisahoenig mentioned this issue Oct 6, 2020
10 tasks
@marisahoenig
Copy link

ADR accepted by team, created implementation card #228. Moving this to closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants