guzmonne / cdk

2 stars 0 forks source link

Amazing Work! #1

Open jmjava opened 3 years ago

jmjava commented 3 years ago

Just want to say thank you for pushing this to Github. I am learning quite a bit. Your work is going to help me greatly for some upcoming tasks we are planning!

image

I see you have a pipeline for each environment? Or is this just a visual representation? We had been thinking about one pipeline per environment instead of moving from stage to stage. We use pipelines to deploy and sometimes bring down part of stack and redeploy just for an environment. With multiple stage this looks more tightly coupled. Also with a single pipeline it is my understanding that the GUI links from the CodePipeline do not work. And you cannot use lookups.

-john

guzmonne commented 3 years ago

Thank you for your comment.

This diagram is an architecture I used in most of my projects but now adapted to work with CDK.

I'm using a CDKPipeline to deploy multiple pipelines. Each pipeline builds a single application in a given environment. Most times, two environments are enough: staging and production. Both pipelines are tracking the same GitHub repository and do the same thing. The only difference is that one triggers whenever a new commit is done to the master branch and only when the master branch is tagged with a version number—something like v1.0.0.

I try to decouple stateful stacks from stateless stacks. So, for now, I'm using the CDK Pipeline to configure the data layer on all the environments. I might end up creating additional pipelines if it gets too complex.

Then there's the dev environment. I prefer this environment to work as a "playground" for the developers. It basically holds services needed for the development of the app. These services can be configured and created using multiple methods, and developers can destroy them at any time. Since I'm using AWS Organizations with SSO, I can centrally handle permissions for the developers if I need to limit what they can do (this is usually not the case, I configure a policy that denies the creation of new users, groups, or policies, and that's enough).

Give me a shoutout if you want to take more about this infrastructure or cloud in general.

I'll be updating this repository soon with more documentation and fixes on some of the Constructs and Stacl.

jmjava commented 3 years ago

I'll be updating this repository soon with more documentation and fixes on some of the Constructs and Stacl,

That sounds great. I am happy to hear you are using multiple pipelines. We have a structure where we need multiple "staging" environments for clients to test; this was going to require multiple pipelines.

As for stateful and stateless, we currently making our vpc and database in a separate cdk app and then using a VPC lookup in the main stack that builds out the bulk of the infrastructure. Your work with accounts and organizations is ground breaking. It really seems like this work is paving the way to immutable infrastructure and viewing accounts as cattle vs pets.

Thank you so much for offering to share more ideas! I am definitely going to take you up on that. Last weekend I spent some time trying to get the other organizations project you have going, but ran into some environment issues. I added an issue. I suspect its something with my setup maybe the wrong version of typescript?? I plan to try again this weekend.

Thanks again for the clean code and great documentation. I took a few hours to read the cdk code today and it all looks fantastic.

-john

guzmonne commented 3 years ago

Last weekend I spent some time trying to get the other organizations project you have going, but ran into some environment issues.

This is most likely because of the actual code. When I ported the Organizations constructs I made some mistakes that have been solved on this project. I have to add those changes back to the other repository.

jmjava commented 3 years ago

Ok - if you need me to test anything I can do it. I am learning typescript, but would like to help in any way I can. We are using python at my day job, but to be honest, I think typescript is better.

https://github.com/guzmonne/organizations-stack/issues/1

On Thu, Aug 26, 2021 at 6:05 PM Guzman Monne @.***> wrote:

Last weekend I spent some time trying to get the other organizations project you have going, but ran into some environment issues.

This is most likely because of the actual code. When I ported the Organizations constructs I made some mistakes that have been solved on this project. I have to add those changes back to the other repository.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/guzmonne/cdk/issues/1#issuecomment-906774101, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAEQPB3IYYB6SOWUENIZOWTT623BNANCNFSM5C3PWEWA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

I updated the package.json and it seems to compile now. Updated the issue