https://github.com/yousabu/devops-go-api
Devops Internship Task
https://github.com/yousabu/devops-go-api
argocd docker docker-compose golang helm-charts jenkins kubernetes mysql
Last synced: 3 months ago
JSON representation
Devops Internship Task
- Host: GitHub
- URL: https://github.com/yousabu/devops-go-api
- Owner: yousabu
- Created: 2023-06-09T12:23:09.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-06-13T12:59:42.000Z (about 3 years ago)
- Last Synced: 2025-04-09T20:49:40.323Z (about 1 year ago)
- Topics: argocd, docker, docker-compose, golang, helm-charts, jenkins, kubernetes, mysql
- Language: Go
- Homepage:
- Size: 3.85 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## What Does Task Achieve:
- Fix bugs in code
- Dockerizing App
- Compose the API image & Mysql
- CI/CD Jenkins Pipeline
- Kubernetes + packaging it using helm & kustomization file
- ArgoCD for GitOps
- Horizontal Pod Autoscaler
## Notes:
- The `.env` file is used to store the required environment variables for the application. Ensure that you provide the correct values for `MYSQL_HOST`, `MYSQL_USER`, `MYSQL_PASS`, and `MYSQL_PORT`.
- it shoud be in instabug-intern-challenge/ dir.
## Run Api Locally Using Golang and mysql-server:
git clone https://github.com/yousabu/instabug-intern-challenge.git
cd instabug-intern-challenge/
go build -o main .
./main
## Build Docker Image:
docker build -t instaapp .
- Dockerfile Built in the way that make it as lightweight as possible with all layers of security.
## Run API And It's Database Using Docker-Compose:
docker-compose up -d
- In Docker-compose The Api Will Start Only After Mysql DB Be Healthy
## Screenshot From Running API Localy With Docker-compose:

## Install API Using Kubectl:
kubectl apply -k .

## Install API Using Helm:
helm install inastapp-api instaapp/

## ArgoCD SETUP:
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
## Enable Sync Between Github & K8s ArgoCD Cluster By:
Install API By Using Helm Charts Command OR By Run Application.yaml K8s File And It Will Sync Automatically.
and it also point to helm package.
#
kubectl apply -f Application.yaml
#
## Added autoscaling manifest for number of replicas for api deployment only:

#
- All Tests Done on Kubelet Cluster one master & one worker.
