From 15832f216d068b266e5aa6d311df019e082978db Mon Sep 17 00:00:00 2001
From: Dharshi Balasubramaniyam
<139672976+DharshiBalasubramaniyam@users.noreply.github.com>
Date: Mon, 1 Jul 2024 07:56:15 +0530
Subject: [PATCH 1/4] Update technologies in README.md
---
README.md | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/README.md b/README.md
index 19663af..3a5c9c6 100644
--- a/README.md
+++ b/README.md
@@ -4,7 +4,10 @@
-
+
+
+
+
## 🌟 Description
From eae7b07ee6ee0f0f2ae994887a2e7d28a1c5e005 Mon Sep 17 00:00:00 2001
From: Dharshi Balasubramaniyam
<139672976+DharshiBalasubramaniyam@users.noreply.github.com>
Date: Mon, 1 Jul 2024 08:03:30 +0530
Subject: [PATCH 2/4] Update ci-cd.yml
---
.github/workflows/ci-cd.yml | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml
index a59b385..fb4104f 100644
--- a/.github/workflows/ci-cd.yml
+++ b/.github/workflows/ci-cd.yml
@@ -24,14 +24,14 @@ jobs:
- name: Build with Maven # Step to build the project with Maven
run: mvn clean install
- # - name: Login to DockerHub # Step to login to DockerHub
- # run: docker login -u ${{secrets.DOCKER_USERNAME}} -p ${{secrets.DOCKER_PASSWORD}}
-
- # - name: Build Docker image # Step to build the Docker image
- # run: docker build -t dharshib/springboot-ci-cd .
-
- # - name: Push the image to DockerHub # Step to push the Docker image to DockerHub
- # run: docker push dharshib/springboot-ci-cd:latest
+ - name: build and push the docker image to dockerhub
+ run: |
+ # 1. Login to DockerHub
+ # 2. Build the Docker image
+ # 3. Push the Docker image to DockerHub
+ docker login -u ${{secrets.DOCKER_USERNAME}} -p ${{secrets.DOCKER_PASSWORD}}
+ docker build -t dharshib/springboot-ci-cd .
+ docker push dharshib/springboot-ci-cd:latest
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
@@ -60,7 +60,7 @@ jobs:
# Updating our ECS task definition file with the newly built Docker image ID
# after successfully building and pushing the Docker image to Amazon ECR.
- - name: Fill in the new image ID in the Amazon ECS task definition
+ - name: Update ECS task definition with new image
id: task-def
uses: aws-actions/amazon-ecs-render-task-definition@v1
with:
@@ -68,7 +68,7 @@ jobs:
container-name: ${{ secrets.CONTAINER_NAME }}
image: ${{ steps.build-image.outputs.image }}
- - name: Deploy Amazon ECS task definition
+ - name: Deploy the updated ECS task definition
uses: aws-actions/amazon-ecs-deploy-task-definition@v1
with:
task-definition: ${{ steps.task-def.outputs.task-definition }}
From 38b3a29f6e1e2de4056356bcc531c3d92d1ee641 Mon Sep 17 00:00:00 2001
From: Dharshi Balasubramaniyam
<139672976+DharshiBalasubramaniyam@users.noreply.github.com>
Date: Mon, 1 Jul 2024 15:30:42 +0530
Subject: [PATCH 3/4] Update ci-cd.yml
---
.github/workflows/ci-cd.yml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml
index fb4104f..c13d62e 100644
--- a/.github/workflows/ci-cd.yml
+++ b/.github/workflows/ci-cd.yml
@@ -1,3 +1,7 @@
+# This workflow will build docker image and push it to DockerHub,
+# After that, This wrkflow build and push a new container image to Amazon ECR,
+# and then will deploy a new task definition to Amazon ECS, when there is a push to the "main" branch.
+
name: CI/CD Pipeline # Name of the CI/CD Pipeline
on:
From fbf51f13e247e24dc1831d416a70da7ec85973e1 Mon Sep 17 00:00:00 2001
From: Dharshi Balasubramaniyam
<139672976+DharshiBalasubramaniyam@users.noreply.github.com>
Date: Mon, 1 Jul 2024 15:34:23 +0530
Subject: [PATCH 4/4] Update README.md
---
README.md | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/README.md b/README.md
index 3a5c9c6..070f483 100644
--- a/README.md
+++ b/README.md
@@ -185,11 +185,11 @@ For example, we might have a web server container and a database container defin
## ECS workflow
-1. Create a cluster.
-2. Create a service within the cluster.
-3. Define Task definition.
-4. Setup EC2 instances (Opt for the EC2 launch type).
-5. Set Up Load Balancing (Optional).
+1. Create an ECR repository to store your images.
+2. Create an ECS task definition, an ECS cluster, and an ECS service.
+3. Setup EC2 instances (Opt for the EC2 launch type).
+4. Set Up Load Balancing (Optional).
+5. Store your ECS task definition as a JSON file in your repository.
6. Create workflow file to automate CI/CD Integration with GitHubActions (check ci-cd.yml workflow file).
7. Access the endpoint of our deployed application in a browser. To access the endpoint of your deployed application in a browser.
- To access the endpoint of your deployed application, use the DNS name of your Elastic Load Balancer (ELB) by copying it and pasting it into your web browser's address bar.