chaoss / grimoirelab

GrimoireLab: platform for software development analytics and insights
https://chaoss.github.io/grimoirelab/
GNU General Public License v3.0
500 stars 183 forks source link

AWS CDK Fargate deployed Grimoire Lab. #659

Closed andrew-mclachlan closed 3 months ago

andrew-mclachlan commented 7 months ago

Special thanks to @itrich for guideance on an AWS deployment of Grimoire.

The following changes add basic support for hosting Grimoire on AWS with Fargate.

This PR has limitations. It relies on all configuration files (e.g., default-grimoirelab-settings/projects.json) being included in the Docker Images. This configuration has not been setup for EFS volume mounts or the use of AWS S3. More changes will follow which add better support for using RDS and EFS volume mounts.

This is my first Grimoire PR, so working through the process. Feedback most welcome. Tag @GeorgLink.

GeorgLink commented 7 months ago

Thank you!

I will leave the review to @jjmerchante, @zhquan, or @sduenas

sduenas commented 7 months ago

Thanks for your PR, @andrew-mclachlan . We're going to need some time to understand it before we merge it. My knowledge about AWS is limited.

andrew-mclachlan commented 7 months ago

We're going to need some time to understand it before we merge it. My knowledge about AWS is limited.

Not a problem. Happy to help!

You can find some background on this PR on https://chaoss-workspace.slack.com/archives/C022NPTPC8Z/p1708895468075019. Happy to have a call to walk through this setup if that would be helpful too. @itrich has a similar deployment with Terraform, so might be able to offer support here too.

In a nutshell, this PR setups a VPC with Subnets, a Docker Registry for hosting Images (although they could live on Docker Hub), and it runs the Docker images/containers as a tasks/services on AWS Fargate.

What I've not included here (I'll update the README) is once the IaaC has been deployed on AWS and the services are running, then you just need to push a new image(s) to the registry and run a CLI command (e.g., aws ecs update-service with options) to pull the new image and spin it up as a container.

andrew-mclachlan commented 7 months ago

Created a separate repo https://github.com/andrew-mclachlan/grimoirelab-aws-cdk @sduenas.

andrew-mclachlan commented 6 months ago

Hi @GeorgLink / @sduenas -

@itrich suggested maybe this PR becomes the separate repo and a mention of it in a section within community_components.md or some such. This AWS CDK deployment is presently being used for our hosted Grimoire, so hopefully useful to others? I'll defer to yourselves about this PR. Close? Change? Merge?

Thanks!

sduenas commented 3 months ago

I'm gonna close this PR. I need to edit the README file to point to the other repository.

andrew-mclachlan commented 3 months ago

I would appreciate that @sduenas . Happy to review or contribute a PR.

andrew-mclachlan commented 2 months ago

Thanks @sduenas and @GeorgLink in advance. Posted https://github.com/chaoss/grimoirelab/pull/693.

sduenas commented 2 months ago

Btw, if you want to write a short piece about this, we can make an announcement too, to give it more visibility.

andrew-mclachlan commented 2 months ago

Cool. I shall do that. Thanks!