MLOPS TASK1
under the guidance of MR. VIMAL DAGA SIR
LinuxWorld Informatics Pvt Ltd
First Of All , Discuss About Our Main Tools :
1 . Github :
It offers the distributed version control and source code management (SCM) functionality of Git, plus its own features. GitHub accounts are commonly used to host open source projects. Projects on GitHub can be accessed and manipulated using the standard Git command-line interface and all of the standard Git commands work with it.
2 . Git :
it can be used to track changes in any set of files. Its goals include speed, data integrity, and support for distributed, non-linear workflows. As with most other distributed version-control systems, and unlike most client–server systems, every Git directory on every computer is a full-fledged repository with complete history and full version-tracking abilities, independent of network access or a central server
3 . Docker :
Docker is a set of platform as a service (PaaS) products that uses OS-level virtualization to deliver software in packages called containers. Containers are isolated from one another and bundle their own software, libraries and configuration files; they can communicate with each other through well-defined channels. All containers are run by a single operating system kernel and therefore use fewer resources than virtual machines.
4. Jenkins :
Jenkins is a free and open source automation server. It helps automate the parts of software development related to building, testing, and deploying, facilitating continuous integration and continuous delivery.
PROBLEM STATEMENT:
JOB1:
If Developer push to dev branch then Jenkins will fetch from dev and deploy on dev-docker environment.
JOB2
If Developer push to master branch then Jenkins will fetch from master and deploy on master-docke environment.
Tip : both dev-docker and master-docker environment are on different docker containers.
JOB3
Manually the QA team will check (test) for the website running in dev-docker environment. If it is running fine then Jenkins will merge the dev branch to master branch and trigger job2
Now come to project :
firstly we manually write the code as a developer :
As:
then create post commit to directly connect to github and jenkins :
for doing this we firstly made private ip to public ip where jenkins is running:
for doing this we use ngrok software
then create repository in github :
creating webhooks to connect to jenkins as :
then connect git to github:
now commiting our code to push it to github as :
it will redirect our code to jenkins jobs
AS:
then we create second code in dev1(or any) other branch to see our testing team as its working good our job
so,
then here our testing team decide if our code of second job work then it merge our code and replace our code
It is important because if our production area our code work we cannot rely our new code so put in second branch test it and run it if working then merge it as a new update
now our job 3 that is merging part here we merge our branch to dev1 branch to master branch(work as production branch) if dev1 branch code give correct testing.
now our both branch merge after i run this code and give output as :
At last thank you vimal sir for providing such type of great ideas which is implemented in comapnies to build our own project as same as these big MNC companies are using.