Open cszczepaniak opened 3 years ago
Merging #94 (c71e526) into master (978c0c6) will decrease coverage by
0.12%
. The diff coverage is22.22%
.
@@ Coverage Diff @@
## master #94 +/- ##
==========================================
- Coverage 70.52% 70.39% -0.12%
==========================================
Files 86 86
Lines 3948 3955 +7
==========================================
Hits 2784 2784
- Misses 893 899 +6
- Partials 271 272 +1
Impacted Files | Coverage Δ | |
---|---|---|
server/setup.go | 0.00% <0.00%> (ø) |
|
server/persistence/mysql/mysql.go | 77.08% <100.00%> (+1.00%) |
:arrow_up: |
server/play/cut.go | 44.12% <0.00%> (-5.88%) |
:arrow_down: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 978c0c6...c71e526. Read the comment docs.
go.mod
should handle things relative to the folder it's in, no?
would be easy to revert the folder structure too if it's an issue
STILL TODO IN THIS PR
What broke / What you're adding
Deploying the application to AWS using aws cdk. This is a nifty tool that I found out about through work; it's an infrastructure-as-code platform that allows us to easily provision AWS resources. Out of the box, it comes with a lot of neat libraries that abstract away significant amounts of infrastructure boilerplate (you can see here that I'm getting something running out in ECS fronted by a load balancer in ~10 lines of TypeScript).
How you did it
Mostly followed the CDK documentation. awscdk.io is a decent resource; here's the main link I was working with. This video was not super helpful but helped me realize I need to specify which port the docker image is serving on.
Here's a promising article about setting up the DB within the VPC, although their use case was a bit different since they were using lambdas and stuff.
How to test it and how to try to break it
Well, we really want the github actions to be deploying it. But if you wanna try it on your own...
npm i -g aws-cdk
aws configure
(although I had a bit of trouble with these not getting picked up; I ended up just using a script whichexport
ed the appropriate env vars). You need to set the following (which need to have sufficient permissions to do all the deploy stuff; I generated an IAM user called "deploy" that has admin rights):infrastructure
and runnpm install
cdk synth
to show you what will be deployed (in a super terrible format; this is the cloud formation definition)cdk deploy
to deploy the stuffcdk destroy
to tear everything down afterwards if you want; I was doing this because I didn't want to accidentally incur costs. Once we have the infrastructure better understood, we can look closer at billing implications/pick free tier machines and stuff