Azure DevOps CICD Pipeline Project | Real-Time DevOps Project

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] so let us understand the whole things uh from the scratch itself like uh let's say uh initially we did not have a like any kind of cloud platform for devops like Azu was not there or so so in that case in during that time what we were doing we used to set up our like GitHub account or uh gitlab account separately push our source code there right that will be considered as one tool secondly for the cicd part we need to set up a tool generally like most places genk is being used so that is second tool right thirdly in order to perform and don't worry I'll be explaining sonar Cube preview everything in detail in a minute and also like uh we want to perform code quality check and code coverage so for that we have a tool like sonar CU right that also we have to separately set up uh next like if if our project contains artifact build AR that gets created as a by part of byproduct while building the application so we can store or manage those artifact on a third party tool like Nexus or like jrog artifactory okay so these are the basic tools or general tools that we need to have minimum in order to build applications right and separately we need to build all these applications okay and it requires quite a lot of time it requires like some amount of storage we need to give and everything right also uh another thing that we need to understand that that if we are having multiple team members so each team member should be having access to there okay and level of access should be defined separately right so the the problem statement that we have here in case of like using just native tools on like local or like separately on our own machines what we need to do we need to set every tool up separately right that is the problem statement you can see secondly access should be managed separately like uh some person will be having full access to these platforms some person will be having just like uh read only access so those things we need to manage also we need to give them resources Resources by resources I means like see if you want to run genkins on rbe you need to give them some storage you need to give them some CPU Ram all those things right okay and again uh like all these things once we do then only we can get started okay and you know in devops basically any tool that exist it exist because it solves a problem right so we have a problem statement now it's not like uh exactly like a problem but basically it's like it requires too much effort right to set up all these all these tools and start with this uh like building and deploying applications now to solve this uh uh like this this kind of issue what we have we have Cloud devops platform okay at this point most of the uh like uh This Cloud platforms like auu AWS they are already providing a devop platform form separately which you can use to perform cicd okay most like uh like most widely used Cloud platform we have AWS and Azure now how much I have like used these two two Cloud platforms at this point I understand that AWS is much better if you want to set up infrastructure if you want to create just resources for usage while if you want to perform complete cicd build and deployment then Azure is best option okay now talking about how exactly azure like solves these kind of issues right so basically you know when you create account on Azure you can set up a platform which is known as aured devops organization okay now what exactly is Aur organization so let me explain you that first you know in Azure basically we have two parts first we have which is known as Azure cloud or you can also call them as uh Azure portal second part that we have which is azure devops now you need to understand this ke these two things they are separate platforms okay so basically azour Cloud what we do we can create or provision resources provisioning means creating or managing resources so what kind of resources we can create anything we can create with respect to Azure we can create virtual machines we can create ACR Azure container indry for storing our artifacts we can create AKs like a your kubernetes service it's like a managed kubernetes service which is managed by Azure platform okay then we can create uh like web app service so all different service we can create in Azure Cloud platform it's it supports like uh I don't know how many services but lots of services there there which we can create we can use it okay while aure DeVos platform it basically creates a platform for you which is already integrated with tools like a repo which is known as a repo okay now look closely key uh here we had GitHub for storing our artifact so on this platform separately you will be getting repo available okay secondly here here we are also going to see uh aure pipelines okay so now this this section aure pipelines it's going to be used for writing the cicd pipelines for build and deployment okay for separately we were using genin that mean that means we need to set up genkins for writing our cicd pipelines right that also comes integrated within this platform thirdly we also have uh a uh section which is known as Azure artifacts okay now Azure artifacts it's basically same as this one Nexus for storing any kind of application artifacts we can store it inside like on this Azure artifact things this tool now basically all these three things are by default integrated with Azure DeVos platform okay so here we have the benefit that once we create the account on Azure we can directly have this platform and we can directly start writing the cicd pipelines and perform build and deployment we don't need to worry about like setting up all these tools separately only sonar we need to set up because it does not come integrated with it but rest the most important things like performing the cicd thing we don't need to worry about setting up also talking about the access as I mentioned ke for you need to manage access also so that part also comes here like access management so we can give access based on the uh what level of access we want the user to have we can give access that is that that option is also integrated with a Dev platform okay and that is why at this point most companies are preferring to migrate their projects on cloud why because it reduces lot of effort because you know if you are like deploying your application on your like self hosted kubernetes cluster you took VMS you set up kubernetes and you are running your application there so if anything goes wrong it's you who need to worry about an it's you who need to decide what I need to do fix in order to fix our cluster right so that also requires lot of effort while when we set up a cloud kubernetes service or you can say managed kubernetes service on Azure or like AWS so that kubernetes service we just need to provide the information about how big a cluster we want rest everything is being managed by the cloud platform team so there also we don't need to worry about managing our Cloud platform uh Services right so you know basic the main reason while Cloud platforms are being used as much now as as compared to before is because you know they reduces lot of manual effort we don't have to do lot of things also in write for writing pipelines you know most most of the pipelines we can just write using templates now you can understand templates is like it's kind of blueprint we just to modify things and we can have the pipeline okay so that is also very very big benefit of this Cloud platforms Cloud device platform that we don't need to worry much about writing pipelines because we have the templates we just need to modify the template and then we can have the pipeline okay so this is why we at this point you know most company there are there is a company I cannot take name there is a MNC company you might have already have heard about it it's name start with a so basically you know one of my friends works there and the project in h in which he works the task of that project is just to migrate the company's uh internal projects to cloud from last 2 three years he has been doing that only from there I started to know that okay most of the companies are going with this option to migrate their projects on cloud because it reduces a manual effort you know another thing you know like if you're are going setting up all these things obviously it's going going to cost a lot of money you need to take virtual machines where you you need to provide some resources CBU RAM and everything and that is going to cost money right so and same thing what companies decide to do that okay we if we are already paying the money and managing the services by ourself so instead of that what we can do we can pay the money to Cloud platforms and ask them to manage our resources in that way it reduces lot of manual effort and that's why at this point most companies prefer to um like migrate their projects to cloud or side by side using cloud resources okay now anyone having any doubts till here till now do do all of you like understand why we have a zure as compared to why aure is better as compared to like these native tools yeah you are having doubt or it's clear okay yeah great okay so yes no no see the thing is key as I say Jenkins is what why do we use genkins we use genkins because we can write the cicd pipelines there right same thing asure for writing cicd pipelines we have this option Azure pipelines a tool already integrated with aure Dev platform I'll be showing demo also so separately we don't need to install genkins okay sorry we are just using uh Azure device as of now okay so now let me show you like how we can set up all these things okay just to let you know for those who are completely new to Azure if you are creating your Azure account for the first time I think it gives around $200 which is valid for one month so once you have like practiced enough you have watched enough videos on internet or YouTube and you are confident that okay now I can start doing handson then I would suggest you can create a free account using a debit or credit card I think uh okay and you can get initial uh $200 which is uh around like 14,000 something and you can use this amount to create resources within aure devops or aure Cloud platform okay so once you are confident then only create because this will be valid for one month I guess and yeah okay so now let us do one thing uh let us create our AZ DeVos platform so for me basically since I like uh I think already I have used already the free version of AZ devops long ago so at this point I actually use uh this code Cloud platform okay and here basically I can create a temporary as your Dev uh uh platform okay which should be valid for 3 hours I guess for me okay for you you simply need to go to Google and you can search here like uh create aure account aure free account and you can sign up there providing you like some Microsoft email it will ask you to create you can create and you can just register okay you can see it gives around $200 which will be uh available for usage okay so for me yeah this is the platform that I have created so let me log into it then I can do some demo let me remove this okay so once you have created your free account uh yeah once you have created your free account this is the first page that you will see now this is what URL definitely you should remember portal. azure.com this is the azour cloud platform aour portal page where you can provision resources any kind of resources that you want to use you can create for example few resources most commonly used resources you can see available here rest whatever resource you want to create you can simply search here for example if I search VM you can you can see it's suggestion that okay virtual machines you want to see you can click on that and resource whichever you want to use you can just click on create start configuration and you can create the resources whichever you want based on your requirement you can like size and those things you can Define and then you can create similarly let's say I want to create kubernetes so I can search here kubernetes and there are the these options and for me required one is kubernetes services so I can click on that and it will ask me that okay you want to create kubernetes cluster again again for creating kubernetes cluster we can provide all the information version and everything and then it will create okay so it's you can see it's like very much beneficial for us because we don't have to uh like put so much of manual effort we just need to have the configuration that is going to be required for our project like how many worker nodes should be there how many node pools should be there those kind of information then we can simply provide that information to aour and it will create okay and it's not key there are only these many services there are tons of services for example like one of the services that actually I use in my company is data breaks so that also exists like everything is there whatever kind of resources you want to create you can create from here you can simply search here okay now this is the portal aure portal page where we can provision resources and manage them okay talking about Aur devops so we can search here as azur devops okay first option that comes Aur devops organization so we can click on that and on left down side you see this option my aure devops organization okay so now the platform that we are going to create it's known as AER devops organization and the uh best part about this platform is that key we can create multiple platforms uh let me create again one second okay so it will require like basic details and you can just put it there like you your email your name your location the nearest location you can just put okay and it will take us to next page okay so whatever number of organization you have created you can see it here as of now since there is no separate organization I have created so I can click on create new organization okay and here we need to provide the name of organization any name we want we can put for example I can put it is it Master Class okay and make sure that this this option that we have we we will host your projects in so make sure that you choose the location which is nearest to you okay after that we just put uh need to put uh this uh capture let's see okay now this this is the first page that you will see once you create your organization also on left side if you see there is this option new organization plus our current organization name new organization that means if I click on this I can create other organization okay so basically to understand in simple ways this is what an organization looks like okay let's say I created an organization okay so basically inside organization we can create multiple project P1 P2 P3 before multiple projects we can create inside an organization and each project will be having separate whole list of like cicd pipelines repo and everything okay and if we are having separate projects it's much easier to give access to person to like specific project we can give access okay so coming back here let's say I create one project named as P1 okay click on create project okay so this project is created okay and this is the first page on your project whichever you create you will be able to see best part of you look at left side we have this overview overview basically going to show a little bit information about project like uh here like what what is your project about that information will come in Project stats we will see like how many pipelines are successed how many pipelines are failed in through in percentage format then here we can see members members who are part of this project or having access okay then we have second option which is Boots now at this point people who are already working in companies you might know there is a ticketing tool exist in every company which is known as uh jira most commonly used ticketing tool is jira so alternative to jira we have boards here here also we can create task and tickets and it can be assigned to people so that work progress can be tracked tracked means like obviously if manager is going to give some task to you they expect to see the updates what is the update going for example if I click on create task okay here we can Pro provide like uh some title that this is the task uh to be done and some detailed description okay then we can assign it to some user who is part of this project and we can save this so after that what happens whenever user is doing something whatever he has done he's going to update that in discussion section so next time if manager wants to track progress how much task is done they can simply come to Azure boards see the list of tickets like which on which ticket who is working on and they can see the progress there okay so similar to ticketing tool we have boards here and here also we can create tickets and task and everything and it can it can be basically used to uh see the track the work progress okay then we have Azure repo Azure repo is similar to like uh GitHub or gitlab best part is that it also is going to use the git commands only okay so basically what we can do we can create uh like push our uh source code inside Azure repo and best part again separately we don't have to set up Azure repo it's already coming inside this project okay and you can see this option generate G credentials basically you can click on that it will generate the username and password for this uh like uh project and you can use this to uh like git push git command those things you can work with this okay then we have this option uh existing repository from command line so this like if you are already having an existing repository then you can use this third option also we have import reposit it so if I click on that basically if I have a project somewhere else which I want to just put it inside a Zer DeVos for usage I can simply first of all repository site type you can select generally we have git and git is one of the most widely used that we can use then we have like tfvc also uh it is like one of the service of aure only okay so generally with Git what we can do it's it sorry uh guys it's already recording do not worry yeah okay so now what we can do we can simply like this is one of the project that I have recently worked with so I can copy the get URL of this project and I can simply put here now if your project is private then you need to click on this option you need to check requir authentication provide the username and token then only you'll be able to uh like import it but since my project is public so we don't need to provide authentication so we can click on import what it does it's simply going to uh clone this Repository inside aour report okay so let's wait for a few seconds and once it is done then we can proceed to next step okay this is done now if I click on Repose we can see our project is been uh like cloned here along with all the branches that we have okay now uh yeah before we move to pipelines I want to show you one more thing so basically in azour we have two kind of pipelines in azour devops we have two kinds of pip P line one kind is known as classic pipeline which is like uh which is like very much easier and many companies prefer to use this for like small projects it's like very easy to use okay second option that we have is known as yamal pipeline okay the good thing about both kind of pipelines is that this is the easiest and even though some people know okay they may not know how to write yamal pipelines but still we have a very good options of variable using which we can write yaml pipeline basically we can generate the code which we want to use in yaml format and we can just put it in our pipeline okay so both these options are available now let me show you how we can get both the options so if I go here now if I go to pipelines where we can create pipelines okay by default you see there are only two op three options available pipelines involment and Library if I click on create pipeline so it's going to give me just an option to write yamal pipeline okay but you see there is no option to write classic pipeline so how do we get that so basically what we need to do we need to First go on our uh organization and left down side you can see this option organization settings so click on that and here we need to basically uh by default what it does uh it's going to disable the classic pipeline but we can enable it we can scroll down to here pipelines then settings and scroll down you see the last two options disable creation of classic build pipelines that is enabled so we are going to disable both these options okay once we have disabled them then going back here and going back inside the project now you see we have uh releases option available and deployment groups also that means now we should be able to create the classic editor pipelines right one more thing team before we start writing pipeline so I'll show you see this is like project one where we have all the tools separately right now let's say I want to create another project let's say P2 this also I'm keeping private and click on create okay now you see interesting thing is that each project will be getting separate set of repos pipelines artifact all these options separately will be coming okay that is very good thing because each project will be completely isolated from another project okay and yeah again as I say inside like organization you can create multiple projects and you can create multiple organization also okay now coming back mhm we can use but no no no no sorry uh access see uh it it is not recommended and basically I have not tried that because usually see because there is no point in using repo from our second project to First project because you know each project will be having separate set of access okay so based on that if like access is same if some person is going to use it access the based on that we can see but by default I wouldn't recommend to do that because you know what you can do let's say you want to have project from second one so what you can do you can simply create new repository in the same project you can create a new repository and then you can push that code and then you can utilize it that will be the much better option yeah so now coming to pipelines now what we can do we can click on create Pipeline and now you can see along with yaml options we have this classic editor option also enabled right so we can click on that and now let me show you how we can create classic editor pipelines so here first of all you can select a source you know you can even build a project that is not existing on aure repo if it is existing outside bro let's no no no so let's do those things afterward let me first uh teach everyone okay yeah see so here uh for creating pipelines basically the source uh of the code where it can exist we can pick up from other places also from GitHub also use from gitlab also use okay so that we can select and by default it's selecting a your Repose kit then you can select the project then repository and then Branch okay let's say I'll be going with main branch okay click on continue and here we can select the task now this task will decide ke what B you need to select based on what kind of project you are having so for me I'm having having Maven project so I can select Maven right but here we have other options also if you have different kind of project you can based on that you can decide what task you need to select so for example I'll go with Maven as soon as I select Maven this page is created and this is our pipeline here we can rename in so uh let me write it as first CI pipeline okay now talking about what things we are having here so first option you see here pipeline okay here the name like display name we can select then agent pool what is Agent pool so basically in Azure devs agent pool is basically just a group inside which multiple agents will be there now what are agents so if you remember in Jenkins or GitHub actions also in genkins basically if you want to build application if you want to build application on uh inside Jenkin so generally what we do we create we take a virtual machine and make is make it as Jenkin sleve right and we installed all the tools required for the application to be built on this sleve machine and then we built our application on this similarly in case of uh GitHub actions what we do we we take a virtual machine make it as a runner runner is also similar to slave a third party VM where we can install all the tools and then the we can build our application okay so similar to that Azure also have its own version of uh like agents so two options we have initially you can use the default aure pipelines vers option where you can simply select the which uh like which virtual machine you want for example let's say I want to use one to latest that we can use but the problem at this point long ago like uh I think 2 years back basically whenever you selected this option everything would be fine your project can be built on uh machine which is UB to latest type but at this point if I try to use this the free version of like agents for building our application it does not give us permission to do that for that we need to uh like create a form we need to send that form fill that form like provide information about why do we need a free agent and we need to send it to Microsoft okay then only based on their uh like if they decide to give us access then only we will be able to build our applications on that but in generally in companies what happen they are going to bring their bring their own virtual machine and as like add that virtual machine as an agent Okay the reason for doing that is like the companies prefer to have complete control over the agent where they are going to build and deploy applications like build applications or what run different commands Okay because if I use this option so I won't be having access to this machine but if I'm using my own virtual machine as an agent then I will be having complete control over it right so now so what we can do basically we can create our own agent pool and add a virtual machine as a agent that also I'll be showing okay for now I'm just selected this coming here again here we can just select like which resources where is the source code that we can Define and we can select it again this time we have this option again agent selection okay so generally I'm just selecting for now as your pipelines uh please whoever it is please mute your mic okay now okay then we have like default task that we have for Maven so here we can write like uh let's say Maven uh test any name you can write it's just a uh uh like display name p file so pom file as you see it's like already on root directory so it's coming here in goals so let's say I want to perform test so I can write here like whatever command we run Maven package Maven test so those things we can just write here okay then rest we don't need to change anything then we have this option so basically you you know uh managing artifact so let's say uh the artifact that is going to be generated for our uh Java based application it's going to be jar so what we can do first we can put that artifact inside a staging directory staging directory is a temporary location where your artifact whichever you want to put will be stored so here I have defined that this is my uh project directory right inside that only the artifact will be getting created after build right so here I have written uh Slash uh like uh like like a regular explosion so that it will be able to find the jar file on my project folder once it is found then it's going to publish this that project sorry publish that artifact on a uh artifact directory okay we have this option publish artifact directory and it will be automatically directed automatically stored there okay the reason for separately storing this artifact is that key we would be if we would be like very easily able to access those artifact okay now if I try to run this pipeline just now it's going to give error why it's going to give error so let's show let me show you that as well uh I can just simply trigger that and here we can track the progress and let's wait yeah so it gave error what error it g it gave you can see no hosted paradism hasn't purchased granted so as of now we are not having any kind of agent right and here also it gives us a link for a form on which we can send request if I open this form in a new page let's see so basically this is a form where you can provide your details okay and everything and based on that they will decide if they want to give you free access or not on the agents okay so in order to make sure that since we are not able to run now right so what we can do we can take our own virtual machine and add it as an agent how do I do that so for that what I'm going to do I'm just going to create a virtual machine on AWS okay since I I've been using AWS for quite some time sorry bro your your audio is not clear yes yes okay bro ask doubt afterwards okay because the thing is ke the platform I have created it's valid for uh 3 hours okay so let's just let me just complete this whole thing then we can take questions as much as you want okay yes so what I'm going to do now since we uh I'm going to create just one virtual machine and on the same virtual machine I can set up doc uh I can set up this sonar Cube also and trivia also which can be used later so let's say I'm going to create a server just name it as an uh server taking open to machine and I'm using the latest version which is 24.4 uh let me just select it it and instance type so I'm going to go with since I'm going to set up uh sonar Cube also on the same machine so I'm taking T2 large key here that I already have and then we have uh Security Group okay now just to show you the SEC uh the ports that I have opened on my security group let me show you so these are General General ports that I generally uh like open on my virual machine except this one you can open all of them which will be mostly required in your case okay this is the most important one 3,000 10,000 because most of the things that uh like I run on this port only okay so now we can create the virtual machine and storage I'm going to give as 25 and launch instance Let me refresh the page Okay so we have the IP address the machine is not yet up but it will be up in few minutes I guess so now what we can do in order to connect to this virtual machine we can use a tool known as mob xtom okay so if I I already have this mob XOM on my machine on my laptop so it's available for free and I I'm using portable version the reason for using portable version is that key even if you're trying to do something or access virtual machines on your office laptop or office desktop you can work with it because it's just a folder that will will be downloaded okay and once you have downloaded you can simply click on this and this will open the moxt so how do we connect our virtual machine so I can click on session SSH IP address that we have for machine and the uh username so one to machine we have the username one two then using the private key that is already present on my system okay if I just go back here instance basically you know uh if I click on launch instance so here we have this option keep so if you're doing this for the first time make sure you click on create new keer RSA Pam file and you can provide any name as soon as you click on create key pair it will be that key will be downloaded on your local system which you can use for me since I'm already having this key on my local so I'm using it okay now here yeah so here I can this I can browse to the location on which my key is kept which is devops. PM file click on open and click on okay I'm just going to rename this to an agent click okay and I will just access it again okay so now my virtual machine is created and it is up and running also so whenever you work with any virtual machine basically Linux so First Command that you are supposed to do Pudo AP update AP can change based on like what kind of machine you are using so what it does uh like you know by default there will be lots of packages available inside this repository for this virtual machine so in order to make sure that they are available for usage we need to run this command which is going to update all those and then they will become uh available for usage okay so let's wait for this to complete also if I go back to my Azure platform talking about how we can add a VM as a uh as a agent for our uh Azure devop so basically I can go to my organization now you know two cases could be there you want that your agent should be available only to one project or should be available to all the projects in an organization So based on your requirement you can decide where you want to create for example if I go to organization settings scroll down to here pipelines agent pools Okay click on add pool so when you create like pool here and when you add agent on the organization level so that agent can be available to all the projects but in case your requirement is that that pool should be available only to one project then you can go to Project settings here also we have agent pools and now if you set up your agent here on Project level then that agent will be available only through the project okay so let let me set up on organization level only process the same actually okay and here so first we need to create agent pool agent pool is nothing different it's just a group inside which we will be having agents so here I'm going to select selfhosted agent name so I'll just just put as ARA and you can see uh by default this option comes Auto provision this agent pool in all the project Okay click on create now agent pool is created now we need to add the agent how can we do that so we can click on agent and click on new agent now it's going to give us the command that we can use to add this add any virtual machine as an agent what kind of machine we can use Windows Mac OS and Linux since I have Linux machine so I can go with it now here also based on your machine like what kind of machine you are having based on that you can decide which package you need to get okay so First Command that we have is like we need to download a package of the agent so I will copy the URL First Once I have done that so I will I'm going to download that package this vsts agent package you see it's a package that contains all the required files that is going to make the virtual machine as an agent okay Second Step that we have is to create a folder and we need to go inside that folder see all those commands are available here itself so I can copy that and now what we have to do we need to extract that package that we have downloaded right so for that I can run the command tar hyen xvf SL home/ 2 and the package is vsts so I'm going to extract it now okay now here you see there are multiple shell scripts created out of which two of them are are very important for us config.sh and run Dosh now config.sh shell script that you see here it's the script that is uh that we are going to execute in in order to make this virtual machine as an agent all the configurations we are going to do when the configurations are successful then we can run the com run the shell script run. as such to start the agent okay so First Command that we can run even see same command will be written here you see/ config.sh right same thing we can do slash config dos now you can see this is like started the process started and then we have this option enter yes and no accept your team Explorer so and so okay so I'm going to accept the terms server URL it is asking like if we are going to add this agent to a Ser our Z devops platform we need to provide the URL right what URL we need to give till your organization you can give the URL copy that and simply paste it here now it is saying authentication type so at this point know like in most of the tools it is preferred to use a token instead of password because token is much more uh like uh better access and sorry it's much more better why it's better because it's not as like regular Ward it's like a random Ward very long also so where do we get this Pat so for that we can go back here let's say close and we see this option user settings so click on that and we have these many options out of which second last option we can select personal access tokens so click on that now we can create a token for our own let's say I can provide any name and you can set the expiration also like how long you want this uh token to be available and then Scopes Scopes is level basically level of access what kind of access you want to give that token so by default you know based on what is your requirement you can decide okay if I'm going to use the uh token just for release then you can use this just for build then you can use this for me I create one token and use it like everywhere so I just can go with full access once we have the token created you need to make sure that you are copying it somewhere because it won't be visible afterward okay so now we have the token also created we can put it here um sorry about that plus enter now we can put the token here and you can see it says connecting to server now it is asking agent pool name so the agent pool that we created was named as Aditya if you remember now it is asking agent name so any name you can give I'm just going to go with agent one okay successfully added the agent testing agent connection now it is asking work folder so work folder you know whatever task you are going to do there whatever application you are going to build so that will be having some work space so you can decide ke you want the workspace folder the default one also or you want to create anyone else so so basically I'm just going with underscore work that will be the folder inside that all the whatever things we build will be visible so I can click enter and Now settings is saved and you can see it is existed now if I go back to our aure DeVos platform and go to organization settings agent pools Aditya agents so here you can see agent one is added but it's saying it's offline so it is offline what we can do as I told before that in order to start the agent we need to run the shell script which is available run. as such if I click enter it's going to start to run yes you see it says listening for jobs that means it's waiting for any job to come and you can see now the status is online also now the agent is set up but as of now we have not yet uh like installed any tool like Maven dock or anything so that's what I'm going to do now so I'm going to stop this okay and now uh let me come out of this okay so now let us install Java M and all those things so I'm going to install Java first and since we have latest is 22 but I'm still going to go with uh 17 because the project that I'm using it's uh it's having the jdk being used which is like jdk 11 so 17 will be working fine and also like 11 is getting depreciated I heard last time so that's why like I'm not using 11 as of now okay so Java is installed next we need to install is Maven so that we can do sudo AP install a maven also meanwhile these things is done let me explain you uh something about sonar Cube okay for those who are new to sonar Cube so sonar is basically a tool that is going to perform uh code quality Check Yes wait wait wait code quality check and code coverage and what exactly they are so basically you know once you have the source code ready so your code may have different issues like code smell code vulnerabilities or like bugs or any such kind of issues so those issues can be found out using the first option code quality check that is what code quality check that means ke if our source code is having very less number of issues like bugs code vulnerabilities technical date all those things if it is very less then we say our code quality is good okay but if there are like there are huge number of those bugs Vries and everything then we say that code quality is not good okay so that is code quality check second we have code coverage so basically code coverage what is code coverage let's say I have 10 test cases in our sonar cube right so the the task of these 10 test cases basically is to test test the functionality of 100% of code okay so if once I executed my all the test cases and it was able to test the functionality of 80% of the code then we say that 80% is code coverage okay if if uh like running test cases if it is able to just cover let's say 60% of code 60% of the functionality of the code then we can say it's the 60% is the code coverage whatever the percentage of code that is being covered with test cases then we say that percentage is code coverage okay now one more thing you need to understand here Cas since code coverage is dependent on test cases that means ke whenever we are creating our pipeline we need to make sure that test cases execution happens before sonar Cube then only code coverage will be working else it won't work also one more thing you need to understand that sonar Cube generally on YouTube like I have always used Community Edition right which is the open source or completely free edition of sonar but there is another version which is developer version of sonar CU okay one of the main differences between uh community and developer version is that for Community Edition you can just perform analysis on a single Branch or the main or Master Branch okay that is one of the limitation while develop with Developer Edition we can basically use this uh whole process on like like analysis on multiple branches okay so how do we get this feature so basically you know recently what not recently like long ago some developers they created a plug-in they created a third party plugin and they installed that plug-in inside Community uh version that plugin is known as Community Branch plug-in now what does this uh uh this plug-in does basically it helps you to use the community version of this on RQ but still perform analysis on different branches so the Developers feature one of the developer feature you get for free okay but again uh two ways to set up this plugin one is that you can download the jar file and you like you can get the jar file of this plug-in and put it in back end of sonar Cube on the certain location which is something like this extensions SL plugins here you can download the jar file and restart sonar Cube then plug-in will be working fine second option is that key we can use a Docker image which is already having this plug-in pre-installed okay so what I'm going to do I'm going to use the docker image I'm not sure if anyone even has said this on YouTube but we can use a separate Docker image not the normal Community version of some Cube Docker image we can use a custom Docker image okay so what we can do I can go here search for uh Community Branch plug-in and the first GitHub link that you see so here you'll be able to find the docker image name if I scroll down you see this option Docker and this is the docker image name that we are going to use it's going to install latest version okay now as I say why we are going to use this sonar Cube because it will help us if you want to perform analysis on different branches we can do it using this okay now Maven also here we have installed next thing we need to install trivy so trivy generally like I I have separate like set of commands to install Tri but since it is latest version that command won't work so by default in this version of12 we have snap package of trivy so we can simply execute this and that will install trivy Okay so let's wait for a few minutes once triv is installed we can set up our sonar Q immediately for that we need to install Docker okay so let's wait for this and meanwhile let me check 143 yeah we have time okay I guess triv is installed we can just confirm it trivy hyph hyphone version and it should be showing the version of trivy which we have installed 0.4 9.1 okay now let us set up Docker because we are going to install sonar Cube through Docker so I'm going to set up sonar you know one good thing about like uh to is that if you don't know any like Packaging installation command you can just type the name of package or the tool so if it is available in the default package of Linux or to machine whichever you are using you will get the commands for example for you can see for Docker I just got the AP package command so I can install it and also by default basically you know by default not all the users will be having access to execute Docker commands so what we can do in order to make sure that one to user is able to execute command either we can run this which will give access to other users also or we can specifically run this command which will give access only to one to user so for just demo purpose I'm going to execute this which is going to give access to all the users okay for running Docker commands so I can just paste it here and just to test if we are able to execute Docker commands I can run the command Docker uh pull hello world I can just pull a image just for testing purpose and then we will know okay if command is working or not okay so we are able to pull that means command is working now let us up sonar CU so I can run the command Docker run hyph d hyund d means in running in detached mode or you can say in background then I can put a name also of our container which is going to be sonar then we can provide the port information so two ports we need to provide which is one is going to host Port second one second one is going to be the container Port host Port is the port that is open on this virtual machine container Port is the port that is going to be open on the container okay and by default sonar Cube runs on 9,000 so I'm going to put that and here we need to provide the docker image name so sorry someone saying anything so this is the docker image that we are going to use and let's wait for this to pull the image locally and it's going to create the container and if you using this version of sonar Cube uh like uh Docker image then you would be able to perform analysis on all the different branches instead of just uh like limited to master Branch okay basically you know how I got to know this in my previous company I was given a PC to figure this out and recently I got to know okay there is this separate plugin available so I downloaded the plugin installed it in backend through manual okay so sonar cube is installed what we can do we can try to access it sorry about that uh I can get the IP address on which sonar container is created I can just paste it here itself Port 9,000 and you can see it is starting okay so it will take few minutes meanwhile what we can do we can configure other things also I can go back here now as of now agent is not up and running okay but since we are uh we have installed Java we have installed Maven we have installed trivy we have installed soar one specific thing we need to do here for Java and Maven we need to Define capabilities capabilities is basically some kind of requirement that will be needed while running an application so for our Java based project we need to make sure to Define previous like predefine it that tool like Java and Maven both are present on this uh agent so that we can do by click on capability first we I'm going to write Maven and value it's going to be true that means kaven is present okay same thing I'm going to do for Java as well and here also I'll be writing true okay so this part is done and let us log to sonar so by default the username of sonar cube is going to be admin and password is also going to be admin for the if you're setting it for the first time this will be the default values click on login and let us set up new password so sonar cube is set up now and you can see installation of plugins a plug-in has been detected that means that's what I was trying to say he there is a plugin known as Community Branch plug-in that is a third party plugin created by different de developers to avoid purchase of De like Developer Edition because it it it is costly okay so I can click on understand the risk and this is the latest version of sonar Cube we can confirm by going to Administration and here system so we are using the versions 10. 3.0 which is one of the latest I guess so sonar cube is set up right Next Step what we need to do we can go back to project okay and now let's let's do one thing let us start our uh agent also so I can go to my agent I can/ run Dosh and this will start the agent agent let's wait for this okay so agent is started now uh before we start integration of all those tools AR and everything let us just run it one time to see if we are able to use our agent or not so uh one second give me one second let me use different Mouse initially it might seem little bit hard but once you watch the video and once you practice it one time it will become very easy okay so agent pool so here we can select the agent pool that we created which is adya and here you see this parameter so basically you know when your palom file is present on root directory that's why it written just pom.xml if it in case it is present somewhere else you need to provide that path here second option is this we are not going to change then we have agent okay and here also we are going to select our own pool that we have have created rest nothing change and here uh we are test running the test case right but here the thing is K jar file won't be present so let me just add one more task you know it's very easy we can just clone it and here I can write the command as package Maven package and what it's going to do it's going to build the application okay so now I can click on Save and one second this is fine yeah so I can click on Save and Q if you just want to save it and not trigger it you can click on Save and if you want to trigger it you can click on Save and Q and here if you want to put some comment you can put else simply click on save and run and now let's see the status same thing like if I go here so here you can see running job agent job one so that means our the agent that we just added it has picked up the uh this Pipeline and it is able to run so now let's see first stage is check out creating a local copy of the repository second we have Maven test which is to run the test cases okay so let's wait for this okay meanwhile this is getting done what I can do uh maybe I can create the cuberes service because I'm not sure like how much time it takes to download all the dependencies okay uh okay it's yeah okay it won't take much time I guess also teamc very be very clear about this thing AWS versus AZ devops so from my whatever experience I have like total five working with these things so AWS mostly is much better for infrar rated things if you want to create some resource eks ECR and use it it's better but if you want to create pipelines for build and deployment Azure is much better in that okay so it's almost completed you can see here it says uploading two files okay I'll show you what files and which files it's uploading so I guess pipeline is Success now here you see this option one published okay if I click on that it takes me to artifact location where we can see a drop folder if I expand it you can see we have two folders here one is like Maven which is like some default folder and one is Target folder which is the one that we are we want to use Okay the reason for like publishing these artifacts separately on drop folder is that key we can download it we can directly download it so in case we want to keep these artifacts locally we can download it very easily and we can keep it on our machine okay so now first step is completed now next step we are going to integrate different things okay so first we need to integrate let us talk about integrating uh sonar Cube okay just remember this uh package you don't need to add it here it can be later also okay I just added so that we can have we can see thear file okay now talking about adding sonar Cube stage so how how we can do that because by default sonar won't be available inside Aur DeVos platform so basically you know similar to Jenkins in Jenkins we have the option to download plugins right similar to that we have azur devops Marketplace you see this option browse Marketplace so basically we can uh please mute your mic so basically what we can do we can go guys please mute your mic so basically what we can do we can go to this uh extension Marketplace and there instead of calling them plugins we call them as extensions for example if I search here as sonar CU so we should be uh able to see some plugins which is from sonar Cube you can see sonar Cube and sonar cloud is available sonar cloud is simply like you can use a uh publicly available sonar CU platform okay and here you can see the tick mark also that means it is the official plugin so I can click on this click on get it for free and it's going to like ask me to install like if if I want to add this extension in our a Dev platform or not so let's wait for this to come uh here also it's okay so yeah here in case you are having multiple organization you can simply drag drop sorry you can expand it and you can select it click on install so since I just have one organization at at this point so I'm adding it right and now it's added so we can go to our organization back go to Project pipelines click on edit and click on here plus icon and now we can search sonar Q it may not be yeah as of now it's not available because it takes few minutes to be like uh after we install extension or plug extension it takes some time to get like available so let me just keep trying and we should be able to see somewhere yes so you see these three options are available now right so first I will be adding this prepare analysis configuration and I can uh rename this to uh sonar Cube prepare configuration andm you can get based on requirement now it is asking sonar Cube server endpoint basically the server where we want to publish our report we need to provide the URL as of now it's not present right so we can click on new now basically you see this option new service connection service connection is a way for authenticating to different servers through our res devops okay so here we need to provide Serv URL we can get it from here I can copy that paste it here make sure that remove last slash and we have token so token we can generate we can go to Administration security users and as of now we just having just one user so we can create a token for that same user we can put any name expression you can select and generate now this token again you need to make sure that you are copying it somewhere because it won't be visible afterward so we can paste that token here and we can give a name name can be uh sonon or anything you want you can put it and I'm giving the access to this like service connection to all the other pipelines in the same project click on Save H it's added now we have the option to choose the way you want to run analysis we have three options integrate with Ms build integrate with Maven or gradel integ uh use Standalone scanner now if you are having net based project you can go with this if you having Maven or gradel you can go with this the reason that since even I'm having Maven but I'm not using this option the reason that I'm not using because these are specific to Maven and Gren only and I want to use a way which can be effective irrespective of the programming language based project so I can go ahead with Standalone scanner that will be useful in different that will be working in this also working in this also now we have this mode so basically you know we need to provide certain properties of sonar cube in gen since we used to write like that hyund D sonar so and so like hyund d sonar project name hyund d sonar project key similar to that we need to provide here so two options here also we are having sonar. project. properties so this is a file that we can keep in our uh repository or we can manually provide that so manually also I'll just go with just for those who want to see how it looks let me see if I yeah see so in this format same thing you need to put that what whatever I'm going to write here same thing is written here also but we have defined that it should be taking values from here project key so I can put Port game and same name I'm going to put as project name as well and this Source root directory so just a DOT that means current directory and then we have this Advance option so in case of java we have binaries file also so sonar Cube requires access to those binaries file so that we need to provide the location here we can do sonar do Java do binaries equal to we can put like Target slash sorry Target yeah so uh it's a folder inside which sonar Cube will look okay in case like you are not confused key you are are confused like we to with put you can simply put a dot also and sonar will be able to find those details okay now this is done next step that we need to add is the actual analysis so again I can search sonar and add this okay and here make sure you do not you're not changing anything okay so this sonar cube is also added now let us talk about adding trivy so the thing is you know uh if I open this in new page in market place we have triv extension as well if I search here ring so it is available but the reason that I was not uh using it because there was no tick mark so I I I was not sure that if it is from the official uh trivy or not that's the reason I did not use it okay so instead of that what we can do I can search here as CMD because trivy is already installed on my machine so I can add this and I can write the command Tri scanning command directly here so I can write here as uh let's say triy FS scan and the command to perform trivy scan is that triy FS uh hyen hyphen format because you know if you're generating the report in text format it won't be user friendly format it won't be in table format so what I want I want to generate the report in a table format so that next time if anyone is going to analyze the report they would be able to see it properly so format I'm going to set up as table and output so hyphen uh o and I will write the report name as trivy Das fs- report. HTML let me see uh yes and then I can just put a dot that means can scan the current folder okay now Tri stage is added we can run it one more time just to see if it is working fine or not the stages whatever we have added if it is able to get executed or not so meanwhile it is getting executed we can try to set up our uh Next Step which is for Docker okay meanwhile once it is completed we'll check out that as well for Docker now Docker is a very strange thing in in this case if I search Docker multiple option we have we have this option also build and push okay and here if I try to save this I'm not sure if it is going to get saved okay great so it is saved now right here what we need to do container registry so where exactly we want to publish our artifacts uh Docker images so again there is nothing present so we can click on new we need to set up new service connection options what we are having Docker Hub which is the public one others if there are any other kind of like private Registries and then we have aure conry which is inside Azure itself so I'm going to select dockerhub provide username and password and I can verify if my username password is correct correct or not so verification is successful we can provide a name as doc con Grant access and verify and save meanwhile let me see the status of pipeline so an R cube is running okay so yeah let it be uh we'll meanwhile we can configure here so service connection we have created for Docker also talking about container repository so we need to provid a repository name where we want to publish our Docker image so I can put a name as let's say ADI jell and uh board az1 2 3 just B your would be fine so this will be the repository on which our Docker images are going to be post and here so here you know you need to provide the location of Docker file where it is present as you can see what I have put I have just used a regular expression to Define that it's present on here itself Docker file right and here taxs so taxs based on your requirement if you want to have Dynamic tag you can put it here I'll just go with latest okay and these things if you want you can remove them or not also okay so I can just save this and meanwhile we can take a look at our pipeline so pipeline is Success right so if I go to sonar Cube we should be able to see the sonar Cube report and it is here and you can see code coverage which is also coming that means ke it's working fine right and here you see this option you see this this is an expandable option you can see this uh Arrow key this is available because we are using the community Branch plugin okay coming back here so okay as I say Docker is like definitely it's going to have issue so whenever we try to configure first time it's give some error so you can see yeah so I'm just going to refresh this page and try to configure again the docker stage I'll select the this one which is already available and registry is going to be the same that we wrote previously which is board aure uh yeah this is fine board Azure and here I'm going to put the tag as latest okay and also what I'm going to do I'm going to create a clone of trivy to scan the docker image so I can write revie image scan and here we are going to write revie image and here we can write previe image report and then the docker image name so it's going to be this one latest okay so let us save this and let us start also and let's see how it it works out so meanwhile this is being done now we can start creation of our kubernetes cluster where we are going to deploy okay so again I can simply I can go back to portal. ao.com and here we can search for kubernetes and click on the first option cuetes Services expand it click on create a cuetes cluster and here we need to provide different information so subscription the one that I'm already having it's going to be selected by default if you are having multiple then you can select the one that you want to use then we have Resource Group on which uh the resource I want to create that is also already available you can create also new cluster details so since this is demo here you can see it's properly categorized if you are going to create production standard Dave test production economy or Enterprise so I'll just go with da test for demo purpose and here you can put a name I can put a KX uh devop Shack and here yeah see these things I'm not touching it because by default whatever is written here it's coming as default and basically in case of code Cloud basically they have some limitations lot of limitations is there actually so uh I try to use like the lower resources so that I do not get any kind of issues and resources that we need to look for yeah these three points we need to make sure that we are uh like remembering that means we should be taking the node pool size should be D d4s V3 if I go back here uh we can click on next node pool so basically I need to change this I'll go here and CPUs uh yeah d4s V3 this one uh d4s V3 yeah so correct one I have selected I can click on select and number of node pools uh like number of node that I want it's going to be just two maximum ports should be created it's like I'm just going to put as 50 see these things may change based on your requirement in the company okay and yeah click on update and what else we need to change next uh networking configuration which one you want generally like a cni is used even in my current company like we are using the project we are using so in that we are using cni only and policy we will just leave it as it is next and disabled so alerts also as it says like I need to disable it so I have just disabled their alerts also click on next next and now what it's going to do it's going to validate the configuration that I I have given it's going to validate okay if it is allowed to create or not because I'm using a third party subscription so they have certain rules and policies set up that you need to use these resources only so it's going to validate now all the configuration that I have provided if it is in if it is aligned with the policies created and you can see it's it's correct okay so uh what I can do I can click on Create and this creation of cuberes cluster it takes quite some time so just let it let us wait for it and we can yeah so here we can see that our pipeline is Success all the stages are successful just to check if our Docker image is created or not we can go to dockerhub we can go to dockerhub repository and we should be able to see our Docker image that we have created you can see well Bard as your last push 2 minutes ago okay so that means that is also working fine now we now we can basically this is the CI pipeline the pipeline that we are running till now it's a CI pipeline now we can configure the CD pipeline in case of classic editors we can create separately release pipeline or you can call it CD pipeline okay so we are going to configure that before that just to let you know team uh batch five is starting uh I think next week uh 18th of May so for those whoever is interested you can just register register all the syllabus you'll be able to find in my telegram Channel Side by Side here also you'll be able to see and one thing the reason that uh like I'm telling here ke most of people are suffering from one thing in case of interviews you lack the part real time things so that's what I tried to focus on because since beginning as I started my career in it sector so I have been working since beginning as a devops engineer and at this point I have worked on more than 31 projects and everywhere I have seen like uh like branching strategies different production envirment and everything so whatever ways that I have used tools same way I try to teach and I try to teach inside out even for sonar I'm not sure like people are using this same ways or not this separate images or not but since it was given to me as a puc that ad you need to figure this out you need to solve this problem this was a problem that we were unable to use uh or perform analysis on the community version of uh sonar okay so yeah whatever I have done whatever the ways that I have learned uh in my previous company same thing I try to give in my course and best part is that in my previous batch batch four many of the students have taken multiple offers interesting thing is that many of them have very less knowledge in uh in devops but through course they learned the real time things how things happen so that way they are able to do do that girl also who took like seven offers recently within in apparel itself that she she also like studied from that okay so if you're interested you can just find all the details in uh in the telegram group on my YouTube channel on my LinkedIn everywhere you'll be able to find you can register if you interested we'll be having live sessions on weekends but since our syllabus is quite big so in order to cover everything in limited time what I try to do I take live sessions where we can have doubt sessions also uh you you not restricted to ask any questions in the group like in the call you can ask any questions you want and uh like on week days I'll be uploading recorded videos So based on that we'll be able to easily complete complete syllabus okay coming back here so yes so duration from my side I have given around like 2 months where I will be completing teaching everything so if you are practicing and learning side by side with me within 2 and half months you'll be mastering the course you'll be having complete knowledge and you know it's not you know lots of people are teaching g g branching and so so General branching strategy everyone is able to teach key there will be five involment QA PPD de prod and Dr the thing is key as I do consultation also in my current company for branchings so uh see depend on depending on how many involvements we are having based on that we need to decide what kind of branching strategy we need to use like for example in my previous company we were having just q& prod so how we are going to perform all this PPD task and Q uh PPD do prod Dr all those things how we can manage it those things also I try to teach so so whatever my teaching is there it's not the general teaching it's completely real time so that you get real knowledge how things happen yeah yeah so sure so interested people you can just check it out now so coming back here so deployment is complete we can click on go to Resource and we should be able to see our uh kubernetes cluster created okay and ignore this it not it's not going to cause an issue now where we this is the CI pipeline we have created now in case of classic editor we can go to release pipelines and we can create the uh release pipeline before that one more thing artifacts okay so the thing is you know there is a tool Nexus similar to that we have artifacts in uh uh this Azure devops where we can store your artifacts in nexcess we call repositories where we store artifacts here we call them as feed so if want if you want to connect to feed you can click on connect here and here you can decide the kind of artifacts you are having for example I'm having Maven so I can click on that and in order to configure our project so that we can publish our artifact to that so we need to add these things this part in our uh pal. XML file once we have added it then second this is basically adding the URL repository URL H but second section you see here it is basically authentication you can see here username this and personal password is personal access token so this is the authentication part okay so for this like a your artifact we can use for publishing artifact I'm not using it right now because uh I'm already like publishing my artifact to a drop folder which is also accessible but yeah this will also I'll be creating a soon a separate video because it it is a little bit complex as compared to the uh whatever pipelines we created okay coming back to our release pipelines so we can click on releases and here we can create our release pipeline right one more change that I want to show you uh like automating so let's say I want to completely automate that if I push any kind of changes to my CI uh the repository so that will trigger the C CI pipeline first then CD pipeline afterward so how we can do that that also I'll be showing meanwhile let us just create the uh CD click on here and and let's I'm just going with empty job as of now let me rename this first CD pipeline here we need to add an artifact okay so artifact you know to uh main thing that we want is the uh deployment uh that yaml file manifest files because using that only we can deploy the application so what changes we need to do because as of now if I one second if if I go back here as of now we are just storing the artifact to drop folder but not the uh we are just storing the jar file to drop folder but we are not copying anything else so what I'm going to do I'm just going to add one more task which is going to be uh clone of this and I'll just provide the name as uh copy uh manifest file and here instead of this I can provide the name of my manifest files which is in my uh yeah local this is the Manifest files I will copy this add it here that means ke as an artifact both the files should be available jar file and the Manifest files let me just write this okay so this is done I'll just save it I'll will not trigger it right now and now we can go back here can first pipeline we can select the pipeline here interesting thing is that you have the option to select other things also right you can directly pick up the file from AER repo and you can pick up from other places also so I'm just going to take the uh take the DS file I can pick up directly from here also but I'm just picking up from the uh from my CI pipeline as an artifact okay now here you see this option continuous deployment trigger if I enable it what it's going to happen he as soon as the CI pipeline is completed it's going to trigger the CD pipeline okay uh one second let me remove this clude so I'll just going to add the branch also main that's all or maybe even if you don't add it still it will work fine uh close this now this trigger is enabled okay and here we can add the stages so let me first provide the stage name it's going to be deploy to K8 and here we can uh agent so agent we can select our own okay interesting thing is that we have not installed Cube CTL on our agent right so what we can do we can click here search for cube CTL and you can see this option Cube CTL tool installer so I'm going to add it it's going to install the latest one and then we have this option Cube CTL now we can add this one here also we need to set up kubernetes service connection so as of now it's not set up so we can click on new and yeah three three options you see here as of now Cube config service account and Azo subscription Azo subscription using that the one that I created it will be available so we can add that in case you are using a kubernetes cluster that is not on like on the same uh this uh Azure and let's say you are using a selfhosted or you are using eks so basically what you can do you can select Cube config you can get their Cube config file you can paste it here and then you can just like connect it okay for us we are using our own like cuetes cluster that we have set up inside our Azure subscription so we can select that cluster name is appearing here you can see AZ K8 deop Shack name space so I can go with default I can use the cluster admin and I can provide the name as uh K uh k-on and I can grant the access and save it so this will take few seconds to set up meanwhile yeah this is also fine yeah here in CI pipeline also we have this option trigger using which we can automate it so that if anything uh we are like committing or like pushing changes to our repository on this specific Branch then CIP P plan will also be getting triggered okay so yeah this we can do and save this here namespace we can provide as of now I'm just deploying it to default command so we have these multiple commands out of which we can either use create or apply but since apply can be used for the first deployment and moving forward all the other deployments also so we can use apply talking about use configuration so now you can see this option file path so I can click on this uh file path so as a of now see as of now our this deployment service yaml file is not added so let me quickly run this pipeline one time so that we can get the uh get the uh yamal manifest files H yes yes yes also one more thing I'll tell you ke this step that you are seeing it may seem very simple this copy the uh copy files it seems very simple but the thing is key one of the project out of 30 like I'm supporting in my company so there we deploy files for files to data Factory and data bricks so those files are basically kept in repository and we just run these three commands just these three commands to make sure that those files are available uh in in the form of artifact and we can use them directly to deploy so this this steps seem very simple uh that we are just copying files and Publishing is publishing it as an artifact but these these steps are very important okay and yeah let's wait for this to complete once this is completed then we we can configure the uh yaml manifest files here and then we can automate everything so first time what we can do uh we can add some changes to repos that should trigger the CIP PIP plan and eventually after completion of CIP plan it should be triggering the CD pipeline uh yeah let's s wait for a few minutes meanwhile till here anyone having any kind of doubts sorry mhm and CA you are saying int triggers Yeah so basically we can decide key see you know we can have multiple branches so we can decide key based on which branch Yes actually path filtration I'm not sure I did not use but from what I assume it's going to be something like specific folder uh like uh changes I think we can add here but I have not used it in my company also we are just using the brand specific but from path as name suggest I think this should be for uh folder contribution like if you're adding some to specific folders then it should be working because uh recently I was working with GitHub actions on one project uh I have not yet uploaded it so in that you know you can uh it was very interesting project been making soon so the thing is there are five six folders so each folder is containing one test cases another folder containing different test cases like that so basically when you want to execute test cases of specific folder so the way that it can be conf figured we can Define in the pipeline that if changes are pushed to specific folder and test cases of that folder should be running only so same thing I guess it should be here also yes yes yes okay so this pipeline is done let us try to access our artifact now if we have yeah so we have this deployment service yaml file I have selected it and as of now since I'm not using like Secrets also because uh Docker images are publicly available okay but in case you are using uh what's that uh the private repositories then you can configure those things here so that images can be pulled from private repository okay and this is fine let me save this justly trigger filter add it okay so now let's do one thing uh let us make sure that we have this trigger enabled in CI pipeline also and now let us try to make some changes in our repo so what I'm going to do I'm going to update the docker image name in my repo and we can get the docker image here seems fine you can see it started as soon as push changes to uh like repository this pipeline started trigger so you know this is one of the ways that we can automate completely uh like at least for uh lower branches or something we can automate it completely so that uh once like for example you know uh one thing I'll I'll show you if I go here triggers we have this option based on pull request we can configure okay because uh because like whenever we push any changes so basically what happens if new feature needs to be added so how we can do that what happens we can click on pull request click on new pull request so let's say I want to more changes from Main Branch to Dr or the vice versa so based on that uh it's going to commit the changes into the repository so as soon as this uh merge completes then we can that should be triggering the pipeline okay and for example just to see if I create you see there are tons of options here available reviewers so generally me and my teammate we are added as a reviewer if any like merges are there that needs to be done so Dave team it's going to add me and my teammate as a optional reviewer optional reviewer means key if I can review then also it's fine I can come complete the M if my teammate is available he can do okay based on that M happens okay coming back to the pipeline so if I go here also here also you can see on our agent page so all the pipelines whichever we have running so all the status is there also if I open the page in let me show you the workspace if I go to my agent LS CD score work so one okay so our project repository you see this target folder is available here along with this HTML files of our trivia report okay so these are the byproducts that got created this is the workspace of our uh like pipeline okay this pipeline is success uh release you can see release also got started we can open this and we can check the status here so first it's going to install qct latest version also one more thing team so if I open this click on edit you know if you want to just let's say for for example like we have already by running this one time the qctl tool will be installed so let's say I don't want to run it again so I can simply disable this and save this so next time if I this P the CD pipeline got only Cube CDL apply task will be executed okay so this is Success let me see here okay so now what we can do we can go back to our aure repository and let's see what changes we can see there so on left side you will see kubernetes resources whatever is available for us we need to see the workload first so that's we can see if our uh uh pod is getting created or not you can see this is the Pod okay and there are two replicas I guess I say yeah two parts are there now to how we can access it sorry about we can go to services and Ines here you can see this one right this is the service and this is the URL on our on which our application should be accessible and you can see application is running fine now okay so this is how this is is you know it's not very complex thing I what I showed it's the basic one because lots of people are still new to AER devops so the first is starting like for first time practicing this is what you can do you can deploy application using Lo load balancer and external IP will be available using which you can access your application
Info
Channel: DevOps Shack
Views: 10,279
Rating: undefined out of 5
Keywords: devops, azure devops, azure repo, azure, devops pipeline, pipeline, jenkins, sonarqube, docker, owasp, kubernetes, k8, cicd, cicd pipeline, ultimate pipeline, realtime pipeline, corporate pipeline, CICD, DevOps, SonarQube, Trivy, Continuous Integration, Continuous Deployment, Jenkins Tutorial, SonarQube Setup, Docker Tutorial, Kubernetes Setup, CI/CD Pipeline, Jenkins Pipeline Project, DevOps Tools, Software Development, devops shack, corporate, grafana, prometheus, monitoring
Id: 0knqjEp3coU
Channel Id: undefined
Length: 94min 41sec (5681 seconds)
Published: Mon May 13 2024
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.