Skip to main content

Devops for beginners

 Devops:



Software development life cycle:


1.requirement gathering


2.planning


3.design


4.development


5.testing


6.deployment and maintenance


###################


Models in SDLC:


1. Waterfall model


2.Agile


3.Spiral


4.Big bang


######################


Waterfall method:


once 1 step is completed then only we go to 2nd step.


1.requirement gathering


2.planning


3.design


4.development


5.testing


6.deployment and maintenance

#################



Agile: waterfall model is repeated many times until clients needs are satisfied.


#############

Continuous Integration:


Scenario:


developers write the several lines of code everyday creating the software. this code should be stored somewhere at the centralized place. This centralized repository called as the version control system like github. everyday developers push and pull the code from such repositories. code changes or the code commits happens continously. On the repository, this code will be built, tested and evaluated. artifacts/software is the bundle of the files which will be created from the repository. That artifact will be moved and deployed to the built server. Testers will test the code on the test servers and once the code is approved it will be deployed to production servers.


problem:


developers have worked 3 weeks straight and worked on the software module and pushed the code to the repository.once the code is deployed on the server, during the testing you notice there are lot of errors and bugs. Now the developer have to rewrite the code at many places and deply it again. problem here is code is getting merged with the repository but not really getting integrated.




Solution(achieved through the CI):


After every single commit from the developers, code should be built and tested. but developer commit several time a day and it is not humanly possible to build and test the code after the commit. So we need to automate this process, When the developer commits any code, automated process will fetch the code, build it test it, and send the notification if there is any failure in the code. As soon as the failure notification is received. The developers will fix the code and commit again. 



#######################


cyclic view of CI:


code

fetch

build

test 

notify

 feedback 

repeat.


##################

Continuous Delivery: (CD)


it is an automated process for delivering the code changes to the servers quickly and efficiently. continuous delivery is the extension of the continous integration.


process:



When the developer commits any code, automated process will fetch the code, build it.test it, and send the notification if there is any failure in the code. As soon as the failure notification is received, the ddeveloper will fix the code and commit again. if everything is good with the code, Artifact(bundle of files) is genrated and it is stored in repository. That artifact is deployed to the server and then the code is tested.


But deployment of the code contains so many steps:


server provisioning

installing the dependancies

configuration changes

network

artifact deployment

any other changes




This is so much of manual task and can be automated. in continuous delivery below tasks are automated:

server provisioning


installing the dependancies


configuration changes


network


artifact deployment


any other changes


#########################


There are so many automation tools available in the market:


Ansible


terraform


jenkins for ci cd automation


and many more

##################


tasks in Testing also needs to be automated:


functional


load


performance


DB


Security


any other task

#####################


testing team can automate the above mentioned tasks.



development team > integrate the Cl Operations team > automate the deployment QA team: automate the testing


all the 3 processes are integrated together.



Comments

Popular posts from this blog

Linux basic commands

 Linux basic commands: du  -sh  *  |  sort  -h  -r   |  head  -n  40  :    list out first 40 files in the directory that are taking more space in the directory.  cd : change directory Is-l listing the items in long listing format  pwd : print working directory Is-I format: type :no of links:owner : group:size :month :day :time :name cd/: go to/directory whoami: tells us by which username we are logged in. touch jerry: creates the file named jerry in present working directory. cp jerry lex: copy the content of jerry file and paste it to lex file. vi text1: creates the file text1 and open it in vi editor mkdir superman: creates the directory called superman mkdir abc def  : creates 2 folder in one command. touch filename wont work in /etc/ folder if logged in by normal account. man cp: shows manual for cp command. echo "india is my country"> file1 puts the text in file1. rm filename: remove the filename  mv lex luther renames the file from lex to luther  mv luther /h

patching tasks

 Patching a Linux system is a critical task to ensure that the system remains secure, stable, and up-to-date with the latest features and fixes. Here’s a comprehensive guide to the tasks involved in Linux patching: 1. Pre-Patching Preparation Backup System : Ensure you have a full system backup, including critical data, configuration files, and applications. Test the backup to verify its integrity. Check Disk Space : Verify that you have enough disk space, particularly on /var , /tmp , and /boot partitions. Review Current Patch Level : Determine the current patch level and installed packages using package management tools like yum , apt , dpkg , or rpm . Check System Logs : Review system logs to identify any issues that might affect the patching process. Test in a Staging Environment : If possible, apply patches in a staging environment that mirrors production to identify potential issues. Notify Stakeholders : Inform stakeholders about the scheduled maintenance window and expected do