| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
WanderLust 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.
Important
Below table helps you to navigate to the particular tool installation section fast.
| Tech stack | Installation |
|---|---|
| Jenkins Master | Install and configure Jenkins |
| eksctl | Install eksctl |
| Argocd | Install and configure ArgoCD |
| Jenkins-Worker Setup | Install and configure Jenkins Worker Node |
| OWASP setup | Install and configure OWASP |
| SonarQube | Install and configure SonarQube |
| Email Notification Setup | Email notification setup |
| Monitoring | Prometheus and grafana setup using helm charts |
| Clean Up | Clean up |
Note
This project will be implemented on North California region (us-west-1).

Note
We are creating this master machine because we will configure Jenkins master, eksctl, EKS cluster creation from here.
Install & Configure Docker by using below command, "NewGrp docker" will refresh the group config hence no need to restart the EC2 machine.
sudo apt-get updatesudo apt-get install docker.io -y
sudo usermod -aG docker ubuntu && newgrp dockersudo apt update -y
sudo apt install fontconfig openjdk-17-jre -y
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
https://pkg.jenkins.io/debian-stable/jenkins.io-2023.key
echo "deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc]" \
https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
/etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update -y
sudo apt-get install jenkins -yCreate EKS Cluster on AWS (Master machine)
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
sudo apt install unzip
unzip awscliv2.zip
sudo ./aws/install
aws configurecurl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.19.6/2021-01-05/bin/linux/amd64/kubectl
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin
kubectl version --short --clientcurl --silent --location "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/eksctl /usr/local/bin
eksctl versioneksctl create cluster --name=wanderlust \
--region=us-east-1 \
--version=1.30 \
--without-nodegroupeksctl utils associate-iam-oidc-provider \
--region us-east-1 \
--cluster wanderlust \
--approveeksctl create nodegroup --cluster=wanderlust \
--region=us-east-1 \
--name=wanderlust \
--node-type=t2.large \
--nodes=2 \
--nodes-min=2 \
--nodes-max=2 \
--node-volume-size=29 \
--ssh-access \
--ssh-public-key=eks-nodegroup-key Note
Make sure the ssh-public-key "eks-nodegroup-key is available in your aws account"
Setting up jenkins worker node
sudo apt update -y
sudo apt install fontconfig openjdk-17-jre -ysudo sucurl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
sudo apt install unzip
unzip awscliv2.zip
sudo ./aws/install
aws configuressh-keygendocker run -itd --name SonarQube-Server -p 9000:9000 sonarqube:lts-communitysudo apt-get install wget apt-transport-https gnupg lsb-release -y
wget -qO - https://aquasecurity.github.io/trivy-repo/deb/public.key | sudo apt-key add -
echo deb https://aquasecurity.github.io/trivy-repo/deb $(lsb_release -sc) main | sudo tee -a /etc/apt/sources.list.d/trivy.list
sudo apt-get update -y
sudo apt-get install trivy -yInstall and Configure ArgoCD (Master Machine)
kubectl create namespace argocdkubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yamlwatch kubectl get pods -n argocdsudo curl --silent --location -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/download/v2.4.7/argocd-linux-amd64sudo chmod +x /usr/local/bin/argocdkubectl get svc -n argocdkubectl patch svc argocd-server -n argocd -p '{"spec": {"type": "NodePort"}}'kubectl get svc -n argocd
<public-ip-worker>:<port>kubectl -n argocd get secret argocd-initial-admin-secret -o jsonpath="{.data.password}" | base64 -d; echoImportant
Make sure 2 step verification must be on

Important
Enter your gmail password which we copied recently in password field E-mail Notification --> Advance
Configure OWASP, move to Manage Jenkins --> Plugins --> Available plugins (Jenkins Worker)

After OWASP plugin is installed, Now move to Manage jenkins --> Tools (Jenkins Worker)


Note
While adding github credentials add Personal Access Token in the password field.

chmod 777 /var/run/docker.sock argocd login 52.53.156.187:32738 --username adminTip
52.53.156.187:32738 --> This should be your argocd url
argocd cluster listkubectl config get-contextsargocd cluster add Wanderlust@wanderlust.us-west-1.eksctl.io --name wanderlust-eks-clusterTip
Wanderlust@wanderlust.us-west-1.eksctl.io --> This should be your EKS Cluster Name.
Note
Connection should be successful
Important
Make sure to click on the Auto-Create Namespace option while creating argocd application
Congratulations, your application is deployed on AWS EKS Cluster

Open port 31000 and 31100 on worker node and Access it on browser
<worker-public-ip>:31000Install Helm Chart
curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3chmod 700 get_helm.sh./get_helm.shhelm repo add stable https://charts.helm.sh/stablehelm repo add prometheus-community https://prometheus-community.github.io/helm-chartskubectl create namespace prometheuskubectl get nshelm install stable prometheus-community/kube-prometheus-stack -n prometheuskubectl get pods -n prometheuskubectl get svc -n prometheusImportant
change it from Cluster IP to NodePort after changing make sure you save the file and open the assigned nodeport to the service.
kubectl edit svc stable-kube-prometheus-sta-prometheus -n prometheuskubectl get svc -n prometheuskubectl edit svc stable-grafana -n prometheuskubectl get svc -n prometheuskubectl get secret --namespace prometheus stable-grafana -o jsonpath="{.data.admin-password}" | base64 --decode ; echoNote
Username: admin
eksctl delete cluster --name=wanderlust --region=us-west-1| Back | FazBrowse Home | New Git URL |