From d4ef9e7c9d85dab045f38d709e0d85835e2bcafe Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Sun, 29 Oct 2023 13:39:54 +0530 Subject: [PATCH 1/6] Reverted change made for testing. --- auth/src/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/auth/src/index.ts b/auth/src/index.ts index 43011d7..6bcdcef 100644 --- a/auth/src/index.ts +++ b/auth/src/index.ts @@ -3,7 +3,6 @@ import mongoose from "mongoose"; import { app } from "./app"; const startServer = async () => { - console.log("Starting up ......."); const PORT = 3000; const SERVICE_NAME = "AUTH"; From d27899f5bc8f608c1449bcc649845c3e24fc9148 Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Sun, 29 Oct 2023 13:50:03 +0530 Subject: [PATCH 2/6] Configured CD for Client Service. --- .../CD - Deploy - Client Service.yml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/CD - Deploy - Client Service.yml diff --git a/.github/workflows/CD - Deploy - Client Service.yml b/.github/workflows/CD - Deploy - Client Service.yml new file mode 100644 index 0000000..3cc0897 --- /dev/null +++ b/.github/workflows/CD - Deploy - Client Service.yml @@ -0,0 +1,31 @@ +# ========================================= CD - Deploy - Client Service ========================================= + +name: CD - Deploy - Client Service + +on: + push: + branches: + - production + paths: + - "client/**" + +jobs: + Client-Service-CD-Pipeline: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + # Build Image and push to Docker registry + - run: cd client && docker build -t alwinsimon/bookmyseat-client . + - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + - run: docker push alwinsimon/bookmyseat-client + + # Restart Deployment in K8s cluster deployed in Digital Ocean + - uses: digitalocean/action-doctl@v2 + with: + token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} + - run: doctl kubernetes cluster kubeconfig save ${{ secrets.DIGITALOCEAN_CLUSTER_ID }} + - run: kubectl rollout restart deployment client-depl From 2ee4c81c9fc79f7d75678a4a61ffca76fc3e6fc9 Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Sun, 29 Oct 2023 13:52:43 +0530 Subject: [PATCH 3/6] Configured CD for Expiration Service. --- .../CD - Deploy - Expiration Service.yml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/CD - Deploy - Expiration Service.yml diff --git a/.github/workflows/CD - Deploy - Expiration Service.yml b/.github/workflows/CD - Deploy - Expiration Service.yml new file mode 100644 index 0000000..93dd187 --- /dev/null +++ b/.github/workflows/CD - Deploy - Expiration Service.yml @@ -0,0 +1,31 @@ +# ========================================= CD - Deploy - Expiration Service ========================================= + +name: CD - Deploy - Expiration Service + +on: + push: + branches: + - production + paths: + - "expiration/**" + +jobs: + Expiration-Service-CD-Pipeline: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + # Build Image and push to Docker registry + - run: cd expiration && docker build -t alwinsimon/bookmyseat-expiration . + - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + - run: docker push alwinsimon/bookmyseat-expiration + + # Restart Deployment in K8s cluster deployed in Digital Ocean + - uses: digitalocean/action-doctl@v2 + with: + token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} + - run: doctl kubernetes cluster kubeconfig save ${{ secrets.DIGITALOCEAN_CLUSTER_ID }} + - run: kubectl rollout restart deployment expiration-depl From 26bd96caa2f043b086c9a39d5f04b95ef70f6b6a Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Sun, 29 Oct 2023 13:54:50 +0530 Subject: [PATCH 4/6] Configured CD for Orders Service. --- .../CD - Deploy - Orders Service.yml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/CD - Deploy - Orders Service.yml diff --git a/.github/workflows/CD - Deploy - Orders Service.yml b/.github/workflows/CD - Deploy - Orders Service.yml new file mode 100644 index 0000000..04dd690 --- /dev/null +++ b/.github/workflows/CD - Deploy - Orders Service.yml @@ -0,0 +1,31 @@ +# ========================================= CD - Deploy - Orders Service ========================================= + +name: CD - Deploy - Orders Service + +on: + push: + branches: + - production + paths: + - "orders/**" + +jobs: + Orders-Service-CD-Pipeline: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + # Build Image and push to Docker registry + - run: cd orders && docker build -t alwinsimon/bookmyseat-orders . + - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + - run: docker push alwinsimon/bookmyseat-orders + + # Restart Deployment in K8s cluster deployed in Digital Ocean + - uses: digitalocean/action-doctl@v2 + with: + token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} + - run: doctl kubernetes cluster kubeconfig save ${{ secrets.DIGITALOCEAN_CLUSTER_ID }} + - run: kubectl rollout restart deployment orders-depl From 81b38bd2f6e20ff746e04081939d02eb1fd009e1 Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Sun, 29 Oct 2023 13:56:20 +0530 Subject: [PATCH 5/6] Configured CD for Payments Service. --- .../CD - Deploy - Payments Service.yml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/CD - Deploy - Payments Service.yml diff --git a/.github/workflows/CD - Deploy - Payments Service.yml b/.github/workflows/CD - Deploy - Payments Service.yml new file mode 100644 index 0000000..65be0c7 --- /dev/null +++ b/.github/workflows/CD - Deploy - Payments Service.yml @@ -0,0 +1,31 @@ +# ========================================= CD - Deploy - Payments Service ========================================= + +name: CD - Deploy - Payments Service + +on: + push: + branches: + - production + paths: + - "payments/**" + +jobs: + Payments-Service-CD-Pipeline: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + # Build Image and push to Docker registry + - run: cd payments && docker build -t alwinsimon/bookmyseat-payments . + - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + - run: docker push alwinsimon/bookmyseat-payments + + # Restart Deployment in K8s cluster deployed in Digital Ocean + - uses: digitalocean/action-doctl@v2 + with: + token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} + - run: doctl kubernetes cluster kubeconfig save ${{ secrets.DIGITALOCEAN_CLUSTER_ID }} + - run: kubectl rollout restart deployment payments-depl From 4aee11b12a71564a265ca098cfc134ca75b5d2f5 Mon Sep 17 00:00:00 2001 From: "Dr. Alwin Simon" <003alwin@gmail.com> Date: Sun, 29 Oct 2023 13:57:44 +0530 Subject: [PATCH 6/6] Configured CD for Tickets Service. --- .../CD - Deploy - Tickets Service.yml | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/CD - Deploy - Tickets Service.yml diff --git a/.github/workflows/CD - Deploy - Tickets Service.yml b/.github/workflows/CD - Deploy - Tickets Service.yml new file mode 100644 index 0000000..d54ba7d --- /dev/null +++ b/.github/workflows/CD - Deploy - Tickets Service.yml @@ -0,0 +1,31 @@ +# ========================================= CD - Deploy - Tickets Service ========================================= + +name: CD - Deploy - Tickets Service + +on: + push: + branches: + - production + paths: + - "tickets/**" + +jobs: + Tickets-Service-CD-Pipeline: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + # Build Image and push to Docker registry + - run: cd tickets && docker build -t alwinsimon/bookmyseat-tickets . + - run: docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }} + - run: docker push alwinsimon/bookmyseat-tickets + + # Restart Deployment in K8s cluster deployed in Digital Ocean + - uses: digitalocean/action-doctl@v2 + with: + token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }} + - run: doctl kubernetes cluster kubeconfig save ${{ secrets.DIGITALOCEAN_CLUSTER_ID }} + - run: kubectl rollout restart deployment tickets-depl