Replies: 5 comments 6 replies
-
|
cc AWS crewwwwww! @medelman17 @adamelmore @ericclemmons |
Beta Was this translation helpful? Give feedback.
-
|
I have a ton of thoughts, but I think it'd be easiest for me to explain my approach once I've buttoned up the repo I'm putting together. Fwiw, my frontend is Next.js deployed to Vercel. So, my GH Action for deploys looks like:
|
Beta Was this translation helpful? Give feedback.
-
|
My hunch is that we need to add some kind of PreExec and PostExec commands to |
Beta Was this translation helpful? Give feedback.
-
|
I guess there are two main directions people are coming from: Either Vercel (nextjs app, Github Actions, few AWS resources) or AWS (Codebuild / cdk-pipelines, many services, maybe Vercel or AWS Amplify for Webapp). My example is as I said a fiddle. So I will draw a bigger picture here: Our product are IoT Applications where a lot of devices send data to AWS. The main components (not a monorepo currently, we have a lot of private npm packages which I am trying to change) are:
The apps need to share packages therefore they include their dependencies (currently all private npm packages) If it comes to deployment / CI / CD we use aws-cdk pipelines The deployment consists of multiple steps (build, test, synth, deploy and also stages (dev, prod). So the way turborepo fits in is more the local development of the webapps and building packages. Within a deployment turborepo tasks will be run by an overlying pipeline or github actions anyway as they need to happen event based. To sum it up:
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello there,
I do not know if this is of interest to anyone, but I did some
aws-cdkexample with a rather complex pipeline dependency tree. I would propably not do this for a production app this way (I do use aws-cdk pipelines for that purpose) but it was some fiddling around with turborepo for me.The code is located here: https://github.com/Nantis-GmbH/turborepo/tree/aws-cdk-example/examples/aws-cdk
The example consists of 3 parts:
My focus was not so much the caching part and the
deploytasks are not cacheable anyways (because you will need to make the cdk call in order to make sure the same is deployed to aws as what you have in yourcdk.outsynthezied folder)So the tricky part is that the frontend will need to know the API endpoint at build time. So the following pipeline will be needed:
The inject outputs part in 3. is a nasty
cp aws-config.jsscript which tightly couples everything - How to do better? imho this should work through node package resolution, but I do not know how to make this work or you will need to includecdkas a dependency also in the frontend and then call aws for thefrontend-hostingstack outputs and use that.The main issue I am having is that the depency graph is rather cluttered since some of the dependencies are 1 to 1. Is there any way to include a single package dependency in the pipelines? (I tried scope but was not able to make it work correctly). See graph picture below
Beta Was this translation helpful? Give feedback.
All reactions