From 9de4a771b2025305b64f5e19c263256ba01a548c Mon Sep 17 00:00:00 2001 From: PriyanshiNair23 <166895041+PriyanshiNair23@users.noreply.github.com> Date: Thu, 30 May 2024 11:12:41 +0530 Subject: [PATCH 01/18] Create Dockerfile --- Dockerfile | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 000000000..9452afc1a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,17 @@ +# Use the official Alpine image from the Docker Hub +FROM alpine:latest + +# Install necessary packages +RUN apk add --no-cache bash + +# Set the working directory in the container +WORKDIR /app + +# Copy the script into the container +COPY wisecow.sh . + +# Give execution rights to the script +RUN chmod +x wisecow.sh + +# Specify the command to run the script +CMD ["./wisecow.sh"] From c0196904200e2a0765700f15ba38fdbd733964b4 Mon Sep 17 00:00:00 2001 From: PriyanshiNair23 <166895041+PriyanshiNair23@users.noreply.github.com> Date: Thu, 30 May 2024 11:19:06 +0530 Subject: [PATCH 02/18] Create deployment.yaml --- k8s/deployment.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 k8s/deployment.yaml diff --git a/k8s/deployment.yaml b/k8s/deployment.yaml new file mode 100644 index 000000000..da08b65d7 --- /dev/null +++ b/k8s/deployment.yaml @@ -0,0 +1,19 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: wisecow-deployment +spec: + replicas: 2 + selector: + matchLabels: + app: wisecow + template: + metadata: + labels: + app: wisecow + spec: + containers: + - name: wisecow + image: priyanshiorufy/wisecow:latest + ports: + - containerPort: 80 From ec1ebf900b155f961f2bc119bb3c6b8c3d9b4b7f Mon Sep 17 00:00:00 2001 From: PriyanshiNair23 <166895041+PriyanshiNair23@users.noreply.github.com> Date: Thu, 30 May 2024 11:19:37 +0530 Subject: [PATCH 03/18] Create service.yaml --- k8s/service.yaml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 k8s/service.yaml diff --git a/k8s/service.yaml b/k8s/service.yaml new file mode 100644 index 000000000..c311483ec --- /dev/null +++ b/k8s/service.yaml @@ -0,0 +1,11 @@ +apiVersion: v1 +kind: Service +metadata: + name: wisecow-service +spec: + type: LoadBalancer + ports: + - port: 80 + targetPort: 80 + selector: + app: wisecow From 422f063eee6cc44a00f562187103ab212aa129fc Mon Sep 17 00:00:00 2001 From: PriyanshiNair23 <166895041+PriyanshiNair23@users.noreply.github.com> Date: Thu, 30 May 2024 11:27:07 +0530 Subject: [PATCH 04/18] Create ci-cd.yml --- .github/workflows/ci-cd.yml | 60 +++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/ci-cd.yml diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml new file mode 100644 index 000000000..96d7b26fe --- /dev/null +++ b/.github/workflows/ci-cd.yml @@ -0,0 +1,60 @@ +name: CI/CD Pipeline + +on: + push: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to Docker Hub + uses: docker/login-action@v1 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and push Docker image + uses: docker/build-push-action@v2 + with: + context: . + push: true + tags: /wisecow:latest + + deploy: + needs: build + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Set up kubectl + uses: azure/setup-kubectl@v1 + with: + version: 'v1.20.0' + + - name: Authenticate with Azure + uses: azure/login@v1 + with: + username: ${{ secrets.AZURE_USERNAME }} + password: ${{ secrets.AZURE_PASSWORD }} + + - name: Set up AKS credentials + run: | + az aks get-credentials --resource-group --name + + - name: Deploy to AKS + run: | + kubectl apply -f k8s/deployment.yaml + kubectl apply -f k8s/service.yaml + kubectl apply -f k8s/ingress.yaml + kubectl apply -f k8s/cert-manager.yaml From 273f7495dd834365912ebdc68e6829d30aa9154a Mon Sep 17 00:00:00 2001 From: PriyanshiNair23 <166895041+PriyanshiNair23@users.noreply.github.com> Date: Thu, 30 May 2024 11:42:15 +0530 Subject: [PATCH 05/18] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 96d7b26fe..957ab1b0d 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -50,7 +50,7 @@ jobs: - name: Set up AKS credentials run: | - az aks get-credentials --resource-group --name + az aks get-credentials --resource-group KubernetesTask --name accuknoxTask - name: Deploy to AKS run: | From 2dff54758c7d7c8a95347b1ec720390a65a25d97 Mon Sep 17 00:00:00 2001 From: PriyanshiNair23 <166895041+PriyanshiNair23@users.noreply.github.com> Date: Thu, 30 May 2024 11:55:46 +0530 Subject: [PATCH 06/18] Create ingress.yaml --- .github/workflows/ingress.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/ingress.yaml diff --git a/.github/workflows/ingress.yaml b/.github/workflows/ingress.yaml new file mode 100644 index 000000000..5afc79c18 --- /dev/null +++ b/.github/workflows/ingress.yaml @@ -0,0 +1,22 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: wisecow-ingress + annotations: + cert-manager.io/cluster-issuer: "letsencrypt" +spec: + tls: + - hosts: + - example.com + secretName: wisecow-tls + rules: + - host: example.com + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: wisecow-service + port: + number: 80 From 271a7688489449c9eafc86d4dde5646e8e73ad63 Mon Sep 17 00:00:00 2001 From: PriyanshiNair23 <166895041+PriyanshiNair23@users.noreply.github.com> Date: Thu, 30 May 2024 11:57:37 +0530 Subject: [PATCH 07/18] Delete .github/workflows/ingress.yaml --- .github/workflows/ingress.yaml | 22 ---------------------- 1 file changed, 22 deletions(-) delete mode 100644 .github/workflows/ingress.yaml diff --git a/.github/workflows/ingress.yaml b/.github/workflows/ingress.yaml deleted file mode 100644 index 5afc79c18..000000000 --- a/.github/workflows/ingress.yaml +++ /dev/null @@ -1,22 +0,0 @@ -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: wisecow-ingress - annotations: - cert-manager.io/cluster-issuer: "letsencrypt" -spec: - tls: - - hosts: - - example.com - secretName: wisecow-tls - rules: - - host: example.com - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: wisecow-service - port: - number: 80 From a32c82cd2e14517f869780d24280bef61371bf93 Mon Sep 17 00:00:00 2001 From: PriyanshiNair23 <166895041+PriyanshiNair23@users.noreply.github.com> Date: Thu, 30 May 2024 11:58:22 +0530 Subject: [PATCH 08/18] Create ingress.yaml --- k8s/ingress.yaml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 k8s/ingress.yaml diff --git a/k8s/ingress.yaml b/k8s/ingress.yaml new file mode 100644 index 000000000..5afc79c18 --- /dev/null +++ b/k8s/ingress.yaml @@ -0,0 +1,22 @@ +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: wisecow-ingress + annotations: + cert-manager.io/cluster-issuer: "letsencrypt" +spec: + tls: + - hosts: + - example.com + secretName: wisecow-tls + rules: + - host: example.com + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: wisecow-service + port: + number: 80 From c0a1bdec21f1072e2702d4dfddc0f2801c3c5e46 Mon Sep 17 00:00:00 2001 From: PriyanshiNair23 <166895041+PriyanshiNair23@users.noreply.github.com> Date: Thu, 30 May 2024 11:59:06 +0530 Subject: [PATCH 09/18] Create cert-manager.yaml --- k8s/cert-manager.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 k8s/cert-manager.yaml diff --git a/k8s/cert-manager.yaml b/k8s/cert-manager.yaml new file mode 100644 index 000000000..df6419a8e --- /dev/null +++ b/k8s/cert-manager.yaml @@ -0,0 +1,14 @@ +apiVersion: cert-manager.io/v1 +kind: ClusterIssuer +metadata: + name: letsencrypt +spec: + acme: + server: https://acme-v02.api.letsencrypt.org/directory + email: priyanshinair.work@gmail.com + privateKeySecretRef: + name: letsencrypt + solvers: + - http01: + ingress: + class: nginx From b6164ee88e6d282dfa007af63910064167425fc4 Mon Sep 17 00:00:00 2001 From: PriyanshiNair23 <166895041+PriyanshiNair23@users.noreply.github.com> Date: Thu, 30 May 2024 12:24:09 +0530 Subject: [PATCH 10/18] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 957ab1b0d..f9158d36d 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -27,7 +27,7 @@ jobs: with: context: . push: true - tags: /wisecow:latest + tags: ${{secretzs.DOCKER_USERNAME}}/wisecow:latest deploy: needs: build From df44f37911368d5559a8eb85f65e101d1fe63c51 Mon Sep 17 00:00:00 2001 From: PriyanshiNair23 <166895041+PriyanshiNair23@users.noreply.github.com> Date: Sat, 1 Jun 2024 12:20:22 +0530 Subject: [PATCH 11/18] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 49 +++++++++++++++++-------------------- 1 file changed, 22 insertions(+), 27 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index f9158d36d..5dc4f23a0 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -1,9 +1,9 @@ -name: CI/CD Pipeline +name: Build and Deploy on: push: branches: - - main + - main # or any other branch you want to trigger the workflow jobs: build: @@ -11,23 +11,23 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - name: Login to Docker Hub - uses: docker/login-action@v1 + uses: docker/login-action@v3 with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} + username: priyanshiorufy + password: orufy@123 - name: Build and push Docker image - uses: docker/build-push-action@v2 + uses: docker/build-push-action@v5 with: context: . push: true - tags: ${{secretzs.DOCKER_USERNAME}}/wisecow:latest + tags: priyanshiorufy/wisecow-app:latest deploy: needs: build @@ -35,26 +35,21 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - - name: Set up kubectl - uses: azure/setup-kubectl@v1 - with: - version: 'v1.20.0' - - - name: Authenticate with Azure - uses: azure/login@v1 - with: - username: ${{ secrets.AZURE_USERNAME }} - password: ${{ secrets.AZURE_PASSWORD }} + - name: Install kubectl + run: | + sudo apt-get update + sudo apt-get install -y kubectl - - name: Set up AKS credentials + - name: Configure kubectl + env: + KUBECONFIG: ${{ secrets.KUBECONFIG }} run: | - az aks get-credentials --resource-group KubernetesTask --name accuknoxTask + mkdir -p $HOME/.kube + echo "${{ secrets.KUBECONFIG }}" > $HOME/.kube/config - - name: Deploy to AKS + - name: Deploy to Kubernetes run: | - kubectl apply -f k8s/deployment.yaml - kubectl apply -f k8s/service.yaml - kubectl apply -f k8s/ingress.yaml - kubectl apply -f k8s/cert-manager.yaml + kubectl set image deployment/wisecow-deployment wisecow-deployment=priyanshiorufy/wisecow-app:latest + kubectl rollout status deployment/wisecow-deployment From 9ccb7b1c97c57d44dc6f25ec32d39128e2bceb88 Mon Sep 17 00:00:00 2001 From: PriyanshiNair23 <166895041+PriyanshiNair23@users.noreply.github.com> Date: Sat, 1 Jun 2024 12:36:38 +0530 Subject: [PATCH 12/18] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 43 +++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 5dc4f23a0..5aada5f63 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -1,9 +1,11 @@ -name: Build and Deploy +name: CI/CD Pipeline on: push: branches: - - main # or any other branch you want to trigger the workflow + - main + + jobs: build: @@ -11,45 +13,40 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v2 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v3 + uses: docker/setup-buildx-action@v1 - - name: Login to Docker Hub - uses: docker/login-action@v3 - with: - username: priyanshiorufy - password: orufy@123 + - name: Log in to Docker Hub + run: echo "orufy@123" | docker login -u "priyanshiorufy" --password-stdin - name: Build and push Docker image - uses: docker/build-push-action@v5 - with: - context: . - push: true - tags: priyanshiorufy/wisecow-app:latest + run: | + + docker push wisecow-app:latest deploy: - needs: build runs-on: ubuntu-latest + needs: build steps: - name: Checkout code - uses: actions/checkout@v3 + uses: actions/checkout@v2 - - name: Install kubectl + - name: Set up kubectl run: | - sudo apt-get update - sudo apt-get install -y kubectl + curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" + chmod +x ./kubectl + mv ./kubectl /usr/local/bin/kubectl - name: Configure kubectl - env: - KUBECONFIG: ${{ secrets.KUBECONFIG }} run: | mkdir -p $HOME/.kube - echo "${{ secrets.KUBECONFIG }}" > $HOME/.kube/config + echo "$KUBECONFIG" | base64 --decode > $HOME/.kube/config + kubectl config view - name: Deploy to Kubernetes run: | - kubectl set image deployment/wisecow-deployment wisecow-deployment=priyanshiorufy/wisecow-app:latest + kubectl set image deployment/wisecow-deployment wisecow-deployment=wisecow-app:latest kubectl rollout status deployment/wisecow-deployment From 3056507219e7b35c5cffbb1ad609981d20ce623f Mon Sep 17 00:00:00 2001 From: PriyanshiNair23 <166895041+PriyanshiNair23@users.noreply.github.com> Date: Sat, 1 Jun 2024 12:41:42 +0530 Subject: [PATCH 13/18] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 5aada5f63..b303a4088 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -23,7 +23,7 @@ jobs: - name: Build and push Docker image run: | - + docker build -t wisecow-app . docker push wisecow-app:latest deploy: From c9469882f4b94cce84f43b1057e8873564e5e95a Mon Sep 17 00:00:00 2001 From: PriyanshiNair23 <166895041+PriyanshiNair23@users.noreply.github.com> Date: Sat, 1 Jun 2024 12:46:32 +0530 Subject: [PATCH 14/18] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 43 ++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index b303a4088..311521a21 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -1,11 +1,9 @@ -name: CI/CD Pipeline +name: Build and Deploy on: push: branches: - - main - - + - main # or any other branch you want to trigger the workflow jobs: build: @@ -13,40 +11,45 @@ jobs: steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 + uses: docker/setup-buildx-action@v3 - - name: Log in to Docker Hub - run: echo "orufy@123" | docker login -u "priyanshiorufy" --password-stdin + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: priyanshiorufy + password: orufy@123 - name: Build and push Docker image - run: | - docker build -t wisecow-app . - docker push wisecow-app:latest + uses: docker/build-push-action@v5 + with: + context: . + push: true + tags: priyanshiorufy/wisecow-app:latest deploy: - runs-on: ubuntu-latest needs: build + runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - - name: Set up kubectl + - name: Install kubectl run: | - curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl" - chmod +x ./kubectl - mv ./kubectl /usr/local/bin/kubectl + sudo apt-get update + sudo apt-get install -y kubectl - name: Configure kubectl + env: + KUBECONFIG_DATA: ${{ secrets.KUBECONFIG }} run: | mkdir -p $HOME/.kube - echo "$KUBECONFIG" | base64 --decode > $HOME/.kube/config - kubectl config view + echo "${KUBECONFIG_DATA}" | base64 --decode > $HOME/.kube/config - name: Deploy to Kubernetes run: | - kubectl set image deployment/wisecow-deployment wisecow-deployment=wisecow-app:latest + kubectl set image deployment/wisecow-deployment wisecow-deployment=priyannshiorufy/wisecow-app:latest kubectl rollout status deployment/wisecow-deployment From 67da7b898a0318eeaad5648e3016684b341c106f Mon Sep 17 00:00:00 2001 From: PriyanshiNair23 <166895041+PriyanshiNair23@users.noreply.github.com> Date: Sat, 1 Jun 2024 12:50:39 +0530 Subject: [PATCH 15/18] Update ci-cd.yml --- .github/workflows/ci-cd.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 311521a21..5f9489f08 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -47,7 +47,7 @@ jobs: KUBECONFIG_DATA: ${{ secrets.KUBECONFIG }} run: | mkdir -p $HOME/.kube - echo "${KUBECONFIG_DATA}" | base64 --decode > $HOME/.kube/config + echo "${KUBECONFIG}" | base64 --decode > $HOME/.kube/config - name: Deploy to Kubernetes run: | From 3fb17606433280855ba77ae27847ee3e23c1564d Mon Sep 17 00:00:00 2001 From: Omsudo Date: Fri, 12 Dec 2025 10:59:10 +0530 Subject: [PATCH 16/18] sdjflkjsadf --- k8s/index.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 k8s/index.js diff --git a/k8s/index.js b/k8s/index.js new file mode 100644 index 000000000..76f29b52d --- /dev/null +++ b/k8s/index.js @@ -0,0 +1 @@ +ChannelMergerNode \ No newline at end of file From 7f92e7f194adc6802ac34e719cec514510d7f430 Mon Sep 17 00:00:00 2001 From: Omsudo Date: Thu, 18 Dec 2025 16:35:40 +0530 Subject: [PATCH 17/18] OP-nt2Bo2lo --- k8s/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/k8s/index.js b/k8s/index.js index 76f29b52d..938880aff 100644 --- a/k8s/index.js +++ b/k8s/index.js @@ -1 +1,2 @@ -ChannelMergerNode \ No newline at end of file +ChannelMergerNode +nothing \ No newline at end of file From e38d1064f0401ffd523135090b8e7349f38da24a Mon Sep 17 00:00:00 2001 From: Omsudo Date: Thu, 18 Dec 2025 16:41:52 +0530 Subject: [PATCH 18/18] OP-nt2Bo2lo-new-commit --- k8s/index.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/k8s/index.js b/k8s/index.js index 938880aff..8b10ffe04 100644 --- a/k8s/index.js +++ b/k8s/index.js @@ -1,2 +1,3 @@ ChannelMergerNode -nothing \ No newline at end of file +nothing +ok \ No newline at end of file