From 43872375b6a75f7beeafd932b8b921053469fda8 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Thu, 11 Dec 2025 10:17:20 +0530 Subject: [PATCH 01/24] Change maintainer from SanthoshNC to Vijayraj --- Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..cbf67a7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM python:3.14.2-alpine3.22 +LABEL version="1.0" +MAINTAINER Vijayraj +ENV MY_APP="hello-world-python" +RUN mkdir /app +WORKDIR /app +COPY . /app +EXPOSE 8080 +CMD ["python3", "app.py"] From b867d6b3e651f14aee4ba16ffd4a33829f687043 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Thu, 11 Dec 2025 10:34:09 +0530 Subject: [PATCH 02/24] Create docker-ci.yml --- .github/workflows/docker-ci.yml | 1 + 1 file changed, 1 insertion(+) create mode 100644 .github/workflows/docker-ci.yml diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.github/workflows/docker-ci.yml @@ -0,0 +1 @@ + From 4a7e89dffb21ed12889670104a2fbc692d5e5e84 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Thu, 11 Dec 2025 10:44:01 +0530 Subject: [PATCH 03/24] Add Docker CI Pipeline workflow --- .github/workflows/docker-ci.yml | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 8b13789..aaa27f4 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -1 +1,36 @@ +name: Docker CI Pipeline +run-name: ${{ github.actor }} is running out Docker CI Pipeline 🚀 + +on: [push] + +jobs: + + hello-world-job: + + runs-on: ubuntu-latest + + steps: + + - name: Clone the code + + uses: actions/checkout@v6 + + - name: Build the image + + run: docker build -t ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v1 . + + - name: Login to Docker Hub + + uses: docker/login-action@v3 + + with: + + username: ${{ vars.DOCKERHUB_USERNAME }} + + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Push the image + + run: docker push ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v1 + From 8684ce833803927ea4f522317456d79e822bd5a7 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Thu, 11 Dec 2025 11:05:06 +0530 Subject: [PATCH 04/24] Update docker-ci.yml --- .github/workflows/docker-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index aaa27f4..53c36b3 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -18,7 +18,7 @@ jobs: - name: Build the image - run: docker build -t ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v1 . + run: docker build -t ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 . - name: Login to Docker Hub @@ -32,5 +32,5 @@ jobs: - name: Push the image - run: docker push ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v1 + run: docker push ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 From d80f5ad8235dfad75f04d72df990511c12f32d59 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Thu, 11 Dec 2025 11:09:03 +0530 Subject: [PATCH 05/24] Update Docker Hub secret from DOCKERHUB_TOKEN to DOCKERHUB_PASSWORD --- .github/workflows/docker-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 53c36b3..5c83c79 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -28,7 +28,7 @@ jobs: username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Push the image From a05faa82a7b9050a6d658462c648f093e2884361 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Thu, 11 Dec 2025 11:10:51 +0530 Subject: [PATCH 06/24] Update greeting message in app.py --- app.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app.py b/app.py index d3725f0..ab959e6 100644 --- a/app.py +++ b/app.py @@ -16,7 +16,7 @@ def do_GET(self): \____\_______/ -Hello from Docker! +Hello from Docker! - Vijayraj ''') def run(): From 77da70313fbc4eb8d5b1d62cb29343df421581d8 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Thu, 11 Dec 2025 11:44:34 +0530 Subject: [PATCH 07/24] Update docker-ci.yml --- .github/workflows/docker-ci.yml | 94 +++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 5c83c79..b4bdc04 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -33,4 +33,98 @@ jobs: - name: Push the image run: docker push ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 + + Palanisamy, Deepika has temporarily joined the chat. + + +Arul, Dilip Nelson A has temporarily joined the chat. + + +Kumar, Bhavya has temporarily joined the chat. + + +Murugan, Nimaleshwaran has temporarily joined the chat. + + +Hi, Good Morning +Santhosh NC Tejaswini-SkillUpRight +Could you please provide access to the recordings? + +Team. we will start the session by 9:45AM + +Kumar, Bhavya (External) +Hi, Good Morning Santhosh NC Tejaswini-SkillUpRight Could you please provide access to the recordings? +Recording will be shared to L&D team on last day of training, as we are not allowed to share anything with participants directly. + +Hi Santhosh, All, Good Morning. +Just joined + +https://github.com/dockersamples/helloworld-demo-python + +Raise a PR - by updating the name in app.py + +FROM python:3.14.2-alpine3.22 + +LABEL version="1.0" + +MAINTAINER SanthoshNC + +ENV MY_APP="hello-world-python" + +RUN mkdir /app + +WORKDIR /app + +COPY . /app + +EXPOSE 8080 + +CMD ["python3", "app.py"] + +Dockerfile + +sudo docker build -t username/imagename + +docker push username/imagename + +name: Docker CI Pipeline + +run-name: ${{ github.actor }} is running out Docker CI Pipeline 🚀 + +on: [push] + +jobs: + + hello-world-job: + + runs-on: ubuntu-latest + + steps: + + - name: Clone the code + + uses: actions/checkout@v6 + + - name: Build the image + + run: docker build -t ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v1 . + + - name: Login to Docker Hub + + uses: docker/login-action@v3 + + with: + + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Push the image + run: docker push ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v1 + + - name: Run the container + run: docker run --name helloworld-demo-python -itd -p 8080:8080 ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v1 + + - name: View the container + run: docker ps + From 042e631210a3140469252cd4a92448055acb2307 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Thu, 11 Dec 2025 11:45:45 +0530 Subject: [PATCH 08/24] Change Docker image version to v4 in CI pipeline Updated Docker CI pipeline to use version 4 of the image. --- .github/workflows/docker-ci.yml | 91 ++------------------------------- 1 file changed, 3 insertions(+), 88 deletions(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index b4bdc04..f99b0da 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -34,97 +34,12 @@ jobs: run: docker push ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 - Palanisamy, Deepika has temporarily joined the chat. - - -Arul, Dilip Nelson A has temporarily joined the chat. - - -Kumar, Bhavya has temporarily joined the chat. - - -Murugan, Nimaleshwaran has temporarily joined the chat. - - -Hi, Good Morning -Santhosh NC Tejaswini-SkillUpRight -Could you please provide access to the recordings? - -Team. we will start the session by 9:45AM - -Kumar, Bhavya (External) -Hi, Good Morning Santhosh NC Tejaswini-SkillUpRight Could you please provide access to the recordings? -Recording will be shared to L&D team on last day of training, as we are not allowed to share anything with participants directly. - -Hi Santhosh, All, Good Morning. -Just joined - -https://github.com/dockersamples/helloworld-demo-python - -Raise a PR - by updating the name in app.py - -FROM python:3.14.2-alpine3.22 - -LABEL version="1.0" - -MAINTAINER SanthoshNC - -ENV MY_APP="hello-world-python" - -RUN mkdir /app - -WORKDIR /app - -COPY . /app - -EXPOSE 8080 - -CMD ["python3", "app.py"] - -Dockerfile - -sudo docker build -t username/imagename - -docker push username/imagename - -name: Docker CI Pipeline - -run-name: ${{ github.actor }} is running out Docker CI Pipeline 🚀 - -on: [push] - -jobs: - - hello-world-job: - - runs-on: ubuntu-latest - - steps: - - - name: Clone the code - - uses: actions/checkout@v6 - - - name: Build the image - - run: docker build -t ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v1 . - - - name: Login to Docker Hub - - uses: docker/login-action@v3 - - with: - - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Push the image - run: docker push ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v1 - - name: Run the container - run: docker run --name helloworld-demo-python -itd -p 8080:8080 ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v1 + run: docker run --name helloworld-demo-python -itd -p 8080:8080 ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 - name: View the container run: docker ps + - name: View the container + run: docker ps From 7a41bd0490fb53d4f34bf318717b4b7c01080710 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Thu, 11 Dec 2025 15:08:42 +0530 Subject: [PATCH 09/24] Refactor Docker CI workflow for clarity Removed unnecessary lines for cleaner workflow. --- .github/workflows/docker-ci.yml | 8 -------- 1 file changed, 8 deletions(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index f99b0da..43f89fe 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -13,25 +13,17 @@ jobs: steps: - name: Clone the code - uses: actions/checkout@v6 - - name: Build the image - run: docker build -t ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 . - - name: Login to Docker Hub - uses: docker/login-action@v3 with: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - name: Push the image - run: docker push ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 - name: Run the container From eb57287feee93f610c72e004da41ba6bf3a7baa7 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Fri, 12 Dec 2025 10:00:45 +0530 Subject: [PATCH 10/24] Remove duplicate step to view Docker container --- .github/workflows/docker-ci.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 43f89fe..0dec68c 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -31,7 +31,5 @@ jobs: - name: View the container run: docker ps - - name: View the container - run: docker ps From cccde9f819c6c8030af701fc06545e5f89de54fc Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Fri, 12 Dec 2025 10:19:30 +0530 Subject: [PATCH 11/24] Remove extra line in Docker CI workflow --- .github/workflows/docker-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 0dec68c..8511952 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -9,7 +9,6 @@ jobs: hello-world-job: runs-on: ubuntu-latest - steps: - name: Clone the code From 8a4a3b43c3eeccf37aec3ad7d795489aa7dc2535 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Fri, 12 Dec 2025 11:14:28 +0530 Subject: [PATCH 12/24] Enhance CI workflow with Kubernetes deployment steps Added Kubernetes implementation steps to the CI workflow, including deployment and service creation. --- .github/workflows/docker-ci.yml | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 8511952..38bed73 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -28,7 +28,27 @@ jobs: - name: Run the container run: docker run --name helloworld-demo-python -itd -p 8080:8080 ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 - - name: View the container + - name: View the container run: docker ps + k8s-implementation: + needs: docker-build-push + runs-on: ubuntu-latest + steps: + - name: Clone the code + uses: actions/checkout@v6 + + - name: Start minikube + uses: medyagh/setup-minikube@latest + - name: Try the cluster! + run: kubectl get pods -A + - name: Create Deployment and Service + run: | + kubectl apply -f k8s/deployment.yaml + kubectl apply -f k8s/service.yaml + kubectl wait --for=condition=ready pod -l app=hello-world-python + - name: View Deployment and Service + run: | + kubectl get deployments + kubectl get service From 096432eda5c2716373e5b8bc807675a960709fbb Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Fri, 12 Dec 2025 11:15:04 +0530 Subject: [PATCH 13/24] Remove empty line in Docker CI workflow --- .github/workflows/docker-ci.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 38bed73..2c6363c 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -10,7 +10,6 @@ jobs: runs-on: ubuntu-latest steps: - - name: Clone the code uses: actions/checkout@v6 - name: Build the image From 6fbd12b08a63f8bd94e6a424fcea1780ee3028ac Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Fri, 12 Dec 2025 11:15:46 +0530 Subject: [PATCH 14/24] Update Docker CI workflow to use checkout action v6 --- .github/workflows/docker-ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 2c6363c..38bed73 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -10,6 +10,7 @@ jobs: runs-on: ubuntu-latest steps: + - name: Clone the code uses: actions/checkout@v6 - name: Build the image From 2a01e8dad2f11301365f632784d937e289eaab4f Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Fri, 12 Dec 2025 11:17:10 +0530 Subject: [PATCH 15/24] Update Docker CI pipeline for new image and jobs --- .github/workflows/docker-ci.yml | 60 +++++++++++++++++++++++---------- 1 file changed, 42 insertions(+), 18 deletions(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 38bed73..af9fcfe 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -1,54 +1,78 @@ name: Docker CI Pipeline - + run-name: ${{ github.actor }} is running out Docker CI Pipeline 🚀 - + on: [push] - + jobs: - + hello-world-job: - + runs-on: ubuntu-latest + steps: - + - name: Clone the code + uses: actions/checkout@v6 + - name: Build the image - run: docker build -t ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 . + + run: docker build -t ${{ vars.DOCKERHUB_USERNAME }}/helloworld-github-python:v1 . + - name: Login to Docker Hub + uses: docker/login-action@v3 - + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} - + - name: Push the image - run: docker push ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 - + + run: docker push ${{ vars.DOCKERHUB_USERNAME }}/helloworld-github-python:v1 - name: Run the container - run: docker run --name helloworld-demo-python -itd -p 8080:8080 ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 - - - name: View the container + + run: docker run --name helloworld-demo-python -itd -p 8080:8080 ${{ vars.DOCKERHUB_USERNAME }}/helloworld-github-python:v1 + + - name: View the container + run: docker ps - k8s-implementation: - needs: docker-build-push + k8s-implementation: + + needs: hello-world-job + runs-on: ubuntu-latest + steps: + - name: Clone the code - uses: actions/checkout@v6 + uses: actions/checkout@v6 - name: Start minikube + uses: medyagh/setup-minikube@latest + - name: Try the cluster! - run: kubectl get pods -A + run: kubectl get pods -A - name: Create Deployment and Service + run: | + kubectl apply -f k8s/deployment.yaml + kubectl apply -f k8s/service.yaml + kubectl wait --for=condition=ready pod -l app=hello-world-python + - name: View Deployment and Service + run: | + kubectl get deployments + kubectl get service From 0778d4aac75d01bdda4aad22ec658522cba912a9 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Fri, 12 Dec 2025 11:37:42 +0530 Subject: [PATCH 16/24] Update Kubernetes deployment file reference --- .github/workflows/docker-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index af9fcfe..ba5b3cf 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -63,7 +63,7 @@ jobs: run: | - kubectl apply -f k8s/deployment.yaml + kubectl apply -f k8s/nginx-deployment.yaml kubectl apply -f k8s/service.yaml From 22edbb681dee7224fc2bff30b9f962c764a9c30d Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Fri, 12 Dec 2025 11:41:36 +0530 Subject: [PATCH 17/24] Update docker-ci.yml --- .github/workflows/docker-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index ba5b3cf..b03b827 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -67,7 +67,7 @@ jobs: kubectl apply -f k8s/service.yaml - kubectl wait --for=condition=ready pod -l app=hello-world-python + kubectl wait --for=condition=ready pod -l app=helloworld-demo-python - name: View Deployment and Service From 462e90d66fd9b1bb323977e8afb14b746e7f9e65 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Fri, 12 Dec 2025 11:44:09 +0530 Subject: [PATCH 18/24] Update docker-ci.yml --- .github/workflows/docker-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index b03b827..b50c4df 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -63,9 +63,9 @@ jobs: run: | - kubectl apply -f k8s/nginx-deployment.yaml + kubectl apply -f nginx-deployment.yaml - kubectl apply -f k8s/service.yaml + kubectl apply -f service.yaml kubectl wait --for=condition=ready pod -l app=helloworld-demo-python From b75301bb295ec644e545b6180a844e471c4ecc43 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Fri, 12 Dec 2025 11:53:31 +0530 Subject: [PATCH 19/24] Update docker-ci.yml --- .github/workflows/docker-ci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index b50c4df..7ce1c11 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -67,7 +67,7 @@ jobs: kubectl apply -f service.yaml - kubectl wait --for=condition=ready pod -l app=helloworld-demo-python + kubectl wait --for=condition=ready pod -l app=hello-world-python - name: View Deployment and Service @@ -76,3 +76,10 @@ jobs: kubectl get deployments kubectl get service + + - name: Test service URLs + run: | + minikube service list + minikube service hello-world-service --url + echo "------------------opening the service------------------" + curl $(minikube service hello-world-service --url) From 90edc40b5015699c1a1f03a82ed18a7e3b0ebbe1 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Fri, 12 Dec 2025 11:59:26 +0530 Subject: [PATCH 20/24] Refactor Docker CI pipeline and Kubernetes setup Updated Docker CI pipeline to use new image names and versions. Adjusted Kubernetes deployment and service configuration. --- .github/workflows/docker-ci.yml | 72 +++++++++++---------------------- 1 file changed, 24 insertions(+), 48 deletions(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 7ce1c11..d4289a1 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -1,85 +1,61 @@ name: Docker CI Pipeline - + run-name: ${{ github.actor }} is running out Docker CI Pipeline 🚀 - + on: [push] - + jobs: - + hello-world-job: - + runs-on: ubuntu-latest - steps: - + - name: Clone the code - uses: actions/checkout@v6 - - name: Build the image - - run: docker build -t ${{ vars.DOCKERHUB_USERNAME }}/helloworld-github-python:v1 . - + run: docker build -t ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 . - name: Login to Docker Hub - uses: docker/login-action@v3 - + with: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - + - name: Push the image - - run: docker push ${{ vars.DOCKERHUB_USERNAME }}/helloworld-github-python:v1 + run: docker push ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 + - name: Run the container - - run: docker run --name helloworld-demo-python -itd -p 8080:8080 ${{ vars.DOCKERHUB_USERNAME }}/helloworld-github-python:v1 - - - name: View the container - + run: docker run --name helloworld-demo-python -itd -p 8080:8080 ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 + + - name: View the container run: docker ps - k8s-implementation: - - needs: hello-world-job - + k8s-implementation: + needs: docker-build-push runs-on: ubuntu-latest - steps: - - name: Clone the code - uses: actions/checkout@v6 - - name: Start minikube + - name: Start minikube uses: medyagh/setup-minikube@latest - - name: Try the cluster! - run: kubectl get pods -A - - name: Create Deployment and Service + - name: Create Deployment and Service run: | - - kubectl apply -f nginx-deployment.yaml - - kubectl apply -f service.yaml - + kubectl apply -f k8s/deployment.yaml + kubectl apply -f k8s/service.yaml kubectl wait --for=condition=ready pod -l app=hello-world-python - - name: View Deployment and Service - run: | - kubectl get deployments - kubectl get service - name: Test service URLs run: | - minikube service list - minikube service hello-world-service --url - echo "------------------opening the service------------------" - curl $(minikube service hello-world-service --url) + minikube service list + minikube service hello-world-service --url + echo "------------------opening the service------------------" + curl $(minikube service hello-world-service --url) From 883d2444ab3b4b1ad835648130831592667f218c Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Fri, 12 Dec 2025 12:07:11 +0530 Subject: [PATCH 21/24] Update docker-ci.yml --- .github/workflows/docker-ci.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index d4289a1..8769012 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -30,8 +30,9 @@ jobs: - name: View the container run: docker ps - - k8s-implementation: + + + k8s-implementation: needs: docker-build-push runs-on: ubuntu-latest steps: From a08581b77174859d754c0d8cd00136bb94e5b357 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Fri, 12 Dec 2025 12:08:23 +0530 Subject: [PATCH 22/24] Update docker-ci.yml --- .github/workflows/docker-ci.yml | 96 +++++++++++++-------------------- 1 file changed, 37 insertions(+), 59 deletions(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 8769012..9924c06 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -1,62 +1,40 @@ -name: Docker CI Pipeline - -run-name: ${{ github.actor }} is running out Docker CI Pipeline 🚀 - -on: [push] - +--- +name: 'Docker CI Pipeline' +run-name: '${{ github.actor }} is running out Docker CI Pipeline 🚀' +'on': + - 'push' jobs: - hello-world-job: - - runs-on: ubuntu-latest + runs-on: 'ubuntu-latest' steps: - - - name: Clone the code - uses: actions/checkout@v6 - - name: Build the image - run: docker build -t ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 . - - name: Login to Docker Hub - uses: docker/login-action@v3 - - with: - username: ${{ vars.DOCKERHUB_USERNAME }} - password: ${{ secrets.DOCKERHUB_PASSWORD }} - - - name: Push the image - run: docker push ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 - - - name: Run the container - run: docker run --name helloworld-demo-python -itd -p 8080:8080 ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 - - - name: View the container - run: docker ps - - - k8s-implementation: - needs: docker-build-push - runs-on: ubuntu-latest - steps: - - name: Clone the code - uses: actions/checkout@v6 - - - name: Start minikube - uses: medyagh/setup-minikube@latest - - name: Try the cluster! - run: kubectl get pods -A - - - name: Create Deployment and Service - run: | - kubectl apply -f k8s/deployment.yaml - kubectl apply -f k8s/service.yaml - kubectl wait --for=condition=ready pod -l app=hello-world-python - - name: View Deployment and Service - run: | - kubectl get deployments - kubectl get service - - - name: Test service URLs - run: | - minikube service list - minikube service hello-world-service --url - echo "------------------opening the service------------------" - curl $(minikube service hello-world-service --url) + - name: 'Clone the code' + uses: 'actions/checkout@v6' + - name: 'Build the image' + run: 'docker build -t ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 .' + - name: 'Login to Docker Hub' + uses: 'docker/login-action@v3' + with: + username: '${{ vars.DOCKERHUB_USERNAME }}' + password: '${{ secrets.DOCKERHUB_PASSWORD }}' + - name: 'Push the image' + run: 'docker push ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4' + - name: 'Run the container' + run: 'docker run --name helloworld-demo-python -itd -p 8080:8080 ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4' + - name: 'View the container' + run: 'docker ps' + k8s-implementation: + needs: 'docker-build-push' + runs-on: 'ubuntu-latest' + steps: + - name: 'Clone the code' + uses: 'actions/checkout@v6' + - name: 'Start minikube' + uses: 'medyagh/setup-minikube@latest' + - name: 'Try the cluster!' + run: 'kubectl get pods -A' + - name: 'Create Deployment and Service' + run: "kubectl apply -f k8s/deployment.yaml\nkubectl apply -f k8s/service.yaml\nkubectl wait --for=condition=ready pod -l app=hello-world-python\n" + - name: 'View Deployment and Service' + run: "kubectl get deployments\nkubectl get service\n" + - name: 'Test service URLs' + run: "minikube service list\nminikube service hello-world-service --url\necho \"------------------opening the service------------------\"\ncurl $(minikube service hello-world-service --url)\n" From 91612356c9e5e438d5175220681858303595d4a2 Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Fri, 12 Dec 2025 12:11:38 +0530 Subject: [PATCH 23/24] Update docker-ci.yml --- .github/workflows/docker-ci.yml | 93 ++++++++++++++++++++------------- 1 file changed, 57 insertions(+), 36 deletions(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 9924c06..5a450a3 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -1,40 +1,61 @@ ---- -name: 'Docker CI Pipeline' -run-name: '${{ github.actor }} is running out Docker CI Pipeline 🚀' -'on': - - 'push' +name: Docker CI Pipeline +run-name: ${{ github.actor }} is running our Docker CI Pipeline 🚀 + +on: + push: + jobs: hello-world-job: - runs-on: 'ubuntu-latest' + runs-on: ubuntu-latest steps: - - name: 'Clone the code' - uses: 'actions/checkout@v6' - - name: 'Build the image' - run: 'docker build -t ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 .' - - name: 'Login to Docker Hub' - uses: 'docker/login-action@v3' + - name: Clone the code + uses: actions/checkout@v4 + + - name: Build the image + run: docker build -t ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 . + + - name: Login to Docker Hub + uses: docker/login-action@v3 with: - username: '${{ vars.DOCKERHUB_USERNAME }}' - password: '${{ secrets.DOCKERHUB_PASSWORD }}' - - name: 'Push the image' - run: 'docker push ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4' - - name: 'Run the container' - run: 'docker run --name helloworld-demo-python -itd -p 8080:8080 ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4' - - name: 'View the container' - run: 'docker ps' - k8s-implementation: - needs: 'docker-build-push' - runs-on: 'ubuntu-latest' - steps: - - name: 'Clone the code' - uses: 'actions/checkout@v6' - - name: 'Start minikube' - uses: 'medyagh/setup-minikube@latest' - - name: 'Try the cluster!' - run: 'kubectl get pods -A' - - name: 'Create Deployment and Service' - run: "kubectl apply -f k8s/deployment.yaml\nkubectl apply -f k8s/service.yaml\nkubectl wait --for=condition=ready pod -l app=hello-world-python\n" - - name: 'View Deployment and Service' - run: "kubectl get deployments\nkubectl get service\n" - - name: 'Test service URLs' - run: "minikube service list\nminikube service hello-world-service --url\necho \"------------------opening the service------------------\"\ncurl $(minikube service hello-world-service --url)\n" + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_PASSWORD }} + + - name: Push the image + run: docker push ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 + + - name: Run the container + run: docker run --name helloworld-demo-python -itd -p 8080:8080 ${{ vars.DOCKERHUB_USERNAME }}/helloworld-demo-python:v4 + + - name: View the container + run: docker ps + + k8s-implementation: + needs: hello-world-job + runs-on: ubuntu-latest + steps: + - name: Clone the code + uses: actions/checkout@v4 + + - name: Start minikube + uses: medyagh/setup-minikube@latest + + - name: Try the cluster + run: kubectl get pods -A + + - name: Create Deployment and Service + run: | + kubectl apply -f k8s/deployment.yaml + kubectl apply -f k8s/service.yaml + kubectl wait --for=condition=ready pod -l app=hello-world-python + + - name: View Deployment and Service + run: | + kubectl get deployments + kubectl get service + + - name: Test service URLs + run: | + minikube service list + minikube service hello-world-service --url + echo "------------------opening the service------------------" + curl "$(minikube service hello-world-service --url)" From 4be9a8bed8ae3d20e04ff7f4cec78e7db54feeea Mon Sep 17 00:00:00 2001 From: Vijayraj Palanisamy Date: Fri, 12 Dec 2025 12:14:45 +0530 Subject: [PATCH 24/24] Update docker-ci.yml --- .github/workflows/docker-ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-ci.yml b/.github/workflows/docker-ci.yml index 5a450a3..391a928 100644 --- a/.github/workflows/docker-ci.yml +++ b/.github/workflows/docker-ci.yml @@ -44,8 +44,8 @@ jobs: - name: Create Deployment and Service run: | - kubectl apply -f k8s/deployment.yaml - kubectl apply -f k8s/service.yaml + kubectl apply -f K8s/deployment.yaml + kubectl apply -f K8s/services.yaml kubectl wait --for=condition=ready pod -l app=hello-world-python - name: View Deployment and Service