{"id":30303670,"url":"https://github.com/rohandeb2/wonderlust-","last_synced_at":"2026-04-05T23:04:12.397Z","repository":{"id":309886006,"uuid":"1014447505","full_name":"rohandeb2/Wonderlust-","owner":"rohandeb2","description":"🚀 Complete DevSecOps Pipeline Implementation | MERN Stack Application with Jenkins CI/CD, GitOps using ArgoCD, Kubernetes on AWS EKS, Security Scanning (SonarQube, OWASP, Trivy), Infrastructure as Code with Terraform, and Full Monitoring Stack","archived":false,"fork":false,"pushed_at":"2025-08-14T09:54:41.000Z","size":1765,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-14T11:30:51.983Z","etag":null,"topics":["argocd","aws-cli","ci-cd-pipeline","devops","devsecops","docker","grafana","helm","jenkins","kubernetes","prometheus","sonarqube","trivy","yaml-configuration"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rohandeb2.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-05T18:39:34.000Z","updated_at":"2025-08-14T09:54:45.000Z","dependencies_parsed_at":"2025-08-14T11:30:58.014Z","dependency_job_id":"8dfa3af2-767b-4e4c-990c-e9232b0927e4","html_url":"https://github.com/rohandeb2/Wonderlust-","commit_stats":null,"previous_names":["rohandeb2/wonderlust-"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/rohandeb2/Wonderlust-","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohandeb2%2FWonderlust-","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohandeb2%2FWonderlust-/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohandeb2%2FWonderlust-/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohandeb2%2FWonderlust-/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rohandeb2","download_url":"https://codeload.github.com/rohandeb2/Wonderlust-/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rohandeb2%2FWonderlust-/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270811911,"owners_count":24650075,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argocd","aws-cli","ci-cd-pipeline","devops","devsecops","docker","grafana","helm","jenkins","kubernetes","prometheus","sonarqube","trivy","yaml-configuration"],"created_at":"2025-08-17T06:04:16.337Z","updated_at":"2025-12-30T21:45:03.143Z","avatar_url":"https://github.com/rohandeb2.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Wanderlust Mega Project End to End Implementation\n\n### In this demo, we will see how to deploy an end to end three tier MERN stack application on EKS cluster.\n#\n### \u003cmark\u003eProject Deployment Flow:\u003c/mark\u003e\n\u003cimg src=\"https://github.com/DevMadhup/Wanderlust-Mega-Project/blob/main/Assets/DevSecOps%2BGitOps.gif\" /\u003e\n\n\n# Wanderlust - Your Ultimate Travel Blog 🌍✈️\n\nWanderLust is a simple MERN travel blog website ✈ This project is aimed to help people to contribute in open source, upskill in react and also master git.\n\n\n\n#\n\n\n![Preview Image](https://github.com/krishnaacharyaa/wanderlust/assets/116620586/17ba9da6-225f-481d-87c0-5d5a010a9538)\n\n#\n\n## Tech stack used in this project:\n- GitHub (Code)\n- Docker (Containerization)\n- Jenkins (CI)\n- OWASP (Dependency check)\n- SonarQube (Quality)\n- Trivy (Filesystem Scan)\n- ArgoCD (CD)\n- Redis (Caching)\n- AWS EKS (Kubernetes)\n- Helm (Monitoring using grafana and prometheus)\n\n### How pipeline will look after deployment:\n- \u003cb\u003eCI pipeline to build and push\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/20542d8b-0701-43ed-b2f8-82f8ed28d053)\n\n- \u003cb\u003eCD pipeline to update application version\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/8fd13807-622e-45f7-af23-dcc1ba30ca5d)\n\n- \u003cb\u003eArgoCD application for deployment on EKS\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/1ea9d486-656e-40f1-804d-2651efb54cf6)\n\n#\n\u003e [!Important]\n\u003e Below table helps you to navigate to the particular tool installation section fast.\n\n| Tech stack    | Installation |\n| -------- | ------- |\n| Jenkins Master | \u003ca href=\"#Jenkins\"\u003eInstall and configure Jenkins\u003c/a\u003e     |\n| eksctl | \u003ca href=\"#EKS\"\u003eInstall eksctl\u003c/a\u003e     |\n| Argocd | \u003ca href=\"#Argo\"\u003eInstall and configure ArgoCD\u003c/a\u003e     |\n| Jenkins-Worker Setup | \u003ca href=\"#Jenkins-worker\"\u003eInstall and configure Jenkins Worker Node\u003c/a\u003e     |\n| OWASP setup | \u003ca href=\"#Owasp\"\u003eInstall and configure OWASP\u003c/a\u003e     |\n| SonarQube | \u003ca href=\"#Sonar\"\u003eInstall and configure SonarQube\u003c/a\u003e     |\n| Email Notification Setup | \u003ca href=\"#Mail\"\u003eEmail notification setup\u003c/a\u003e     |\n| Monitoring | \u003ca href=\"#Monitor\"\u003ePrometheus and grafana setup using helm charts\u003c/a\u003e\n| Clean Up | \u003ca href=\"#Clean\"\u003eClean up\u003c/a\u003e     |\n#\n\n### Pre-requisites to implement this project:\n#\n\n\u003e [!Note]\n\u003e This project will be implemented on North California region (us-west-1).\n\n- \u003cb\u003eCreate 1 Master machine on AWS with 2CPU, 8GB of RAM (t2.large) and 29 GB of storage and install Docker on it.\u003c/b\u003e\n#\n- \u003cb\u003eOpen the below ports in security group of master machine and also attach same security group to Jenkins worker node (We will create worker node shortly)\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/4e5ecd37-fe2e-4e4b-a6ba-14c7b62715a3)\n\n\u003e [!Note]\n\u003e We are creating this master machine because we will configure Jenkins master, eksctl, EKS cluster creation from here.\n\nInstall \u0026 Configure Docker by using below command, \"NewGrp docker\" will refresh the group config hence no need to restart the EC2 machine.\n\n```bash\nsudo apt-get update\n```\n```bash\nsudo apt-get install docker.io -y\nsudo usermod -aG docker ubuntu \u0026\u0026 newgrp docker\n```\n#\n- \u003cb id=\"Jenkins\"\u003eInstall and configure Jenkins (Master machine)\u003c/b\u003e\n```bash\nsudo apt update -y\nsudo apt install fontconfig openjdk-17-jre -y\n\nsudo wget -O /usr/share/keyrings/jenkins-keyring.asc \\\n  https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key\n  \necho \"deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]\" \\\n  https://pkg.jenkins.io/debian-stable binary/ | sudo tee \\\n  /etc/apt/sources.list.d/jenkins.list \u003e /dev/null\n  \nsudo apt-get update -y\nsudo apt-get install jenkins -y\n```\n- \u003cb\u003eNow, access Jenkins Master on the browser on port 8080 and configure it\u003c/b\u003e.\n#\n- \u003cb id=\"EKS\"\u003eCreate EKS Cluster on AWS (Master machine)\u003c/b\u003e\n  - IAM user with **access keys and secret access keys**\n  - AWSCLI should be configured (\u003ca href=\"https://github.com/DevMadhup/DevOps-Tools-Installations/blob/main/AWSCLI/AWSCLI.sh\"\u003eSetup AWSCLI\u003c/a\u003e)\n  ```bash\n  curl \"https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip\" -o \"awscliv2.zip\"\n  sudo apt install unzip\n  unzip awscliv2.zip\n  sudo ./aws/install\n  aws configure\n  ```\n\n  - Install **kubectl** (Master machine)(\u003ca href=\"https://github.com/DevMadhup/DevOps-Tools-Installations/blob/main/Kubectl/Kubectl.sh\"\u003eSetup kubectl \u003c/a\u003e)\n  ```bash\n  curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.19.6/2021-01-05/bin/linux/amd64/kubectl\n  chmod +x ./kubectl\n  sudo mv ./kubectl /usr/local/bin\n  kubectl version --short --client\n  ```\n\n  - Install **eksctl** (Master machine) (\u003ca href=\"https://github.com/DevMadhup/DevOps-Tools-Installations/blob/main/eksctl%20/eksctl.sh\"\u003eSetup eksctl\u003c/a\u003e)\n  ```bash\n  curl --silent --location \"https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz\" | tar xz -C /tmp\n  sudo mv /tmp/eksctl /usr/local/bin\n  eksctl version\n  ```\n  \n  - \u003cb\u003eCreate EKS Cluster (Master machine)\u003c/b\u003e\n  ```bash\n  eksctl create cluster --name=wanderlust \\\n                      --region=us-east-2 \\\n                      --version=1.30 \\\n                      --without-nodegroup\n  ```\n  - \u003cb\u003eAssociate IAM OIDC Provider (Master machine)\u003c/b\u003e\n  ```bash\n  eksctl utils associate-iam-oidc-provider \\\n    --region us-east-2 \\\n    --cluster wanderlust \\\n    --approve\n  ```\n  - \u003cb\u003eCreate Nodegroup (Master machine)\u003c/b\u003e\n  ```bash\n  eksctl create nodegroup --cluster=wanderlust \\\n                       --region=us-east-2 \\\n                       --name=wanderlust \\\n                       --node-type=t2.large \\\n                       --nodes=2 \\\n                       --nodes-min=2 \\\n                       --nodes-max=2 \\\n                       --node-volume-size=29 \\\n                       --ssh-access \\\n                       --ssh-public-key=eks-nodegroup-key \n  ```\n\u003e [!Note]\n\u003e  Make sure the ssh-public-key \"eks-nodegroup-key is available in your aws account\"\n#\n- \u003cb id=\"Jenkins-worker\"\u003eSetting up jenkins worker node\u003c/b\u003e\n  - Create a new EC2 instance (Jenkins Worker) with 2CPU, 8GB of RAM (t2.large) and 29 GB of storage and install java on it\n  ```bash\n  sudo apt update -y\n  sudo apt install fontconfig openjdk-17-jre -y\n  ```\n  - Create an IAM role with \u003cmark\u003eadministrator access\u003c/mark\u003e attach it to the jenkins worker node \u003cmark\u003eSelect Jenkins worker node EC2 instance --\u003e Actions --\u003e Security --\u003e Modify IAM role\u003c/mark\u003e\n  ![image](https://github.com/user-attachments/assets/1a9060db-db11-40b7-86f0-47a65e8ed68b)\n\n  - Configure AWSCLI (\u003ca href=\"https://github.com/DevMadhup/DevOps-Tools-Installations/blob/main/AWSCLI/AWSCLI.sh\"\u003eSetup AWSCLI\u003c/a\u003e)\n  ```bash\n  sudo su\n  ```\n  ```bash\n  curl \"https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip\" -o \"awscliv2.zip\"\n  sudo apt install unzip\n  unzip awscliv2.zip\n  sudo ./aws/install\n  aws configure\n  ```\n#\n  - \u003cb\u003egenerate ssh keys (Master machine) to setup jenkins master-slave\u003c/b\u003e\n  ```bash\n  ssh-keygen\n  ```\n  ![image](https://github.com/user-attachments/assets/0c8ecb74-1bc5-46f9-ad55-1e22e8092198)\n#\n  - \u003cb\u003eNow move to directory where your ssh keys are generated and copy the content of public key and paste to authorized_keys file of the Jenkins worker node.\u003c/b\u003e\n#\n  - \u003cb\u003eNow, go to the jenkins master and navigate to \u003cmark\u003eManage jenkins --\u003e Nodes\u003c/mark\u003e, and click on Add node \u003c/b\u003e\n    - \u003cb\u003ename:\u003c/b\u003e Node\n    - \u003cb\u003etype:\u003c/b\u003e permanent agent\n    - \u003cb\u003eNumber of executors:\u003c/b\u003e 2\n    - Remote root directory\n    - \u003cb\u003eLabels:\u003c/b\u003e Node\n    - \u003cb\u003eUsage:\u003c/b\u003e Only build jobs with label expressions matching this node\n    - \u003cb\u003eLaunch method:\u003c/b\u003e Via ssh\n    - \u003cb\u003eHost:\u003c/b\u003e \\\u003cpublic-ip-worker-jenkins\\\u003e\n    - \u003cb\u003eCredentials:\u003c/b\u003e \u003cmark\u003eAdd --\u003e Kind: ssh username with private key --\u003e ID: Worker --\u003e Description: Worker --\u003e Username: root --\u003e Private key: Enter directly --\u003e Add Private key\u003c/mark\u003e\n    - \u003cb\u003eHost Key Verification Strategy:\u003c/b\u003e Non verifying Verification Strategy\n    - \u003cb\u003eAvailability:\u003c/b\u003e Keep this agent online as much as possible\n#\n  - And your jenkins worker node is added\n  ![image](https://github.com/user-attachments/assets/cab93696-a4e2-4501-b164-8287d7077eef)\n\n# \n- \u003cb id=\"docker\"\u003eInstall docker (Jenkins Worker)\u003c/b\u003e\n\n```bash\nsudo apt install docker.io -y\nsudo usermod -aG docker ubuntu \u0026\u0026 newgrp docker\n```\n#\n- \u003cb id=\"Sonar\"\u003eInstall and configure SonarQube (Master machine)\u003c/b\u003e\n```bash\ndocker run -itd --name SonarQube-Server -p 9000:9000 sonarqube:lts-community\n```\n#\n- \u003cb id=\"Trivy\"\u003eInstall Trivy (Jenkins Worker)\u003c/b\u003e\n```bash\nsudo apt-get install wget apt-transport-https gnupg lsb-release -y\nwget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -\necho deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list.d/trivy.list\nsudo apt-get update -y\nsudo apt-get install trivy -y\n```\n#\n- \u003cb id=\"Argo\"\u003eInstall and Configure ArgoCD (Master Machine)\u003c/b\u003e\n  - \u003cb\u003eCreate argocd namespace\u003c/b\u003e\n  ```bash\n  kubectl create namespace argocd\n  ```\n  - \u003cb\u003eApply argocd manifest\u003c/b\u003e\n  ```bash\n  kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml\n  ```\n  - \u003cb\u003eMake sure all pods are running in argocd namespace\u003c/b\u003e\n  ```bash\n  watch kubectl get pods -n argocd\n  ```\n  - \u003cb\u003eInstall argocd CLI\u003c/b\u003e\n  ```bash\n  sudo curl --silent --location -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/download/v2.4.7/argocd-linux-amd64\n  ```\n  - \u003cb\u003eProvide executable permission\u003c/b\u003e\n  ```bash\n  sudo chmod +x /usr/local/bin/argocd\n  ```\n  - \u003cb\u003eCheck argocd services\u003c/b\u003e\n  ```bash\n  kubectl get svc -n argocd\n  ```\n  - \u003cb\u003eChange argocd server's service from ClusterIP to NodePort\u003c/b\u003e\n  ```bash\n  kubectl patch svc argocd-server -n argocd -p '{\"spec\": {\"type\": \"NodePort\"}}'\n  ```\n  - \u003cb\u003eConfirm service is patched or not\u003c/b\u003e\n  ```bash\n  kubectl get svc -n argocd\n  ```\n  - \u003cb\u003e Check the port where ArgoCD server is running and expose it on security groups of a worker node\u003c/b\u003e\n  ![image](https://github.com/user-attachments/assets/a2932e03-ebc7-42a6-9132-82638152197f)\n  - \u003cb\u003eAccess it on browser, click on advance and proceed with\u003c/b\u003e\n  ```bash\n  \u003cpublic-ip-worker\u003e:\u003cport\u003e\n  ```\n  ![image](https://github.com/user-attachments/assets/29d9cdbd-5b7c-44b3-bb9b-1d091d042ce3)\n  ![image](https://github.com/user-attachments/assets/08f4e047-e21c-4241-ba68-f9b719a4a39a)\n  ![image](https://github.com/user-attachments/assets/1ffa85c3-9055-49b4-aab0-0947b95f0dd2)\n  - \u003cb\u003eFetch the initial password of argocd server\u003c/b\u003e\n  ```bash\n  kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath=\"{.data.password}\" | base64 -d; echo\n  ```\n  - \u003cb\u003eUsername: admin\u003c/b\u003e\n  - \u003cb\u003e Now, go to \u003cmark\u003eUser Info\u003c/mark\u003e and update your argocd password\n#\n## Steps to add email notification\n- \u003cb id=\"Mail\"\u003eGo to your Jenkins Master EC2 instance and allow 465 port number for SMTPS\u003c/b\u003e\n#\n- \u003cb\u003eNow, we need to generate an application password from our gmail account to authenticate with jenkins\u003c/b\u003e\n  - \u003cb\u003eOpen gmail and go to \u003cmark\u003eManage your Google Account --\u003e Security\u003c/mark\u003e\u003c/b\u003e\n\u003e [!Important]\n\u003e Make sure 2 step verification must be on\n\n  ![image](https://github.com/user-attachments/assets/5ab9dc9d-dcce-4f9d-9908-01095f1253cb)\n\n  - \u003cb\u003eSearch for \u003cmark\u003eApp password\u003c/mark\u003e and create a app password for jenkins\u003c/b\u003e\n  ![image](https://github.com/user-attachments/assets/701752da-7703-4685-8f06-fe1f65dd1b9c)\n  ![image](https://github.com/user-attachments/assets/adc8d8c0-8be4-4319-9042-4115abb5c6fc)\n  \n#\n- \u003cb\u003e Once, app password is create and go back to jenkins \u003cmark\u003eManage Jenkins --\u003e Credentials\u003c/mark\u003e to add username and password for email notification\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/2a42ec62-87c8-43c8-a034-7be0beb8824e)\n\n# \n- \u003cb\u003e Go back to \u003cmark\u003eManage Jenkins --\u003e System\u003c/mark\u003e and search for \u003cmark\u003eExtended E-mail Notification\u003c/mark\u003e\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/bac81e24-bb07-4659-a251-955966feded8)\n#\n- \u003cb\u003eScroll down and search for \u003cmark\u003eE-mail Notification\u003c/mark\u003e and setup email notification\u003c/b\u003e\n\u003e [!Important]\n\u003e Enter your gmail password which we copied recently in password field \u003cmark\u003eE-mail Notification --\u003e Advance\u003c/mark\u003e\n\n![image](https://github.com/user-attachments/assets/14e254fc-1400-457e-b3f4-046404b66950)\n![image](https://github.com/user-attachments/assets/7be70b3a-b0dc-415c-838a-b1c6fd87c182)\n![image](https://github.com/user-attachments/assets/cffb6e1d-4838-483e-97e0-6851c204ab21)\n\n#\n## Steps to implement the project:\n- \u003cb\u003eGo to Jenkins Master and click on \u003cmark\u003e Manage Jenkins --\u003e Plugins --\u003e Available plugins\u003c/mark\u003e install the below plugins:\u003c/b\u003e\n  - OWASP\n  - SonarQube Scanner\n  - Docker\n  - Pipeline: Stage View\n#\n- \u003cb id=\"Owasp\"\u003eConfigure OWASP, move to \u003cmark\u003eManage Jenkins --\u003e Plugins --\u003e Available plugins\u003c/mark\u003e (Jenkins Worker)\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/da6a26d3-f742-4ea8-86b7-107b1650a7c2)\n\n- \u003cb id=\"Sonar\"\u003eAfter OWASP plugin is installed, Now move to \u003cmark\u003eManage jenkins --\u003e Tools\u003c/mark\u003e (Jenkins Worker)\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/3b8c3f20-202e-4864-b3b6-b48d7a604ee8)\n#\n- \u003cb\u003eLogin to SonarQube server and create the credentials for jenkins to integrate with SonarQube\u003c/b\u003e\n  - Navigate to \u003cmark\u003eAdministration --\u003e Security --\u003e Users --\u003e Token\u003c/mark\u003e\n  ![image](https://github.com/user-attachments/assets/86ad8284-5da6-4048-91fe-ac20c8e4514a)\n  ![image](https://github.com/user-attachments/assets/6bc671a5-c122-45c0-b1f0-f29999bbf751)\n  ![image](https://github.com/user-attachments/assets/e748643a-e037-4d4c-a9be-944995979c60)\n\n#\n- \u003cb\u003eNow, go to \u003cmark\u003e Manage Jenkins --\u003e credentials\u003c/mark\u003e and add Sonarqube credentials:\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/0688e105-2170-4c3f-87a3-128c1a05a0b8)\n#\n- \u003cb\u003eGo to \u003cmark\u003e Manage Jenkins --\u003e Tools\u003c/mark\u003e and search for SonarQube Scanner installations:\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/2fdc1e56-f78c-43d2-914a-104ec2c8ea86)\n#\n- \u003cb\u003e Go to \u003cmark\u003e Manage Jenkins --\u003e credentials\u003c/mark\u003e and add Github credentials to push updated code from the pipeline:\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/4d0c1a47-621e-4aa2-a0b1-71927fcdaef4)\n\u003e [!Note]\n\u003e While adding github credentials add Personal Access Token in the password field.\n#\n- \u003cb\u003eGo to \u003cmark\u003e Manage Jenkins --\u003e System\u003c/mark\u003e and search for SonarQube installations:\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/ae866185-cb2b-4e83-825b-a125ec97243a)\n#\n- \u003cb\u003eNow again, Go to \u003cmark\u003e Manage Jenkins --\u003e System\u003c/mark\u003e and search for Global Trusted Pipeline Libraries:\u003c/b\n![image](https://github.com/user-attachments/assets/874b2e03-49b9-4c26-9b0f-bd07ce70c0f1)\n![image](https://github.com/user-attachments/assets/1ca83b43-ce85-4970-941d-9a819ce4ecfd)\n#\n- \u003cb\u003eLogin to SonarQube server, go to \u003cmark\u003eAdministration --\u003e Webhook\u003c/mark\u003e and click on create \u003c/b\u003e\n![image](https://github.com/user-attachments/assets/16527e72-6691-4fdf-a8d2-83dd27a085cb)\n![image](https://github.com/user-attachments/assets/a8b45948-766a-49a4-b779-91ac3ce0443c)\n#\n- \u003cb\u003eNow, go to github repository and under \u003cmark\u003eAutomations\u003c/mark\u003e directory update the \u003cmark\u003einstance-id\u003c/mark\u003e field on both the \u003cmark\u003eupdatefrontendnew.sh updatebackendnew.sh\u003c/mark\u003e with the k8s worker's instance id\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/3cb044b4-df88-4d68-bf7c-775cf78d5bf2)\n#\n- \u003cb\u003eNavigate to \u003cmark\u003e Manage Jenkins --\u003e credentials\u003c/mark\u003e and add credentials for docker login to push docker image:\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/1a8287fc-b205-4156-8342-3f660f15e8fa)\n#\n- \u003cb\u003eCreate a \u003cmark\u003eWanderlust-CI\u003c/mark\u003e pipeline\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/55c7b611-3c20-445f-a49c-7d779894e232)\n\n#\n- \u003cb\u003eCreate one more pipeline \u003cmark\u003eWanderlust-CD\u003c/mark\u003e\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/23f84a93-901b-45e3-b4e8-a12cbed13986)\n![image](https://github.com/user-attachments/assets/ac79f7e6-c02c-4431-bb3b-5c7489a93a63)\n![image](https://github.com/user-attachments/assets/46a5937f-e06e-4265-ac0f-42543576a5cd)\n#\n- \u003cb\u003eProvide permission to docker socket so that docker build and push command do not fail (Jenkins Worker)\u003c/b\u003e\n```bash\nchmod 777 /var/run/docker.sock\n```\n![image](https://github.com/user-attachments/assets/e231c62a-7adb-4335-b67e-480758713dbf)\n#\n- \u003cb\u003e Go to Master Machine and add our own eks cluster to argocd for application deployment using cli\u003c/b\u003e\n  - \u003cb\u003eLogin to argoCD from CLI\u003c/b\u003e\n  ```bash\n   argocd login 52.53.156.187:32738 --username admin\n  ```\n\u003e [!Tip]\n\u003e 52.53.156.187:32738 --\u003e This should be your argocd url\n\n  ![image](https://github.com/user-attachments/assets/7d05e5ca-1a16-4054-a321-b99270ca0bf9)\n\n  - \u003cb\u003eCheck how many clusters are available in argocd \u003c/b\u003e\n  ```bash\n  argocd cluster list\n  ```\n  ![image](https://github.com/user-attachments/assets/76fe7a45-e05c-422d-9652-bdaee02d630f)\n  - \u003cb\u003eGet your cluster name\u003c/b\u003e\n  ```bash\n  kubectl config get-contexts\n  ```\n  ![image](https://github.com/user-attachments/assets/4cab99aa-cef3-45f6-9150-05004c2f09f8)\n  - \u003cb\u003eAdd your cluster to argocd\u003c/b\u003e\n  ```bash\n  argocd cluster add Wanderlust@wanderlust.us-west-1.eksctl.io --name wanderlust-eks-cluster\n  ```\n  \u003e [!Tip]\n  \u003e Wanderlust@wanderlust.us-west-1.eksctl.io --\u003e This should be your EKS Cluster Name.\n\n  ![image](https://github.com/user-attachments/assets/0f36aafd-bab9-4ef8-ba5d-3eb56d850604)\n  - \u003cb\u003e Once your cluster is added to argocd, go to argocd console \u003cmark\u003eSettings --\u003e Clusters\u003c/mark\u003e and verify it\u003c/b\u003e\n  ![image](https://github.com/user-attachments/assets/4490b632-19fd-4499-a341-fabf8488d13c)\n#\n- \u003cb\u003eGo to \u003cmark\u003eSettings --\u003e Repositories\u003c/mark\u003e and click on \u003cmark\u003eConnect repo\u003c/mark\u003e \u003c/b\u003e\n![image](https://github.com/user-attachments/assets/cc8728e5-546b-4c46-bd4c-538f4cd6a63d)\n![image](https://github.com/user-attachments/assets/eb3646e2-db84-4439-a11a-d4168080d9cc)\n![image](https://github.com/user-attachments/assets/a07f8703-5ef3-4524-aaa7-39a139335eb7)\n\u003e [!Note]\n\u003e Connection should be successful\n\n- \u003cb\u003eNow, go to \u003cmark\u003eApplications\u003c/mark\u003e and click on \u003cmark\u003eNew App\u003c/mark\u003e\u003c/b\u003e\n\n![image](https://github.com/user-attachments/assets/ec2d7a51-d78f-4947-a90b-258944ad59a2)\n\n\u003e [!Important]\n\u003e Make sure to click on the \u003cmark\u003eAuto-Create Namespace\u003c/mark\u003e option while creating argocd application\n\n![image](https://github.com/user-attachments/assets/55dcd3c2-5424-4efb-9bee-1c12bbf7f158)\n![image](https://github.com/user-attachments/assets/3e2468ff-8cb2-4bda-a8cc-0742cd6d0cae)\n\n- \u003cb\u003eCongratulations, your application is deployed on AWS EKS Cluster\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/bc2d9680-fe00-49f9-81bf-93c5595c20cc)\n![image](https://github.com/user-attachments/assets/1ea9d486-656e-40f1-804d-2651efb54cf6)\n- \u003cb\u003eOpen port 31000 and 31100 on worker node and Access it on browser\u003c/b\u003e\n```bash\n\u003cworker-public-ip\u003e:31000\n```\n![image](https://github.com/user-attachments/assets/a4b2a4b4-e1aa-4b22-ac6b-f40003d0723a)\n![image](https://github.com/user-attachments/assets/06f9f1c8-094d-4d9f-a9d8-256fb18a9ae4)\n![image](https://github.com/user-attachments/assets/64394f90-8610-44c0-9f63-c3a21eb78f55)\n- \u003cb\u003eEmail Notification\u003c/b\u003e\n![image](https://github.com/user-attachments/assets/0ab1ef47-f939-4618-8651-6aa9274721f4)\n\n#\n## How to monitor EKS cluster, kubernetes components and workloads using prometheus and grafana via HELM (On Master machine)\n- \u003cp id=\"Monitor\"\u003eInstall Helm Chart\u003c/p\u003e\n```bash\ncurl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3\n```\n```bash\nchmod 700 get_helm.sh\n```\n```bash\n./get_helm.sh\n```\n\n#\n-  Add Helm Stable Charts for Your Local Client\n```bash\nhelm repo add stable https://charts.helm.sh/stable\n```\n\n#\n- Add Prometheus Helm Repository\n```bash\nhelm repo add prometheus-community https://prometheus-community.github.io/helm-charts\n```\n\n#\n- Create Prometheus Namespace\n```bash\nkubectl create namespace prometheus\n```\n```bash\nkubectl get ns\n```\n\n#\n- Install Prometheus using Helm\n```bash\nhelm install stable prometheus-community/kube-prometheus-stack -n prometheus\n```\n\n#\n- Verify prometheus installation\n```bash\nkubectl get pods -n prometheus\n```\n\n#\n- Check the services file (svc) of the Prometheus\n```bash\nkubectl get svc -n prometheus\n```\n\n#\n- Expose Prometheus and Grafana to the external world through Node Port\n\u003e [!Important]\n\u003e change it from Cluster IP to NodePort after changing make sure you save the file and open the assigned nodeport to the service.\n\n```bash\nkubectl edit svc stable-kube-prometheus-sta-prometheus -n prometheus\n```\n![image](https://github.com/user-attachments/assets/90f5dc11-23de-457d-bbcb-944da350152e)\n![image](https://github.com/user-attachments/assets/ed94f40f-c1f9-4f50-a340-a68594856cc7)\n\n#\n- Verify service\n```bash\nkubectl get svc -n prometheus\n```\n\n#\n- Now,let’s change the SVC file of the Grafana and expose it to the outer world\n```bash\nkubectl edit svc stable-grafana -n prometheus\n```\n![image](https://github.com/user-attachments/assets/4a2afc1f-deba-48da-831e-49a63e1a8fb6)\n\n#\n- Check grafana service\n```bash\nkubectl get svc -n prometheus\n```\n\n#\n- Get a password for grafana\n```bash\nkubectl get secret --namespace prometheus stable-grafana -o jsonpath=\"{.data.admin-password}\" | base64 --decode ; echo\n```\n\u003e [!Note]\n\u003e Username: admin\n\n#\n- Now, view the Dashboard in Grafana\n![image](https://github.com/user-attachments/assets/d2e7ff2f-059d-48c4-92bb-9711943819c4)\n![image](https://github.com/user-attachments/assets/3d6652d0-7795-4fe9-8919-f33eac88db73)\n![image](https://github.com/user-attachments/assets/13321ee5-5d7b-4976-b409-25d3b865a42a)\n![image](https://github.com/user-attachments/assets/75a22e4b-ae81-4cad-9c92-21dd90d126a8)\n\n#\n## Clean Up\n- \u003cb id=\"Clean\"\u003eDelete eks cluster\u003c/b\u003e\n```bash\neksctl delete cluster --name=wanderlust --region=us-west-1\n```\n\n#\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohandeb2%2Fwonderlust-","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frohandeb2%2Fwonderlust-","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frohandeb2%2Fwonderlust-/lists"}