Part 1: Upload Images to AWS ECR using CI/CD Pipeline (feature/aws-ecr) Part 2: Deploy Application to EC2 Instance using GitLab CI/CD Pipeline (feature/aws-ec2-deploy) Part 3: Use Self-Managed Runners for GitLab CI/CD (feature/runner)
AWS IAM, AWS ECR, GitLab CI/CD, AWS EC2, Docker
Part 1
- Create access keys for user in AWS IAM
- Add AWS access keys as GitLab CI secret environment variables for use in the pipeline
- Update CI pipeline to build and push Docker images to ECR using the AWS access keys
Part 2
- Configure EC2 instance with Docker and ECR credentials
- Create new deployment job in GitLab CI that automatically:
- Connects to EC2 instance using SSH
- Pulls the latest Docker image from ECR
- Stops previous running container, if applicable d. Runs the latest Docker container
Part 3
- Create new AWS EC2 Instance
- Register the EC2 instance with GitLab CI/CD as a project runner
- Configure EC2 instance as a GitLab runner with Shell executor, instead of Docker executor
This project build on previous one: It uses OAWSP Juice Shop vulnerable application as the application code:
The contributors to this project are:
This program is free software: you can redistribute it and/or modify it under the terms of the MIT license.