Azure DevOps Step by Step Tutorial for Beginners | DevOps Tutorial

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
thank you [Music] welcome to Quest once YouTube channel and what are we learning today today we are going to go and learn Azure devops in flat two hours Yes you heard it right in flat two hours so in this two hours we have 35 lessons 35 lessons which is a combination of theory practical definition Concepts which cover right from opening up an Azure devops account devops concept boards repositories build pipelines release pipelines test plan artifacts agents agent pools yaml deployment groups and many more things right one thing is guaranteed out here if you just go through these two hours you should be in a decent stage to create a serious devops automation using Azure devops now before we move ahead right before we move ahead with this heavy two hours of practical I want to give you a tip practicals are quite complex out here for example you can get errors of parallelism there are complex deployment of self-hosted Agents running Powershell script complex config files or deployment groups right so when you get an error right what you can do is that wherever you get an error that timestamp of the video put it down in the comment write a detailed error message you know whatever you are getting what issues you are facing I will try my maximum to help you I will try to reply to that message right so please note you know in this YouTube video I just don't want you to watch the video I want you to do the practicals I want you to do the demos I want to help you out to make sure that you learn Azure devops right so any issues tag with the timestamp write a detailed error I will try to reply to the errors right so let us get started with the first video opening up the Azure devops account so in order to open up the Azure devops account what you can do is you can go to Google and just search Azure devops and the first link what comes out here you can click on it and you can see uh this is the home page of azure devops now remember that I'm recording this video in 2023 it is possible that things can change in 2024 and 25 and so on right but I feel that you know the overall process should remain same right so in case if something is changing right you can please send us a message at questmon.questmon.com and I'm more than happy to help you okay so here what we'll do is we'll go ahead and we'll create a free account so remember Azure devops is absolutely free what you need to have is just a Gmail account right so I'm going to go and say okay start free so there it goes now what you need is you need just an email account right so I'm going to go and put my Gmail account out here so I've just created a Gmail account out here so remember Azure devops is free to start definitely you know there are many services you know for for that probably you will need to pay so we'll talk about that later on but for now if you want to learn Azure devops this free thing should work very fantastically for you right so I'm putting my Gmail account out here so there it is I cannot find this account definitely so I'm going to go and say create one and looks like you do not have account with us yes so let's put a password so he says that we have sent a code you know to your Gmail account so I'm going to go and log into my Gmail account out here and you can see that there is a code so I'm going to go and just take this code and paste it and there I go right so it is trying to create account now it is thinking that I am probably you know some kind of a spammer you know so he's giving me some puzzle so let me solve those puzzles out here must be you know this will not probably come to you but you know for me it is coming so please pick up one square that shows two identical objects there it is right and it is now going and creating the account so there it is it says that okay from which country you are from so at this moment I am located in India I'll just say India for now I'll just say continue uh it's giving me some challenges to solve so you know the the creation of the account is pretty uh standard you know if you have open up a Gmail account or a Facebook or a LinkedIn right it's a standard account what I'm creating but let me go through the process you know why because it is possible that some people will try to use this tutorial step by step so you can see it is taking some time to create your azure devops organization so there it is you can see it has popped up me a page out here so it's saying that okay create a project so what we'll do is just to test you know if everything is okay just create a test one two three project out here and let us just create a private project for now and we'll say create project and if you are seeing this screen this screen uh you know where you have where we have the summary we have the dashboard where we have the wiki where we have the boards where we have repository and pipeline that means that you have access to the Azure devops account right so this was uh the first lab that how to go and create a free Azure devops account to start with okay great so now we have access to Azure devops right but before we go ahead and we do any practical let us try to understand the concept of devops now when you say if you want to understand any concept right as a teacher I would encourage you to follow the process of what why and how right so here also we will follow the same process first we'll start with what is devops you know why do we need devops what kind of problem it solves and finally we will look into how to implement devops right okay so let us first start with the what part of it so devops is a pro man to word Pro man to word means word which is formed from the combination of two words for example smog smog is formed from smoke and fog for example brunch you know from breakfast and lunch right so devops is formed by using two words first one is developer the dev part of it and operations which is the Ops part of it right so devops first thing is a pro man to word which is formed by two words developer plus operations okay now let us start with the Second Step the why part of it right now in order to understand the why of devops let us try to understand that when we do software development who are the majority stakeholders so in that you know there are three majority stakeholders the first one is a developer Who develops the software second one is the operations who actually takes the software and helps the customer makes it live gives them support and the last one is the customer himself you know who wants this software in a very very smooth way right so the development team right what what kind of activities they do if you look at the overall activity I'm talking about the 30 000 feet level activity first what they do is they do planning right so they plan that what they want to create as per the requirement second they start execution they start creating the software third they do a test they test you know that if the software is working properly or not and then this software they hand over to the operations team what does the operations team do operation team first takes this and makes it live in a uit server right so there it's a temporary server you know where the customer can go and test the software afterwards you know when the customer is satisfied they make it live so that is the second thing and once it is live they try to give assistance and support to the customer so basically three steps you know which the developers do 30 000 feet level I'm saying it is possible that before the test you know they can do unit testing it is possible that after the plan you know they can do design so I'm not going into nitty-gritty steps you know but the overall steps is developer side planning execution and test operation side you have uh uat you have go live and last is the assistance and support so now what is the problem here the problem here is blame game right so what happens is basically the developer says okay I have done the test and he has given the software and for some reason the support person is not able to make it live on on the server you know he messes around with the config file must be he messes around with some dlls right and it is not going live you know the operations person says no like this is the issue of the development team in the same way development team also can put a Blame Game saying or like the support don't understand technical right so what devops says right just hear me very clearly what devops says that devops is a philosophy first thing before we talk about you know Azure devops or AWS devops or this that right first thing it is a philosophy which says that both of these teams should work together they should work hand on hand so the development team once you have done the testing right they should help the operation scheme to make it live they should not say like okay here is the dll go ahead and make it live many operations infrastructure guys don't understand.net they don't understand Java right in the same way the operation team also rather than sending a mail and trying to put a blame game if they have issues in the ground right they should try to provide these issues as an input to the planning phase so that the developers are aware that yes the the printer is not working or must be the the site is is down or something right so what they can do is they can take it as a planning phase and in the next build you know they can fix this right so devops first thing now I am that what definition remember first I just gave you a a basic definition now I'm improvising on it so devops is a philosophy and this philosophy says that the developer team the development team and the operation team should work together to create a smooth delivery if you closely watch you know uh the diagram which are shaped up it is a eight structure diagram it's a eight structure model diagram which which says that the development and the operation team should work together right if you want to just remember this diagram you know means I would suggest that never try to remember the individual steps you know remember remember the philosophy that the dev and the operation team should work together but just in case if you want to remember the diagram you can remember the word Petula this particular word is uh is an acronym where the P stands for planning e stands for execution T stands for test the pet part belongs to the dev right and then you have the Ula part you know the the uat the go live and the assistant and support right so this Petula acronym is created by a very famous person called as super satkoirala right right so that's a joke if you like this joke right please put down on the comment that how did you like this acronym to remember devops right okay so just summarizing what is devops I said it's a word which is formed by the combination of it second I talked about why do we need devops because the dev and the operation team they blame game each other how to solve it philosophy we have to work together the eighth model diagram right so just putting the final definition devops is nothing but it is a philosophical approach wherein the dev and the operation team should sit together and try to give out a smooth softer delivery to the End customer now only philosophies don't work right with philosophy is definitely uh you need to be backed up by tools you need to have proper process at place right so if you look at the so-called as agreed official definition right about Azure devops is that Azure devops is a combination of philosophy that we have to work together the dev and the Ops process we should have a proper process like planning execution test right and finally tools you know like Azure devops or AWS devops you know which helps us to do the automation so azure devops is a combination of three things the philosophy the process and tools to achieve the devops uh the devops thought process right and just before we move ahead right I want to say what is not devops right at least personally what I feel what is not devops is that devops is not a position devops is not a department devops is not just about automation so you know I feel that in the industry you know sometimes you know people say that we need a devops engineer I don't understand it right so devops means that do you need a coordinator right if somebody says I'm from a devops department then I don't understand he's from a deaf department or the office Department right so I feel that you know these you know these sentences actually I feel that I will not say they are wrong you know must be they are they are misinterpreted right so devops is not a position devops is not a department devops is not just about automation it is a philosophy first right so with that you know we will be moving ahead and the further chapters are very exciting guys you just have to do step by step you know what I'm saying out there so in the further coming chapters we want to go and run pipelines we will be creating yaml we'll be creating agents you know we will be publishing that to IIs right so let us move ahead so now that we have gone through the theory we understand what is devops now let us see that how this devops you know can be automated by using Azure devops right and that's what the goal of this whole course is so what we'll do is we have created the account sometimes back we will use that account and we will login into the Azure devops website so you can see here I'm trying to go through Google again you know why because the URLs of the devops are not really fixed as sometimes it is Dev dot Azure sometimes it becomes something else right so I'll just say Azure devops it goes it takes me out here let's click on the sign in and I will just paste this account out here let me put the password sign in I'll say yes stay signed in now you can see here he has taken me to portal azure you can see out at the top he has taken me the portal as your account which is very much possible so that's why I said I will go through Google you know so that we don't have any confusion right if you are going through the portal Azure if you are in the portal as you are and from there if you want to go to devops then what you can do is that you can just type your devops in the search out here and you can see Azure devops organization and uh you should be you can see there are some errors out here but uh don't worry about this error this error is because it is for the billing you know at this moment this is a free account right so I'll just say my Azure devops organization right and it should take me to the devops page remember we had created a test project or something right so he should take us over there now you can see again the URLs are changing right so that's why I don't want to go into that you can see this Dev dot Azure right so you can see Dev dot azure devops respond this was the this was our organization remember when I signed in right I created this organization called as devops respond right and that's a URL so either you can go from Dev as yours sometimes you know does not work so either you can go here from Dev azure.com like this and uh you can sign in right at this moment I am signed in or either if you go through the portal as your is all okay right I will come to later on that both of these are different actually okay but wherever you come from you should be coming out here you should be coming to this page where it says dev.azure.com and your organization name remember when I registered I you know this was the default name which came to me and I just went ahead and inside an organization you have a project remember I had created a test123 project and this is this project right so what we'll do is you know we will go and we will uh we will kind of let this test test one two three be there like but let us go and create a new project out here and uh we will see here uh some project name right so let me give a project name here saying Quest Bond project okay the description of it and so on here you will put description goes here okay of your project now you can see here uh there are two types of project you can create one is the public project right you can create a public project but at this moment you can see public projects are disabled right uh why you know because uh many of the developers you know they create public projects and they start abusing uh you know the Azure devops you know by creating free pipelines by running whatever they want right so at this moment for learning purpose we have to create a private project a private project is only accessible for some people inside right so must be when you swipe your credit card then only you will be able to access the public project so for at this moment just select the private project and uh other things you know you can keep it as it is so I'm giving the project name I'm giving the private project and I will say create so there it is it is creating a project so remember at the top we have organization and inside the organization you have a project look at this this is the organization inside this we have two projects question project and test one two three so organization project so now let us try to map the devops process diagram remember we had discussed the devops process diagram let us try to map it with the Azure devops right so what we will do is you can see uh over here at the left hand side I have taken a print screen of the Azure devops menu and we will try to map this menu with the devops process diagram and that will make your life very easy right and what I will do out here is that you can see there are some things you know which are very common like especially this uh this top section out here these four things like summary overview dashboard Wiki I think you know you can just move your eyes away from this and you can focus on these three things you know wherever we have this light uh background you know those items must be you can keep your focus you can remove your focus from the top items because the top items are known dashboard is dashboard Wiki is Wiki summary summary right okay so let us focus on these five items which we see at the Azure devops menu and let us try to map with our devops process diagram so what we said first we have the planning phase where we plan we take the requirements we do the design right so that is done in the boards so you can see here we have the boards so the first one you know is mapping to the planning phase whatever you plan you will create a task you will create a bug you will create a issue right all that is done in the boards right the second one you know depending on the plan so this is first one is a planning first one is the planning this first one right the second thing you know we discussed is that you need to do the execution right so basically you need to do checking the code you need to write code you need to run it you need to build it right which is the most important activity and that is done by checking in the repositories so the second thing you know which we do after this is checking into the repositories right the third thing is we would like to go and run some test cases unit test cases uh we would like to go and uh must we do manual testing you know system testing you know internal testing I will say rather inside the dev team so that is done in this four out here right this is the four out here right I wish that they had put this menu at the top here but that's okay right the four so this is the dev part this is where is the the dev part right now in the Ops part the first thing is what uh we would like to do is that we would like to go and um once this build is done once this testing is done done right we would like to go and create a build we would like to go and create a build and put that build into the uat server right so if you remember at the right side you know we had this uh uat or you can say the server you know where we will go live right so when we have this execution done when we have the test done we would like to automate this build and this build is automated in something called as a pipeline right so there would be a pipeline and in this pipeline so you can see out here this is the pipeline the third part that is this third part in this pipeline we will talk about this pipeline more in detail you know you will have small small tasks out here must be saying that okay go ahead and build a.net and then go ahead and build angular and then go ahead and do so you will have a lot of a lot of small small tasks you know which will run one after another and finally what we will do is you will have the final compiled code which will consist of dlls must be exes must be binaries must be the final JavaScript files must be the sqls which you want to fire right so that is termed as an artifact so the output of the pipeline so this is the pipeline the output of this pipeline is a artifact you can see the fifth thing out here and I don't know this so I'll just put it here this is the artifact RT fact right so this fifth thing out here I'll just put it from the top that that's what goes into the uat right and after that you know from the uat I will show you how to go ahead and go live right uh we will talk about this right at this moment it is not seen in the menu but there are Small Checks inside uh the Azure devops which you can which we can which we buy a simple switch you know you can make this complete uat live right and then finally uh the support team actually supports it right he does a support over here right and whatever he finds issue in the support or whatever he finds issue in the maintenance right he will again give it as an input to the boards right so you can see again out here so basically if you see the complete uh you know the uh the so this is the Ops here so this is the operations part right so if you look at this uh complete uh the dev part in the Ops part right in Azure devops it is done by the five important elements remember there are many other elements but I want you to just understand the menus out there right because if you understand the menus right it is very easy okay so first the planning phase just revising it is nothing but the boards then we go and check in the repositories that is the repositories then we have a complicated Pipeline and this pipeline is where we will have series of tasks and finally when all the pipeline run and they give the final binary is termed as a artifact right so we have artifact and then we also have a test plan you can file unit test cases here before the pipeline right and then the support team when they have issues you know they can again give the feedback to the board right so this is the basic a way you know how Azure devops maps with the general devops process which I discussed previously so the first step in the software development life cycle involves the planning phase right so when we say planning phase means it involves requirement uh Gathering it involves design and so on right so what we'll do is we'll go to Boards out here remember I had drawn that diagram you know where I've explained this boards is where you do the planning these repositories is where you actually go and check in your code this pipeline is where you actually go and put all of your tasks and the test plan executes inside the pipeline and artifacts is the final output right so let us go ahead and click on the boards and we'll say that we want to create the first work item so when you say planning means what you know it means that you will create tasks you will create WPS like work breakdown structure and assign it to the developers or the IIT personal you know to work on it right so I'm going to go and create a task and let us assume that because this is the first task of this project we'll say that we want to go and create the initial project structure out here if you wish you can also go and assign it to someone some developer out here at this moment we just have the devops respond right so I'm going to go and just click on this so uh so I will not be going too much into the boards actually because this is pretty much clear here you can see you know uh what is the reason the iteration right so in case if you've done a little bit of agile I'm sure that you can understand this right so in planning phase you know what you do is in as your devops is you actually go and create the work items you go and you create bugs you go and you create issues right and assign it to developers right so this is what happens in the boards right uh now uh the next step is to go ahead and check in a code right so let's say against this uh against this task at this moment what you have created we want to go and check in sub code right so you can see this is the repository out here uh and let us go ahead let us clone this repository and let us check in a simple MVC application inside it so let us go ahead and check in code right into the repository so I'm going to go and copy this uh the URL you know by which we can go and clone this repository so let us go to visual studio out here and let us say file and let us say clone the Repository uh now uh so I'm going to go and say this is what I want to clone and where do I want to clone I have created a folder here called a simple MVC application I will copy the location of the folder and paste it out here so the first step you know what we are doing is we are actually trying to clone a simple MVC application right and then let us go ahead and hit on clone so one way is that you can go ahead and you can clone form from here now remember that you know it will ask you for the uh for credentials Etc so uh please do make sure that you give uh the appropriate credentials right the another way what you can do is you can see that down below there is also an Azure devops uh link out here so you can go ahead and you can click on this as your devops link as well uh and you can actually clone from here as well right now you can see at this moment my Azure devops server is not added to this project you know there are some other projects but uh at this moment you know the one you know by which I'm using it is not added means this one right so let us go ahead and add the project first right so I'm going to go copy this sorry copy and let us go out here and we will say uh go and add an account right because once you add an account uh it will actually uh show the the projects of that account right let me go and put the username and password out here so there it is uh and uh once it is done it should show me the repositories you know which are hosted by this account so you can see here at this moment you know these are the repositories right so I'm going to go and uh take this repository right because this is where I want to go and clone I want to clone this repository right and you can see in the path below my you know I want to go ahead and clone over here right to this location so I'll just change that right and let us say clone right so once you clone right you can see it is it has it has cloned right once you cloned what it does is inside this project it goes and it creates a small git folder now you can see it creates a git folder a vs folder it makes up a local repository out here in case you are not seeing these files must be these files are hidden you can see these files are actually hidden so what you can do is you can click on The View and you can uh just click on this hidden out here to see these files in case you are not seeing it right so now that means that this folder you know what you see out here is uh git enabled right so what we'll do is now we'll one is you can go ahead and you can now add the project out here but I will not do that you know because Visual Studio is very very uh very very weird you know when it comes to using Git You know so what I'll do is I'll copy this folder out here and now I'll reopen visual studio and I will create that project I'll create the project using the into that folder right so I'll say create a new project and uh I will say that and we'll pick up on asp.net MVC application a very very simple asp.net core now remember that at this moment very sad I'm using 3.1 right but whatever steps I'm showing here you know will be true even for uh the new MVC new.net framework projects as well right so I'll say next um and uh I want that this project should be created in this simple MVC application because that is where I have created I have made the local git right and I'll say this is a this is uh my web app right and uh let us go ahead and say create I will pick up a simple asp.net MVC controller out here and there it is right so there you can see the sample project has been created right so now what you are viewing at this moment is the solution Explorer so we would like to go and check in this code so just I will go and run this code let us see that if we can see the basic home page of our MVC core application and the same home page we should see when we go and we do the build and we put it live right so I'll just check it once so that is the basic home page great so now uh this is the solution Explorer now in order to check in we have to use the teams Explorer so we'll go and we'll say team Explorer out here so that you can see the teams Explorer out here right and uh so remember our solution Explorer to see the source code and team Explorer to actually go and check in the code right so we'll go and we'll click on the changes out here so at this moment if you see the changes is the whole project right and if you remember we had created one work item the one work item the first work item we are created out here so you can see here uh this small window at the top I have just gone here and I've put the work item id as one you can also go and put uh some kind of a text tags as well you know it will actually go and pop up uh the work item if you go and if you put some the description as well right it does a wild card search so you can see this is the the task you know which for which we are actually now checking in the code right so what I'll do out here is I will go again to my home so I'll say changes and I'll say that this whole code at this moment what I'm checking in is against this task this task out here right so I'll go out here and I will add this task out here now remember I know the ID but even if I don't know the ID I can always go and put this text out here so I'll just click on this and I will say add so with this what happens is you know whatever changes you are doing as it's it's a very good practice to link in to link the code changes with the task you know so so that you know when you are doing a build you know when you're doing a test you know there is a great traceability maintained and we know that this change is done against which task it it helps us to organize the project well right so I'm doing that um so whatever are these changes this 106 changes are getting checked in against these work items right now one more small thing out here uh to point out uh in case if you are not able to see these work items out here just make sure that you go to manage connections out here and make sure that you put the connections out here sometimes you know if you don't see these work items out here uh this the work items out here it would be one of the one of the possibility would be that your managed connections out here is pointing to a another connection or to another project right so just make sure that you go ahead you connect to that project right you add the devops server out here and make sure that you select that project out here right so that's the important thing okay so we are done with that I'm going to go and check in the changes so I'll just say changes this is all out here and I will say let us go ahead and commit also I'll just put some text out here this is the project structure right this is the initial project structure right and we'll say commit all now what happens is you know when you actually go and commit the changes the first thing what it does is it goes and commits these changes locally so locally it will go and it will it will commit these changes so you can see here it is giving a commit number right 196 something and it says that it has been created locally but it has not synced up with the server so in order to go and commit to the server out there we have to actually go and commit right so this is committed locally we have to go and sync these changes with the server so you can see at this moment in the repository the repository is empty right but we'll go and we'll sync up these changes to the server so I'll say sync out here and I will say push now remember that at this moment you know whatever demo I'm showing out here these demos I'm showing using visual studio because you know my goal at this moment my scope I will say rather is focused on people who use Visual Studio but at the end of the day if you're going to go and use the git commands or if you'll be using vs code or if you're going to use any other way of checking the code I'm all okay with that right so that is all up to you but I've just shown you how to do using visual studio right so you can see I have pushed here and it says successfully pushed this Branch right so if you go out here now and if we refresh you can see that our code has been checked in right so what we have done till now so till now what we have done is the first thing is we have gone to the boards and we have created the project structure so remember the first part is the planning part the second part is you know we we went ahead and we executed the project we went ahead and we checked in the project and we checked in the project inside the repository right now the next thing is to go ahead and create a pipeline so you can see the next step out here it is all logical remember s repositories and then pipelines right so the next thing is to go ahead and create a pipeline which will actually go and build this project and create a final output the final artifact which we can go and which we can put it in our server and we should be able to see our MVC core application running right so guys let us go to the next step out here creating the pipeline now before we go into pipeline or before we start creating a pipeline one very important concept which we need to understand in Azure devops is agents right so uh now now in order to understand uh this agent concept out here let me go ahead and let me again redraw that diagram of the eight number right that eight number represents uh the devops life cycle or the devops the devops steps right so if you remember we talked about remember I know that sometimes I would be revising and revisiting the old thing again and again but believe me that you know this revising will help you to make your fundamentals more strong in terms of devops right so I'll we will first we said that in this eight number diagram this eight structure which represents devops we said there is a planning phase this planning phase happens at this moment in Azure devops in the boards so I'm going to go and put this as one so this is the one out here right so this is the boards right where we do the planning right then we said that uh we will go and we will do the execution right so that is happening in the repositories this is the two out here and this is happening in the repositories right and then we said that after this you know we have the test right so this is the dev part of it right the the developer part of it right and over there uh you know what the operations people do is you know they have a uat right and then uh if the uat passes well you know there is a uh we actually go live and then after the live we have the monitoring part of it right and so this is the operations part of the devops right and we said that devops actually says that you know that we have to connect you know both the ends and we get that eight structured like that eight number out there right so uh you know to help the operations people you know to make their life easy you know we we want that from this test so after this test we have a build must be after the build we have uh a publish must be and then we finally go live right so so this is this is the one part of the eight and from from here you know when when the operations people are monitoring they put the feedback uh feedback you know to the boards out there right it becomes a part of the planning phase right now if you see out here you know this whole thing this one must be this two must be this three must be this four and must be why not this five right this all can be automated right so you can definitely automate execution of the test case you can automate the build part of it you can automate the publish part of it once it goes live must be you know over here this small switch indicates you know some kind of uh you know kind of a permission you know where uh through the email he will say yes I approve a kind of an approval process you know where he says yes I approve that it should go live and then from this monitoring part is where the operations people will give an input and that becomes the part of the planning phase right so that's what exactly this eight diagram out here is right so if you see this one two three four five that this whole thing can be automated and this automation happens inside the pipeline and you know my diagram is very horrible but this you can just visualize like this that this is that pipeline right this pipeline is nothing but it consists series of tasks it consists series of tasks like test like build like publish the email approval this is all the part of the pipeline right so uh this is the third part of it so remember the boards the repositories and the pipeline right so what I'll do now is you know I know you can see this diagram is becoming cumbersome right I would like to go and make it bit flat out here and let me flatten this out here so that we can focus more on pipelines and then I will talk about agents right so when I say flattened means what I'll do is so we'll say that this is the planning phase right then we have the execution phase and then we have a pipeline right so I've just flattened it out here you can see I've just flattened that this whole curve out here you're seeing so in this pipeline we can have many things out here we can have the test we can go and we can do a net build we can go and we can create a publish you know we can publish it or we can we can do a build uh we can run must be a more test out here like the you know the you can see the record and play or the uh I'll not say unit testing you know but more often automation testing if you want you can you can do it and then you can finally do a publish out here and this publish will throw up on artifact right like this so you can see I've just flattened out here so you can see that these are small small tasks we can say that these are so this is the pipeline right and these things out here are we can term it is for now as a task okay before we go to chapter 12 I have announcement to make right so I have announcement please try to see the video till the end because at the end for you guys I've kept a beautiful gift right so I just don't want you to lose steam in between try to see the video till the end and try to Avail that beautiful gift so let us start with the next chapter now definitely this running the test case this doing the build has to happen in some machine it has it needs a CPU it needs a ram it needs some physical device you know where you can go and you can execute this and that is executed inside the agent so what is the agent for now you can think about agent is nothing but it is a kind of a software there's a kind of a software which runs inside a machine and it takes each one of this task and it starts building it right or you can also think about that agent is nothing but a machine if you want to really say it's a machine you know which has a CPU it has RAM and it has its agent software and it has the ability to take this task you know from this Pipeline and execute them serially one by one right so if you want to go and see the agent out here so let us go ahead and see the agent where exactly it is located so what you can do is you can go back let us go back to our uh so let me go back to the question project so remember this was the pipeline out here so if you see out here down below you can see I'm I'm moving my mouse here there's something called as a project settings right so if you go inside the project settings you will see that there is a agent pool and if you go to the agent pool out here you can see hope that there is an Azure pipelines right and there's a default so just click on this and if you just click on this you will see that there are something called as hosted agents out here right uh and uh this this this hosted agents are nothing but you know agents you know which are given by the Azure team so the Azure the the devops as your team you know saying that okay here is the here is our agent which is hosted in some virtual machine on Azure and it will automatically run on that right so remember now uh this agent you know just just to make sense out here this agent you know can be something which is a hosted agent which is given by Azure right or it is possible that you in your own machine you can go and you can create your own agent so you can create a local agent as well right so just putting out the definition out there agent is nothing but it goes and it executes the task of the pipeline it executes the task of the pipeline it is a software it it runs inside a machine which has a proper CPU and a ram so it executes the task and gives the final output of the artifact so now let us go to pipelines out here and let us go ahead and create a pipeline so when you actually go and create a pipeline out here you will see that it comes up with a wizard a wonderful Wizard out here and it says where is your code in which repository which type of repository does your code exist right now remember that at this moment our repository is the Azure devops repository right so we're going to go and select the first one the Azure Repose but in case if your code is in pit bucket or GitHub or gitlab right you can select accordingly right so I'm going to go and select Azure repositories out here and he says then after that that please select the project I'll select the project now our application at this moment is made in asp.net core right so I'm going to go and select this asp.net core out here and you will see that he comes up with a nice uh yaml file I'll talk about this yaml later on but you can see out here that this pipeline out here is made in a language called as yaml you can say this yaml as yet another markup language or and another markup language let's welcome to Yama later on but for now let us go ahead and run this let us go ahead and save this and let us run this yaml out here so I'm going to go and say save now what happens is you know this yaml file is the file you know where your task is written right so he tries to actually he tries to check check in that code inside your inside your Azure repository so you can see here when I say save and run he says should I commit directly to the master Branch I will say yes so let us give a name here we will say that this is um uh pipeline uh pipeline version one so this is our version one we don't have to version it but I'll just want to say that we can have multiple versions of it so if I go and say save and run right so we are saving it and also we are trying to run the pipeline okay so what will happen out here is first thing you will see that it has committed inside the Azure repositories out here you can see in the Azure pipeline this Azure pipelines dot yml which is nothing but the yaml is committed into your repositories right now you can see out here uh there it is you can see uh we try to run the job and you can see that the the job is not running and it is showing up an error out here so if you see here this is the job which was which we were trying to run and it is showing out the errors here saying that no hosted parallelism has been purchased or granted to request for a free parallelism please go ahead and fill this form so you can see here if I go and if I copy this error out here right I'll just paste it so there is an error out here which says that no hosted parallelism has been purchased or granted to request a free parallelism please go and fill this form and we will give you this parallelism right so what does this error mean first thing if your pipeline has run please write down below on the message box on the comment that yes my pipeline has run and if you're if you have got an error of parallelism please write down down in the comments below that I have an error of parallelism with that you know we can come to know that uh how many people are getting this error right so for me I have got this error right so in other words what it is saying is that the agents remember the agents which are running the task is not free right that agent is actually a CPU it needs a ram it needs a hard disk so he says that no like you have not purchased anything so we can't really Grant to you and frankly if you talk about going and filling this form out here and getting something free from Microsoft I think you can try out your luck out there right but I'm sure that it will just get lost in into that into those many thousand requests out here right so what is the solution out here you know how we can approach this solution of no hosted parallelism has been purchased right so what we will do is we will go and we will create our own agent I repeat this what I'll be doing out here is now because you know he's not giving us a free agent and we have to pay money uh what we'll do is we'll go and we'll create our own agent so first thing if everything is running for you congratulations you know in in free you've got that but if not you know then we need to go and create a self-hosted agent so you can see here what I've done is I have gone to project settings so if you go to Project settings you can see that this is the agent pool so in this agent pool we have this Azure pipelines you know but these agents are not available at this moment for us it is it is enabled for us but it is not available so these are hosted agents these are hosted agents in other words these are agents which are given by the Azure devops and they are saying that these agents are not free actually these agents were free for a long time uh I think at least when I started learning devops uh four or five years back but you know people started abusing you you know abusing it developers started abusing it and Microsoft has to had to take a call right so let us go ahead and create a self-hosted agent so you can see here I'm going to this agent pool so agent pool is nothing but a pool you know which has a pool of computers right so I'm going to go and add a pool here you can see I'm going to go and add a pool and I will say that the pool type is a self-hosted so remember there are three different types of Agents one is the hosted agent which is given by the Azure devops second one is a self-hosted agent where you will make your own machine as the agent and the last one is in if you want what you can do is you can create Azure virtual machine and you can make that as an agent as well right but for now I'll say self-hosted agent and I will give a name as uh my computer my computer agent right and uh I'll say that this is my or my hosted agent this is a self hosted agent and I'll say that this agent is accessible to everyone so I'll just say Grant permission to all pipeline uh if you don't give this you know it will keep asking for it right so let me do like this one is that you go ahead and check this so that you don't get the pop-up again and again but for now what I'll do is I'll just create it without the access we'll see what happens right so there it is you can see it has created is my computer agent and there it is so the the next thing is we have to go and create our machine as the agent and if that that runs you know then what will happen is your machine will be seen here live okay so let's click on new agent once you click on new agent you can see that there are certain steps written out here depending on the operating system for example uh at this moment I have windows so I need to follow these steps out here in case you are from Mac and from unique Linux uh you have the appropriate steps right so let us go ahead and download the agent as I've said that agent is nothing but it is a software and that software will run inside a computer at this moment it will run inside my computer right so you can see the first step is download the agent so I'm going to go and click on download and there it is getting downloaded down below now you can see the next step what he's saying is that he's saying that go and run this code out here this Powershell code it's a Powershell code go and run it you know wherever your the RAR file this is a ZIP file a r file right wherever it is you know please go and run this right now what basically this code is doing out here is that this Powershell code it is actually going and unzipping the file it is actually extracting that file to the directory so um what I'll do is I'll not run this code I will rather do it manually right so you can see here this file has been downloaded out here I'll I'll cut this and let it put Let Us put it in our C drive out here new folder and I will say this is my agent right now I will paste inside this and what I'll do is I'll just go and extract it so I'm going to go and extract it out here in this folder right so basically this step out here I have done it manually now a question out here to everyone right uh I mean like I can just go right click and extract it what do you think you know why has Microsoft given this code out here right when you can drink the water from the well what do you think you know why has he given a Powershell code you know to go and extract the RAR file so let me know in the comments down below that why has Microsoft given this complicated code out here and what do you think about it right so there it is the but I have done it manually and you can see it has extracted out here and you can see there are two CMD files there are two CMD files there are two exes out here one is the config.cmd and one is the run.cmd and both of these files will help us to make our machine uh machine an agent right so if you go to the next step out here in the next step you can see here he's saying that first go and run the config.cmd and then go and run the run.cmd okay so I'm going to go to my command prompt out here and first I will run the configuration so that will actually go and do my configuration and then I will run the command and I will make my machine as the agent as a self-hosted agent so let's copy the path so you can see here I'm saying copy address as text right you can also copy it like this by by clicking on edit address and then say copy and let us run the command prompt now make sure that you run the command prompt in admin mode you know because over here we are you know probably that CMD file would be running some executables and for those executables we will be needing a lot of Rights right so just make sure that you have appropriate rights you know to run this command prompt the CMD files so I'm going to go and say paste out here and I will change the directory and I will go inside this so inside this we have the run.cmd and the config.cmd so let us go ahead here and run first the config.cmd out here and you can see that as soon as you run the config.cmd so remember config.cmd to do the configurations and run.cmd to run those configurations and making your computer as an agent which is attached to Azure devops right so first thing when you run the configuration it is saying enter the server URL so go ahead here and copy the server URL now the server URL should not have the project name so you can see here it is Dev dot Azure and devops respond so that is my server right so I'm going to go and copy out here and let us go ahead and paste it edit paste right enter the second thing it is asking is the authentication type now remember that you know Azure uh you know uh Azure as a cloud you know is you know the first thing you know the priority is security right so when you're seeing that you want to uh go and make something as an agent those agents will have access you know to devops right so these agents have to be authenticated so you can see that he's saying that if you want to go and uh you know enter authentication what is the type of it so you can see here something called as Pat so what exactly is Pat Pat is nothing but it is access token personal access token so we need to go ahead here and put a personal access token so you can see here when you go to the devops correspond right so when you go to the correspond out here you can see at the right side in the user setting you will see the small menu out here personal access token pad all right so I'm going to go and create a token out here so I'll say go ahead and create a token and this token I will say run agent right so this token is created for 30 days and um and then by using this token what kind of access you want to give to your devops so definitely I don't want to give access to the agent of creating work items or I don't want him to go ahead and do auditing and so on right only access what you can do is that he can only go and uh one is read and manage agent pools that's it you know means in other words that's the max you can do he has only access to the agent pools the other things I have just kept it as it is right so I'll just say create out here once you create it you get a token so you can see this is a token out here I'll say copy to clipboard and I will I will say yes this authentication type is packed so we have to first press enter and then you have to enter the pad token so I'm going to go and say edit paste out here and the pad uh is you can see it is connected to the server and now it is saying register the agent so enter the agent pool name if you don't put any pool name it will come as default right but I'll say here uh my custom pool you know because this is my custom agent or I'll say this is my pool so this is my agent I will say my pool and I'll say enter agent my pool not found very nice actually what happened out here is remember uh what is the pool name I'm sorry the pool name what we created out here we have to give that pool name so we had created here the pool name as my computer agent I'm so sorry so we have to go and put here my computer agent enter the agent name so my machine name is desktop hyphen 4B whatever it is right so if you go and see my machine name out here if you see my PC name out here it is this thing and it is the same thing and I would like to just press enter and let that be the agent name right so enter what happened okay right okay sometimes that happens huh so scanning for Tool capabilities and let us see that if this is working so you can see here very nice it is saying that successfully added to the agent it's saying enter the work folder so my work folder if you don't enter any name it will take the underscore work folder so what is the work folder the work folder is the folder in your local Drive of your of your agent where it will do a get latest where it will do a build where it will do everything right so I'll say okay the name is nice underscore work if you want some other name you can put it out here so I'll just keep it as it is do you want to run this agent as a service in you know service means do you want to go and run this agent as a background service continuously out here right so do you want to go and run this out here so let us press enter right and let us see what happens oh I should have I should have pressed y so okay why right uh do you want to enable unrestricted access yes uh for the agent service let me do for now why you know just press enter what is the user account under which this service will run so I'll say yes it is the NT Authority account I'll just press enter uh enter whether whether you want to prevent the service start immediately after configuration is finished uh yes I would like to start the agent immediately right so there it is uh so uh that is one right the first is you will use the config.cmd and you will uh run you will do your configuration the second thing you know as written in the documentation you will do the run.cmd so what the run.cmp does is it actually goes and runs your agent right so you can see here it is now trying to run the agent out here and uh listening to jobs so you can see now it is listening to jobs out here and definitely in this my computer agent I would like to go and see my agent live so there it is you can see it is live out there right and also one more Point remember I said that run it as a service so definitely uh in the desktop out here I should be able to see in my services I should be able to see the service somewhere uh the name of the service should be should be Azure agent if I'm not wrong right so there it is you can see Azure pipelines agent you know in my machine I have ran many agents out there so that's why it is uh showing a lot of Agents out here but our agent is this one you can see this is the agent which is running if you just say right click Start it will run automatically right great uh so everything is running out here and the agent is also running now let us go ahead and let us try to now run the pipelines right so remember you can see out here these are the runs of the pipeline the first one failed the first one failed you know because it said that no hosted parallelism so now what we'll do is we would like to now go ahead and it should take up this uh this pool right it should actually go and take up this agent pool from here so this pool my computer agent is what it should try to take it up right so let us let us go ahead and let us do it so I'm going to go back to question project and let us go to pipelines out here and click on this pipelines out here and let us click on edit you can see at the right hand side now remember the menus of azure devops at the first time will be looking very confusing so what you can do is that you can just follow this video and after some time you know you'll get acquainted with it right so you'll find a lot of menus here and there you know but once you get a habit of it you know it's quite easy right so click on edit so when you click on edit it opens up that yaml file now uh some couple of things out here what you can do is you can see the code is looking very small right so what you can do is you can just press Ctrl and press the wheel so you can make the fonts of the browser big and you can see at the right hand side we have task we'll talk about this task must be you can hide it you know so that you can see uh the whole screen so you can see here this is hide this is show assistant hide show assistant right so I'm going to just hide it out here so at this moment what is your pool name our pool name is my computer agent right so I'm going to go out here so you can see pool and you can see this is the image and the name of the image I'll be explaining the yaml structure after this class I will be explaining the yaml structure after this class so don't stretch your head you know what is this colon and why he's white is VM image right so don't worry on that but for now if you see what it is saying is that from the pool take up the VM image and take a Windows latest now the windows latest is the um hosted agent of azure devops so at this moment our pool name is my computer agent and inside that pool we have just one agent right so what we'll do is we'll say that okay go ahead and just refer the pool name so I'm going to go and copy this and I I will not be referring the VM image I'll directly reference the pool name so with this you know he will go to the pool and at this moment in the pool we have just one computer it will take that computer and it will run try to run these tasks inside the agent so basically when the tasks run right here you will see that the agent is running it is executing those tasks and so on right so I'm going to go and save this right so I'll say now this is again look at it every time you go and change something in the pipeline he actually goes and commits in the repository right so I will say this is uh so we need so so that you know if you want you can revert back so you can revert back those changes in case you find it is not working right so I'll say this is version two and we added the added custom agent right or we added self-hosted agent okay so just a comment out here I'll say commit save it and I will also go and run this right so I'm going to go and run this now look at it just before I run you can see it has already started running you can see already it has started running you know why because uh you know there is a small property out there where it says that as soon as you save it you run it right so you can see it has started running out here so if you see this is recent right in the recent it is saying that this thing is running this quest one project pipeline is running in the runs it is showing that the first version was unsuccessful remember this was unsuccessful and at this moment it is running this one so you can see this clock out here which signifies that this is running and this is the old one right so I'm going to go and click on this when you click on this you can see out here now uh you will see that there is job out here and uh you can see it is put it is popping up a small thing out here saying that the pipeline needs permission if you remember when we created the pipeline I purposely on purpose I unchecked that checkbox you know saying that we'll see that later on so in case I had checked that checkbox in case I had checked that check box then this alert won't have come to me right but at this moment this alert has come to me and if you go out here you can see agent has connected fine so I'll just go and say View and I will say permit right permit this pipeline to access the computer so you can see now this is like a console out here you know where you will see uh where you will actually see things right so the first thing what you can see out here is that he has acquired this agent he has got this agent and this agent has pulled up your job and he's trying to run it and if you go and see in your local computer right after some time over here it should actually you can see now it is downloading all the tasks out here so it is actually downloading the task like build uh you know like doing a get latest right so uh let us see uh timed out retrying connected I'm exp okay there it is it's saying running a job I'm sorry it is already running it you can see at the top it says agent connected agent reconnected and here you can see running the job so that means that it is now actually running the job out here and you can see in the console uh it is it has acquired the agent you know he has given the agent version he has downloaded the nuget remember it's a MVC code application it is doing a build it is doing a task and so on right so uh now you can see each one of these tasks very clearly this is the vs build this is the vs test and so on right so if I go and click again out here so you can see this small circle out here which is indicating that this is running remember this is running it is it is not completed and if you want to go and see the details of it you can click on this and you can see exactly which step is running so he has completed checkout he has completed the nuget he has then completed vs he's now working on vs build and then on vs test right any kind of red sign out here you need to look into it you need to watch the errors and you need to correct it right so there it is it's running in the local agent you can see job has completed successfully so the agent you know first got the message you know but over here it will take some time to show the message but you can see that tick sign out here which indicates that everything has been completed and everything is good right so nice so you can see now here this is the recently run pipeline if you click on all at this moment we just have one pipeline so all the pipelines is just one Pipeline and we have done two runs at this moment we have done two runs at this moment uh the first run was a failure we got this error of the hosted agent right and we corrected that error and we corrected that error right and we corrected that error and this is everything you know which is running out here right so it is saying that okay How likely are you to recommend Azure pipelines to your colleagues oh like always right I'm going to just click on then I'll say okay nice right okay they keep asking for feedbacks and you can see how wonderful and simple this is right so here's a quiz right so basically here is a nice quote you know which has been quoted in the devops community I want you to figure out who has quoted this code and when right so the quote is if Ops goes to lunch with the Ops and the dev goes to lunch with Dev a low level of efficiency is a certainty right such awesome quote right because this quote summarizes the whole goal of devops the whole need of devops so if you know who it is must be you can Google as well right he's a very famous person right I'll give a hint he has started devops actually right so if you know who it is and where he has quoted it please put down in the comments thanks and let's move to the next chapter now before we go and see the output of the pipeline you know before we go and move ahead I think it is very essential to understand yaml because the complete pipeline of azure devops is written using yaml so let us go ahead and do a small tutorial on yaml and this small tutorial would help you to understand and customize this yaml code out here so yaml stands for yet another markup language or and another markup language it depends upon whom you are asking actually so for example if you're asking me I won't say I would say I like the end another markup language because the first acronym which is yet another markup language is more tongue-in-cheek it is more tongue and cheek so if you know what exactly stung and Chi you can go down and put down in the comments that tongue and cheek means this right so because you know the first acronym is more tongue and cheek I like the other one and another markup language so ain't another markup language means that um you know that this is not like HTML it is not meant for documents it is not meant for look and feel it is not meant for positioning yaml is meant for data so you know this is not something like HTML or HTML you know where we focus more on look and feel it is mostly for data right so if I if I try to put down a definition of yaml I can say yaml is a data serialization format this yaml here is a data serialization format for storing configuration information configuration data right so you can see that this is all configuration data of how to go and configure the pipeline and remember the most important thing about yaml is that it helps to exchange data between people and computers it helps to exchange data between people and computers I will repeat this definition out here that yaml is a data serialization format for storing configuration data configuration data means you know which the it administrators can go and change so those kind of configuration data and it is meant to exchange data between people and computers now you would say that okay didn't we have something like this you know like XML or Json uh yes we did have it right but remember that Json is meant to communicate between two entities for example let us say if you want to go and communicate between a client and a server Json is good but if you say that some some human has to read that language and configure it and change it then it has to be more simple and yaml does that so let us go ahead and do a small basic training on writing the yaml so what I've done is I have this URL out here online yamltools.com convert yaml to Json so what I'll do is I'll go and write down some simple yaml out here and then I will go back and switch here and we'll go into more details of a yaml right so to start with yaml you know when you write yaml you will understand that it is more of name and value right for example I can say that a name of a customer so name and I will say ship so you can see out here yaml is name and value you know we can also say here like let us say the age is age is 50 right so the first point to remember here is that yamal is name and value you can see at the right hand side it is showing Json now ask yourself a question saying that is Json very easy to configure or yaml right so that's why you know Json is very good you know when you are saying that you want to communicate between two technologies you know like the server side and the client side while yaml here is meant you know for the it administrators it is meant for humans it is meant for people to understand it and change it right so remember this pipeline will be configured by it administrators or it will be configured by people who are not so technical you know who who you know they will not understand these curly brackets you know they won't understand you know uh you know collection is represented by uh square brackets and so on right so definitely this is yaml is more simple than Json right so Json is very good when you're talking about uh technical communication you know between two technologies right and yaml is about reading that configuration and humans will actually humans should be able to understand it and humans should be able to change it so the first thing is that yaml is represented by name and a value property and a value a name and a value right the second important point to understand is that yaml is indented by spaces I repeat this yamal is space indented space indented means for example you can see here this is name and then this is shiv if you try to do something like this you can see that this parser is not understanding it right for example now let us say that I want to say that both of these values belong to customers so I'm going to say okay there is a customer uh object or there is a customer and inside that their customer has name and age then yaml what you will do you will say customer right and like this and then you will put a space look at this when I put a space out here this name becomes a property of the customer when I put a space out here look at the right hand side look at the Json output that age becomes a part of the customer so you can see that this is space indented this is space indented please note this is not a tab space indented right so first point it is name and value second point it is space indented the third point yaml also has collections you know for example I will say okay this is customer out here and let us say this customer has multiple addresses right so what I can do is I can see here addresses right and then inside this address I will say now we have address which is Mumbai must be we have address which is uh uh Kathmandu must be and something like this right so you can see here you can see at the right hand side it is it is showing the Json output so it is saying that okay customer has addresses and addresses has Mumbai and Kathmandu as you know the addresses right so remember the collection is represented by hyphens right and you can definitely also go and do nested objects you know for example I can go out here and say that this customer has um um you know he has a job profile so I can say okay he has a job profile right so inside the job profile what does he have you know his job profile has uh so you can see again space very important space right so profile has that his designation is that his engineer must be right so designation he is a engineer right please note that this red sign you know does not indicate uh and obviously it actually indicates spell checks okay so you can see that error that error has gone off right so designation is an engineer and uh it's a designation spelling wrong designation designation okay that I right so you can see again space indented you know this profile is having a one of the and you can put other properties also you can say Okay designation and he's working in Department which is uh must be Electronics right look at the right hand side right so remember Point number one name and value I know that I am repeating right Point number two uh you will be you will be using space indentation whenever you are indenting you will use a space Point number three you can have a collection by using this hyphens out here so hyphens represent Collections and you can also have nested objects like this inside the customer you have profile and profile again has properties so now that we have understood yaml now let us try to see how the Azure devops yaml looks like right so with whatever basic understanding of yaml we have now I think it is more than enough to understand the basic structure of the Azure devops yaml so you can see here this is the Yammer of azure devops and what I've done is I have taken a print shot out here and let us try to understand right so remember the first thing I said uh that basically if you see here uh these hyphens are actually collection so you can see this is Master this is Task so for example if you see out here the complete yaml has a lot of tasks in like example you can see uh first one is like you will use nuget you will install nuget right so you can see there's a task here and you can see it is a collection so this is a collection so you can see there is collection of tasks in this complete yaml pipeline the first task out here is installing nuget second task out here is you know doing a get of the new get right uh and then means getting the uh getting the solution right restoring the solution the third one out here is to go and build it and then down below you can have test and so on so you can see all of these are collections you can see this uh small hyphen side out here right inside the task you can see for example you can see inside the task it is saying again uh there is this inputs out here now again inputs and you can see this indentation space indentation look at it this is steps right steps after that the steps has task so you can see here steps colon right and then you can see task and then task has again parameters like you know what is the solution and so on you can have task vs build again what solution and code you want to build right you can also see the simple name value pair one of them which we just set now pull my computer agent right look at the variables out here variables it has a bunch of things solution build platform build configuration release and we can also say we can create one more variable down below and we can say Okay DB connection string is this right so you can see out here name value pair whatever we learned till now space indentation look at those small spaces out here which describe the indentation collections right so now it would be very easy to understand this yaml right so you can see here at the top how is this yaml pipeline triggered when somebody goes and checks in inside the master to run this pipeline which computer are we using we are using our computer which is my computer agent this pipeline you know does it have any variables yes it has some variables out here you can see build platform and so on and minimum you know a pipeline needs steps and tasks so you can see steps plural look at it it is plural then inside this the first task out here is install the nuget the second task out here is you know get it third task out here is build it four task out here is tested so you can see here basically where you have to focus out here is steps and tasks so that's how uh you know yaml is right now you can see out here um you can see these are the tasks now you'll be wondering that okay where is this task coming from this task is nothing but task given by the Azure devops team right so if you do a show assistant out here right if you do a show assistant out here for example you can see this is a vs task out here let me go and delete this right so if you want to get this task what you will do is you will go and you will say test you can see Visual Studio test keep your cursor out here very smoothly keep your cursor out here and click on this you can see and click on this Visual Studio test right you can see a bunch of things out here the properties that which are the test files you want to test you know where is your test test code and so on and you will say add right so you can see now the task has come right so remember these tasks are actually nothing but the task you know what is given by the Azure devops team you can see there are holes of taskers here thousands and must be a lot of tasks you know I've just given a number out there thousand but a lot of tasks out there which you can go and you can pull it very easily remember how to pull up a task right so you will go out here and let us say you will say you want to install uh SQL you want to go and run SQL script right so you can see SQL and you will say SQL Server keep your cursor out here look at this cursor it is blinking you will click on this you will give all the necessary properties and you will say add now this is one of the tasks which will actually go and deploy right I will just do a control Z and let us go back to what we had previously right so I've just made a control set out there right so that's the basic of yammar and I think this is more than enough to get started with understanding the azure devops yaml now most of our time we'll be spending around pipelines we'll be creating pipelines we'll be editing them we'll be running them we'll be viewing them right so uh you know in this one minute I will give you some exercise you know and I want that you should do that exercise you know a couple of times you know so that you get acquainted with the menu of azure devops right so here it is if you want to see the pipeline you will go and you will click on this right and you will get this UI to see the currently run pipeline you can see recent out here you can see all out here which says that currently which which pipelines you have and all the past history of the runs right so the first UI which I want you to get acquainted is when you click on Pipeline you can see all your current pipelines out here recently run pipelines I'm sorry second one you will see all your pipelines right at this moment remember if I go and if I create a new pipeline I will see it once again out here one entry I should see here right and all the pipelines you know and how many times you run the pipeline if you run the pipeline five or six times or whatever right all those runs are seen out here right second if you want to click if you want to go and create a new pipeline you can click on this right side out here new pipeline that will help you to create the new pipeline right so that is the second thing the third thing is if you click on this pipeline so for example so we have all these pipelines right so if I click on this Pipelines it will show me that how many times it has run right and I can also go and edit this pipeline so you can see here I can go and I can edit this Pipeline and I can make changes to this pipeline right if I want to go and run I can run this pipeline while I'm in the edit mode you can see there is a run or I can go and I can run this pipeline from here as well right so when you click on all you see your pipeline when you click on this you get more details about the pipeline that how many times it has ran if there are any branches of that pipeline remember I said this pipeline yaml is checked inside uh inside the inside your inside your repository and you can also see there are some analytics given out here right and if you want to go and edit you can go and click on edit out here you can edit or you can also go and run the pipeline from here right so this is a couple of practice I want you to do because if you look at this UI right it can be very confusing at times you know where to click and what to do right so I would I would I would suggest that you can pause the video for some time note down these steps somewhere and just practice it you know three times or four times so that you are comfortable with the pipeline UI because I've I found that whenever I'm on on the field and I'm doing this pipeline work right at the initial stages specifically it was very confusing you know where to click right and what to do right so I would suggest to do this practice out there good then also now let us go to this pipeline out here let us go and run this pipeline right so what I'll do is I will run this Pipeline and so when you run this pipeline when you run this pipeline it will give out a prompt out here you can see there is some prompt out here saying that you want to run this Pipeline on the master or you want to run this Pipeline on some other Branch right so for now I'll just say run and the pipeline starts running right now if you want to go and see more details about the pipeline then how it is running you can click on this menu out here job and you can see this part right again I repeat if you can also go from here also you can see this pipeline is currently whichever pipeline is running it is seen out here if if you click on this also you should be actually be able to you will go out here and if you click on this you should be able to see this detailed uh what you call the a more detailed look of that how every step is running right so when you run this pipeline right so very quickly when you run this pipeline from here you will actually go and you will actually see a detailed view of how your job is running right now if you go and if you see this uh this thing out here right the output out here so if you see out here you can see first thing whichever whatever these things are out here is nothing but these are task remember you can see these ones what you see inside the jobs are tasks so if you go and if you edit your pipeline you will see for example look at this nuget installer so you can see this is the nuget tool installer so this task has run and when this task runs he actually went ahead and he installed nuget right now you will see sir where did you install nuget he installed nuget into your computer remember at this moment our agent is running into our computer right so think about that that agent as a person who is actually going and installing new get right and you can also see in the folder in a various install nuget remember this is the folder in my local drive right after that he didn't he actually went ahead and he uh actually whatever packages are there in the solution file he has got that so you can see this nuget command out here this is nothing but this after that he went ahead and he built the application so basically he built our DOT net core project and you can see that he has used the solution file he has used the project file and he has built it you can see uh all the built uh things out here right and you can see that finally he says that yes I have uh also gone ahead and uh put this output out here into this folder right after that you can see there's a test we don't have any test at this moment so that's why you can see that uh that at this moment no test is found somewhere they should say that uh there is no test at this moment right so you can see minimum test expected to be run zero and uh well at this moment there is no test out here there is no test project right so basically whatever task you find out here you will find a more detailed view out here right the most interesting thing about this is the initialized job out here because in this initialized job you can see that he is actually trying to acquire the agent and when he acquires the agent he has acquired your agent which is desktop so remember in this initialized job out here if you if you see our agent at this moment this is our agent which is running locally that agent name is seen out here right so remember let us go and run the pipeline and see once again run once you run you can go and you can see a detailed view out here so you can see waiting on the agent right so this agent has sent him a signal so he has acquired the agent which is our agent right in the initial step so if you see out here he has acquired my agent after that he checks out the code after that he installs the nuget you can see look at this side out here these are all green and this vs build is running currently so we can go and we can see a live feed out here of the build you can see now the vs test is running and you can see the post job is running right so nice uh everything is green everything has ran right but at the end of the day uh where is the final output where is the final artifact where is where are those bin folders those obj folders where are those compiled dlls there are where is the output in which we can go and put it on IIs or put it on a server and we can make this application live right so we would like to go and see the final output out there right now remember that as I've said the final output is nothing but the artifact if you remember the big diagram of azure devops which I had drawn in that there was a special mention of the artifact so you know as these uh tasks you know run right as each one of these tasks run one after another right and they get completed we want to see the final artifact right so if you go and if you see out here uh so if you go to the pipelines if you see any one of the runs for example you can see this is a run which we have done some 15 16 minutes back right so you will see that there is a um what you call there is something called as artifacts out here and you can see that it is um it is zero that means that nothing has been sent to the artifact folder so how do we do it now right so let us go to the pipeline let us go and do an edit out here so let us go to the pipeline remember I have given you some practice on how to go and click on these menus right please do practice those things two or three times or else you will get confused where you're clicking right so I'll just click on edit out here I will hide this right now if you see our actual build happens here this is the vs build which actually happen actually happens right remember these tasks are given by the Azure devops So when you say vs test this is a task you know given by Azure devops right and we have pulled that task from the assistant out here so you can see out here when this vs build runs he actually uses this solution and from the sln file from the project file he goes and he puts it puts the final output in a zip file in a RAR file and he puts it into the artifact staging directory so this is the staging directory you know where he puts the final output right and after that he runs the test and nothing so you can see there is no task out here which is saying that go and publish this final output so there is no task out here which says that take this web app.zip and publish it right so I'll do like this now first thing this test at this moment makes no sense because we don't have any test project so I'll remove this so now let us go to the show assistant go with slow and smooth hands with light hand side I'm putting the cursor out here I will go I will say here publish right so we want to go and publish now you can see there is one publish out here which is deprecated so we will not select that you can see there is another publish out here publish build artifacts to Azure pipelines right so yes so we want to go and select this and it says that okay from where to pick up from where to pick up uh that thing so we are seeing okay the please go and publish this please take that zip file you know from the build right and publish it into this artifact directory right so I'm going to go and click the cursor out here look at this 31st line my cursor is out here and I will say take that zip file and put it into this drop folder you can see the artifact folder name he has given a drop but if you want you can make it something like this as well right but I'll just keep it keep it drop for now and I'll say add add and you can see now you can see this drop out here right so now let us go and save this remember as soon as I save this it goes and it runs right I'll later on I'll tell you that how to go and change that behavior and remember every time you go and you change the yaml file please write down the reason so I'll say that added the publish task right so that we have a track or else we will not know that uh you know why where we have changed the yaml right if we don't have track changes right so I'll just save this remember as I've said by default when you save the pipeline runs we'll come we will see later on where to go and change the setting so there it goes now so uh it will go first thing it will initialize the job you can see that he has acquired my agent my agent means this one out here and then he will take one one task uh and uh let us see if we can see the final artifact or not right so there it is it is running so actually uh all right so there it is we can see the vs build is running and once the vs Bill completes he will try to run the publish artifact look at this rotating animation circle out here these green ones indicate that these have been completed right so the build takes a little bit of time you can see the live feed of the build out here so if you can see go down below so there it is the build has completed so now the publish will start right it's little bit slow actually actually it has completed a little bit slow it is but you can see that the published artifact is out here and he has published this artifact right into the drop folder right so now if you go to the pipeline if you go to the currently run pipeline out here uh runs and uh okay now I see the published you know you remember like I was just wondering I was seeing Zero artifact out here remember it is not so quick huh either my Internet is slow so like when I go to the runs out here and when I click out here you can see it shows zero artifact then it shows published right so looks like you know there is some kind of a call out there which is made so you can see Zero artifact zero artifact that's one published right so you can see this is uh the artifact is published right and I'll just click on this one published you can see it is in the draw folder uh we can go and we can download this ZIP file let us see uh what it has and what we expect is that in this ZIP file uh we should see uh all those dlls out there right so I'm going to go and uh paste this ZIP file must be into this new folder out here I'll just paste it right let me just extract it out here let us see the content of it and the content if you go and see right I know that there are lots of folders inside it will come to this later on why there are so many folders right but if you see the final thing is this one the obj folder out here right and in this you will see oh my whatever right so that is you can see the final dlls your app setting files the WW root your CSS your JS everything is out here right so basically uh that's a web app.zip and now the next step the final step the D thing right is that we have to take this web app.zip and we have to put it into our IIs server we have to go and publish it to a server to a web server right so till now what we have done is our pipeline is running series of tasks it is doing get latest it is a doing the build right it is doing the checkout it's doing the build it is uh publishing the artifact but now that we should have something out here which takes this artifact out here right which takes this artifact out here which takes this artifact out here and sends it to the server so that is a final step which is spend okay congrats to you and congrats to me as well because we have completed one and a half hours of lecture you know that's a big thing actually here it is till now I have shown the demos till the build right we have still not made it live into IIs so we have to make it live into IIs right so for that we have more seven chapter spending that means we have more 30 minute spending on the screen I'm flashing those seven chapters right there it is right now more than a YouTuber right I'm a teacher first right and I would like to know or I want to check out that how many students are benefiting how many people are benefiting from my lectures because these lectures take a lot of hard work right so I want to know that how many students have reached till this end one and a half hours right so if you want the remaining 30 minutes I'm so sorry I'm becoming selfish out here if you want the remaining 30 minutes please go ahead and share this video either on your LinkedIn either on your Twitter either on your Facebook and send us a mail at question.com you can see I'm flashing right here correspondent questmon.com and we'll send you the video right away right with that you know what happens is as a teacher we get encouraged we know that people are learning and we get motivated to put more such videos okay so that brings us to the end of this awesome one and a half hours I hope that you enjoyed the complete lesson so we have covered approximately 28 chapters and the remaining seven chapters I've already said how we can Avail right so in this complete 28 chapters what did we cover right we talked about how to open up an Azure account we talked about what exactly is azure devops we looked into boards we looked into repositories we looked into build pipelines release pipeline test plan artifacts agent agent pools yaml deployment group and who's right so thank you very much Happy learning happy job hunting thank you
Info
Channel: Questpond
Views: 275,409
Rating: undefined out of 5
Keywords: what is devops, Azure devops tutorial, devops tutorial for beginners, azure devops, learn devops from scratch, create ci cd pipeline azure devops, learn devops step by step, ci cd pipeline, devops for beginners, tutorial for devops engineers, yaml tutorial, devops step by step course, azure devops training videos, microsoft azure devops, understand azure devops, devops CI CD Pipeline, learn azure devops, azure devops for beginners, yaml devops tutorials, yaml
Id: aonA7Kb7WGE
Channel Id: undefined
Length: 102min 7sec (6127 seconds)
Published: Sun Mar 12 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.