In this folder are configuration files for deploying GrimoireLab using AWS. You will need a functional AWS account and you should be able to deploy that AWS account. This setup uses AWS Fargate with a Network Load Balancer.
- Node.js 20.10.0+
- AWS CLI
- AWS credentials configured
- Docker Images built for GrimoireLab (Mordred), NGINX, Sorting Hat Working, Sorting Hat, MariaDB, Redis, OpenSearch, and OpenSearch Dashboards.
- This setup 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.
cd aws
npm install
npm run build
Variable | Value |
---|---|
GRIMOIRE_AWS_ACCOUNT | Your AWS account |
GRIMOIRE_AWS_REGION | Your preferred AWS region (e.g., eu-west-2) |
npx cdk bootstrap aws://${GRIMOIRE_AWS_ACCOUNT}/${GRIMOIRE_AWS_REGION}
npx cdk deploy AwsEcrStack
aws ecr get-login-password --region ${GRIMOIRE_AWS_REGION} | docker login --username AWS --password-stdin ${GRIMOIRE_AWS_ACCOUNT}.dkr.ecr.${GRIMOIRE_AWS_REGION}.amazonaws.com/grimoirelab
docker push ${GRIMOIRE_AWS_ACCOUNT}.dkr.ecr.${GRIMOIRE_AWS_REGION}.amazonaws.com/grimoirelab:latest
docker push ${GRIMOIRE_AWS_ACCOUNT}.dkr.ecr.${GRIMOIRE_AWS_REGION}.amazonaws.com/nginx:latest
docker push ${GRIMOIRE_AWS_ACCOUNT}.dkr.ecr.${GRIMOIRE_AWS_REGION}.amazonaws.com/sortinghat-working:latest
docker push ${GRIMOIRE_AWS_ACCOUNT}.dkr.ecr.${GRIMOIRE_AWS_REGION}.amazonaws.com/sortinghat:latest
docker push ${GRIMOIRE_AWS_ACCOUNT}.dkr.ecr.${GRIMOIRE_AWS_REGION}.amazonaws.com/mariadb:latest
docker push ${GRIMOIRE_AWS_ACCOUNT}.dkr.ecr.${GRIMOIRE_AWS_REGION}.amazonaws.com/redis:latest
docker push ${GRIMOIRE_AWS_ACCOUNT}.dkr.ecr.${GRIMOIRE_AWS_REGION}.amazonaws.com/opensearch:1.3.7
docker push ${GRIMOIRE_AWS_ACCOUNT}.dkr.ecr.${GRIMOIRE_AWS_REGION}.amazonaws.com/opensearch-dashboards:1.3.7
npx cdk deploy AwsVpcStack
npx cdk deploy AwsEcsRedisStack
npx cdk deploy AwsEcsOpenSearchStack
npx cdk deploy AwsEcsSortingHatStack
npx cdk deploy AwsEcsMordredStack
npx cdk deploy AwsNlbStack
Visit the AWS Load balancers website, select grimoire-nlb, and visit the DNS name in your browser (e.g., grimoire-nlb-2ffec2c2fc78664d.elb.eu-west-2.amazonaws.com
).
- Setup RDS in place of mariadb service.
- Setup EFS to store configuration files and store indices.
- Integrate into CI/CD workflow for GrimoireLab deployment.