Skip to content

poonamdevops/ChatGPT-clone

 
 

Repository files navigation

ChatGPT Clone Using Django and doing its CI/CD

Application Overview

This is a django based ChatGPT clone Application. It has authentication feature, login, logout, register.

image

image

Workflow of Application

  1. Basically, after login you can enter any query and in the backend the application is using GPT 3.5 model and the query is responded to user after it has been processed by the model

  2. The model is integrated by using the OpenAI API key.

The whole CI/CD Automation part:

The code is pushed into github, github webhook is setupd which triggers the pipeline automatically when a new code is pushed to the repo.

The jenkins have one slave named dockerNode which houses docker and K8s tools reuqired to interact with the cluster.

The code is pulled into the dockerNode and then image is built out of it.

Sonarqube is also added here.

The image is then tagged accordingly and is pushed into AWS ECR.

Then the EKS cluster has been setup using eksctl command

eg: eksctl create cluster --name chatbot-cluster --region us-east-1 --nodegroup-name chatbot-nodegroup --nodes 1 --nodes-min 1 --nodes-max 2 --node-type t3.xlarge --vpc-public-subnets= subnet-0e92a978275b1647a, subnet-00b16cfabc976e76e

And now the manifest.yaml file is deployed automatically onto the cluster via the Jenkins script itself.

It uses AWS ALB as the LoadBalancer.

The service has been exposed on port 80.

The container is exposed on port 8000.

Screenshot 2024-02-02 132937

Jenkins Screenshot

ss3

Added Domain and SSL/TLS

Domain was added to the application running inside K8s pods and added TLS/SSL to enhance security between client and the webiste interaction.

Read Adding domain and TLS-SSL to it.docx for more details.

ChatGPT clone Video: https://youtu.be/qrZGfBBlXpk?si=yWqIigcgMTq8xFwU

Latest sonarqube installation link: https://medium.com/@pramesh.palkonda18/deploying-sonarqube-on-aws-ec2-a-comprehensive-setup-guide-52150c2d924d

This is how you will be integrating Sonarqube with Jenkinns: https://docs.sonarsource.com/sonarqube/latest/analyzing-source-code/ci-integration/jenkins-integration/key-features/

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 45.4%
  • HTML 42.7%
  • Shell 9.4%
  • Dockerfile 2.5%