right good so we've been talking about our famous cic setup and we said um you would normally move from you normally move from G to whatever build to which you're using so your build to what build to we have we been talking about in class Marvin so we've been talking about Marvin and this Marvin uh B2 can also be integrated with automation server and we mention one or two automation servers in class which automation server have you been talking about Jenkins Jenkins Jenkins yes so move to um obviously yes thank you for that so you would have this on your git push that to GitHub and your build2 is going to integrate with GitHub to pick whatever source code which you have the build it and during the build process we talked about um uh testing Frameworks like junit which you can use for unit testing and we said J unit can test the individual functionality of the code to ensure that the different uh aspects or the different units of code actually integrate and in our sample demo you'll see the functionality of junit and how it jit test is run on our source code each time that we want to do a bill and if the build fails then our Cod process stops and we can integrate pH with other um code analysis tools like code analysis tool to we talk about in class Cube Cube and Son cube is going to do another analysis so that the developers can actually get a feedback on the issues that de code which you have reaching has so can do um evaluate vulnerabilities can code smells you can evaluate box and stuff like that and all this is displayed on the son son UI so the users or the developers can actually go in there and actually see what issues that um their new code or the code base has so that it can fix it and we would also have sonar Cube and our bu2 which is our automation server which is running our cicd which is Jenkins talking to each other so meaning meaning that uh Marvin will build send our uh a code or um code for sonak cube analysis sonak Cube also has what we call Quality Gates and quality profiles and these quality Gates and po provides are just standard policies that an organization might have so that um whatever code which is written our source code adher to such standards okay so we have this quality gate and each time there is a bill the quality gate would evaluate our code and make sure that it passes all the conditions which will place in the quality gate all right and if it passes then it sends um um response to Jenkins that oh everything is fine based on on this bill and based on this analysis then the Jenkins pipeline can go ahead can move forward all right are we together once son evaluates it and pip our our build is successful then we can then deploy our artifacts can then send our artifacts to a repository and we talked about an artifact um Nexus so we can use the Nexus repository repository to store B activ but this is not the only feature of Nexus Nexus has other features like es bomb have you heard about es bomb before no so it's something that most companies are looking into now is called soft software build of materials so basically it's a report that gives um whatever your application is made of all right so you can look that up um it sonq also has the um ability to generate generate s bombb reports but that's not part of our scope for today and um once our bill passes and artifact is deployed to to uh Nexus then we can deploy our final actifa to some sort of a web server right so we can have a web server and we already used one SE Ser in the class based on the type of code which we which we using which is seet and we can then have our pipeline that runs from um uh Git it moves to Jenkins and Jenkins is going to perform all the bill once Jenkins is performing the bill Jenkins sends um code to sonar Cube for code analysis and if sonar Cube passes or the code analysis passes the quality checks which we've implemented then it tells then Jenkins that oh this is fine then Jenkins can then push our artifact to a repository an artifact repo which is NE Nexus and you can have one pipeline that does checks out check out your code from GitHub does the build does the code analysis withar Cube and push your your your your um artifacts to Nexus and a second pipeline that is triggered whenever you have second pipeline that is triggered whenever you have a successful push of artifacts to nexity which then text this artifact and deploys it to Tom cut server so let's just call it a web server so could Tom card anything which you want to do so I will call this our deploy I will call this our scan and this obviously integrates with Marvin and this would be our CI which is our continuous integration right we build stage are we together yes BR does does this make sense any questions Prof um where does the um CD start from does it start from when it's deployed to Nexus no CD okay CD CD because you know the the CD could be continuous delivery or continuous deployment so continuous delivery is when you we are sure that our artifacts are ready and is deployed to um Nexus and we know that this actifa is ready for production right so you can have that or you can have that continuous CD which owes continual deployment which takes the artifact directly and pushes it to um the end users which your to your Tom card and those that are basically browsing your website or using your application can immediately uh use a new version of that application any question I assume we've already talked about this so this is all high level stuff I have a I have a question the the there was a tool you mentioned up there between um son Cube and Nexus what was that something about quality what was the name again I know it's not on scoped but you called it something quality on mute am I on mute no Prof no it it is a feature of sonar Cube son Cube feature quality it is called quality Gates okay gate okay the quality gate also has something called quality profile so these are all features of sonar Cube so you can um basically set up quality Gates and quality profiles and these are just policies or conditions that ensure that whatever code that the developers are writing they must pass this quality Gates they must meet these conditions so each time code is push each time a bill happens it sends that to to sonar Cube sonar Cube uses the quality gate which you've already prepared evaluates that code maybe for code coverage maybe for box EV uh box um vulnerabilities maybe some checks if this it evaluates it and it gives a score if the SC is passed then it tells Jenkins that oh this is good it meets our standards at least it meets the base minimum you can continue with the bill and push the bill to artifact to to Nexus so a bill is an artifact is only pushed to the Nexus repository if the quality checks have already been U evaluated and they all pass okay okay good what that second quality for the feature is it Quality quality profiles I think it's called profiles okay so so I think it's called give me a second do I have browse browser open here you we'll see that let's let's go ahead okay somebody can also just check I think it's called quc profile give me a minute I'm writing from my tablet so using the browser is not uh I think it's called quality profiles yes quality profile something like that basically that's it any question on the setup so this is our simple project right so the div like I said as we've been talking about there is no one siiz fits all you can have the simple uh um the goal here first of all is for you guys to understand what cicd is all about how you can integrate this different tools right but now you have different iterations of cicd you can have this not Jenkins but Azure devops gitlab whatever and you can have not um Nexus but something like jrog some people are even using S3 you can have um different quality uh uh um uh code analysis tools which are not sunam and you can have a different deployment step that is not just using for example we used a plug um a plugin before which is deploy to container to deploy to our web server you can actually have another uh um Step which is um talking to an anible so you would have something like here an anible server that sits in our deployment phase we have anible and This anible Server would have a Playbook and now the anible server can talk to our to our Fleet or to our pool of we web servers right so what will happen now is you'd have the artifact Jenkins pushes Jenkins pushes this artifact to Nexus and once it's done and we it show that it passes all the quality gate and checks and everything is fine then Jenkins can actually trigger your anible pipeline your anible server to to basically pick up the artifact from Nexus and deploy it to the and web servers to the final production uh and um deployment environment makes sense so there are different iterations of others but the goal so you understand basically when they talk about cscd this is what we are talking about so so sir the just a quick question again so the quality gate is a f function of of Sona Cube but in this particular cicd that pipeline you just described the the workflow goes back to Jenkins for it to deploy to anible or does it go from Nexus to deploy to anible I'm just trying to imagine how the bill remember we want to ensure the code has a good quality yes so Nexus is only keeping artifacts there's no point having an artifact in Nexus if it did not pass code quality checks right so it builds the first of all sends the our code to Nexus Nexus evaluates it sorry son son evaluates it if it passes then son Cube actually sends back a web hook we talked about web hooks right how you can have two different servers or two different endpoints talking together so you can have um um um sonak we would see that in our actually evaluates it and we set up a web hook and if it passes then it sends back a message to Jenkins that oh everything is good continue with the bill then when Jenkins receives that uh pass or that thumbs up from sonar Cube then it continues the next stages in our pipeline finishes the bill then pushes it to actifa so we only have artifacts after all our quality checks have been uh uh evaluated are we yes to understand um are the environments where they use um nexos to run quality checks I think it probably has a future feature right uh I I haven't used it but I can see no because Nexus has I think a bump of a bunch of features which you can you can actually evaluate right so when I switch to my my uh PC then we can actually look at that if no questions then we can move and we can look at our demo yes one one more the web hooks in this diagram where does it where does it exist so I can visualize it the web hook you just mentioned this is this this is going to be the web hook it's our web Hook is going to sit here let me try to make it clean oh good better way so our web Hook is going to sit here between son Cube and Jenkins got sure okay so this is where the web Hook is so sonar cube is going to do the analysis and if he gets everything moves well then it tells Jenkins that oh it was passed if it fails also tells Jenkins that oh it failed and then Jenkins is going to kill the pipeline means the pipeline failed so the pipeline only moves to the next stage if it received a success from sunar Cube we together totally thank you any question um I have a question yes so um Sonic cube is pretty much like junit right Nexus is sonoc cube is not really junit there's a difference between unit testing and code analysis all right so for example J unit can actually ensure that for example you you're writing your developers are writing code in whatever language they're using it has Frameworks they have they using functions and now for we will see a simple J unit test let's say that it's it's a web server and this web server is should display a certain message or the landing page right should be in a certain format right yeah now you have um how you call amazon.com we all are using Amazon Amazon has what um payment it has a card it has a shopping it has address it has all those different features that are on the landing page right you that's what you just see you just see the UI and you see that but know that this payment your address um your uh um shopping cart your orders your tracking of orders these are all different applications in the background which are all integrated in that learning page let's say now they want to integrate some new feature well or for example let's say before you do not have have the ability to um how do you say uh have multiple addresses on Amazon just very silly example now A Team inside your whole Amazon ecosystem is building is trying to add that feature before adding the feature we already had a landing page that was working right yeah now they want to add a new feature so that people can have multiple um um add multiple addresses something like that okay this just a use case J unit in this case is going to do what we call the unit testing it's going to ensure that before this commit came in with this new feature we already had an application that was working right yes good now the developer commits something the unit test in this case is going to ensure that this thing or this new feature or this new uh uh uh um application which you're integrating into the landing page it doesn't break what was already working so that will be the job of jun it's going to do that unique testing now Sona cube is going to do what we do code quality checks for example if you are having an application that's talking to a database and you hardcoding that database credentials in the application itself in the base SCE source code and you're pushing that and building it unit testing is not going to pick that up but sonar cube is going to ensure see that oh they qu the with code analysis there is some vulnerabilities in the code I'm trying to make you understand the differences between this unit testing unit and are we together yes yes I understand is um un going to be implemented in Marvin during the build yes we already used gen a couple of times and it's implemented in Marvin it's also implemented in Jenkins because there is a Jenkins remember we said Jenkins is a p it's a plugging ecosystem you just add different uh tools to it by installing those plugins right if you look at the pal files which have we've been using so far there is a dependency there that says junit okay so Marvin has a build to also has the ability to Marvin has also integrated some of this this these features right so it has integrated M you remember like the last class we which we had we did not use Jenkins if you remember but we were able to still deploy our artifact to Nexus do you remember yes bro that was because Marvin as a build Tob also has that inbu ability to do um a distribution of but Marvin is not an automation Ser beauty of Jenkins is Jenkins can do all these things he can talk to son can talk to Marvin he can talk to um a bunch of different tools that Marvin cannot okay Prof quick question where does um spun or um data dog come in spun a data dog that's monitoring so monitoring is at the end with build deploy and people are using it we want to monitor we want to ensure that okay um this was Christmas season that Amazon's UI was actually working and because of overload um people did not start receiving 403 or4 or 503 or stuffs like 504s right so that's monitoring so data Doc is a monitoring tools spun I've not used spun but I think it's also monitoring monitoring and logging tool I think be monitoring like the production environment you can monitor whatever environment you want to do for my environment we monitor just production there's no point you getting me up at 2: a.m. if it's a development environment I'm going to be so pissed so but developers do have it right because um different like I said um different organization or different companies imple do this differently right because um if I'm using my current working environment as an example we don't have slas for development and and um integration environments we have SLS only for production environments and we also refuse to monitor um development and production environments if you want to do have that monitored we can we have the expertise to actually build but we do not maintain so we can build it and in that case we push all the monitoring and all the alets to your death team because as developers are developing and they they testing their environment in the test environment they also want to be able to see what the problems that they do face so we as a devops team or we as a cloud engineer team we don't we're not responsible for that we mostly responsible for uh the production environment however we do have one I do have one project that I we are still monitoring the uat just because the company decided to pay pay so money speaks um um Prof one last question I just wanted to know um regarding um sonar Cube do you have to sort of understand the data that's is coming out like the output or that somebody's job as a devops engineer sunar Cube analysis is mostly analyzing source code that source code what you as a devop engineer you did not write you as a devop engineer you responsible for integrating it into the pipeline and making sure it's they have the result but now when the bill happens the developer the person that wrote this the application needs to go see what the problem is and fixes it but if if you have have a pipeline and it FS you remember the console on Jenkins console it tells you why it fa right if the failure was because there was a quality gate in sonak which it did not pass then that's not your problem it's not the pipeline configuration that is a problem it is the code that is the problem the code needs to be fixed okay and most this quality Gates will also not be uh developed by you as an individual or put in place by you as an indivual because we have obviously you can do research and uh build the quality gates for whatever project but most of these quality gates are put in place by the dev team right you're just integrating everything into C the pipeline all right I have a question yeah in this um uh at this point at this point what can please give me the example of pipelines what the examples of pipeline based on this our discussion this topic that question takes me by surprise what do you mean by example of pipeline do you you don't understand what we mean when I use the word pipeline yeah that time Pipelines you know um I'm not I'm not I'm a it's a terminology that want to know what the the examples I would I would say pipeline is just um how do you say put it subject dragon in the whole devil sphere right because we are trying to um build have an analogy that we have a pipe that something enters at one end and leaves at the other end right yes do you get my point yeah yeah get point so you have a pipe something gets in at one end then it leaves at the other end so they have a pipe so you everything that gets in goes through that flow now in that pipe we have different things that are happening as whatever is Flowing from one from the uh entrance of the pipe to the exit all right so in the entrance you're having your build in the middle you can having you're having some testing that's going up in the uh uh let's see 60% into the pipe different uh levels of testing is going on right anything that exits the pipe is ready for deployment so that's what we that's my my analogy I can give you as pipe now when we say pipeline in the pole devops and uh sdlc worldall we actually talking about the complete process of actually developing code pushing it building it testing it and deploying it to the end users that's a pipeline does it make sense yes another question is this artifacts you know you knowa to to my understanding Factory is where theact is is is kept is yeaha this can you please explain this what does that one artifact what does that mean so our artifact is just our um uh end product right it's a binary of our application remember that when you writing application in Python you're doing print this or Dev this or import this or build this or stuff like that that's the codee but no computer understand that that needs to be built or that needs to be packaged into a binary or into a a bundle that um a computer actually understands right so the artifact is just the end product of that bill that transforms the source code the Rob whatever lines of code 10,000 20,000 lines of code which you written into something that the the computer's operating system can actually understand are we together yes okay I that for example if you go to the web and you're downloading an uh um um an application that application always comes to your your downloads in the bundle. exe do whatever those are the binaries that are computer can understand but that's not the source code that is what that is an artifact from a build process okay are we together okay yes but if you look at that download go to your download directory are you see the exe or whatever executable it might be in the background there might be some 50,000 lines of code okay okay so a build a pipeline actually took that those lines of code which developer wrote from the PC pushed it to GitHub took that a pipeline picked that up build it and generate that ACA which you're downloading and executing and installing whatever you're installing on your PC does make sense the contents code yes okay artifact is basically the the build product whatever pipeline that you're building that's what we are trying to generate okay product okay yes yeah and and and can I add something the end product can be it's actually an executable that you can then execute something at the end of it which is what the whole process is trying to build binary executable whatever that is I believe y much yes with regards to let's say with Docker I guess um the build will be the image the final image that's your artifact that's the artifact will be the final image yes artifact will be the final image and now now you now have that as an artifact and you put it in its own artifactory or what it own repository which could be D which could be ECR okay oh ECR yeah yeah yeah do yes tget so I don't know how it's called in gole platform but I think gole also has it and Azure also has one and everybody's building yes good Prof you you really deconstructed this thing for me to be honest um it's it looks a very simp you've just simplified it in in a way that even a six-year-old can understand thank you very much thank you too I'm glad you followed up great if no questions on this then we can switch to our hands on and um basically put to practice whatever we've been talking about any question this is our official last time I'm talking about all this final question again question um I've been um so regards to um in terms of like the monitoring what extent do we have to know like um those tools like data dog or plank what extent as it depends on your environment if you're responsible for for setting up monitoring you should know it it's mainly setting up and configuring in the environment you're doing it end to end for example I'm I just mentioned to you guys that I'm on call now right so I am on call on all our AWS projects so that's like 30 different projects so if there's an there's an problem with a project right now if there's a problem with an environment they are trading platforms they are energy platforms they um T might know one or two of this companies there's a Primo which is our uh um um forgotten the the the name of this in your country Ghana but it's an energy company that supplies electricity to homes here so it has it UI if there is a problem right now in the environment then there it routes the problem to me 2: a.m. 3:00 a.m. and I have to get up now in the back end of uh um the monitoring setup of that we have different tools that have been integrated to actually build this there Cloud watch Cloud watch you remember we talked about Cloud watch and said Cloud watch has Cloud watch and Cloud watch alarms and this alarms Cloud watch is monitoring metrics for example CPU memory and stuff like that and if that application is running on an E2 server and that server needs more memory then the alarm generates um a cloud metric gen triggers an alarm that alarm sends me a message right now that's just an example that's Cloud War we also have a lot of them running on on kubernetes right and one of Cloud wash also has what we call container insights and stuff like that they also can generate all this information but it's a bit expensive so there's an open source which is promus and grafana and Lead manager which most people use and that's great so we have you have different projects and to answer your question it depends on what you're using whatever monitoring tool you're using and if you're responsible for that you really need to dig a deep dive into it are we together yes we so for for for my environment we've used um um nus just once and it was not in a microservice environment but our goto to right now is New Relic data do and pritus and grafana Cloud wash is also good but companies don't want to pay because it's damn expensive so so you say you use New Relic to monitor is functionalities we have now it's I'm in a consultant wall of consultancy right so they the customer we we tell you that there's this this this this this has this feature this will cost you this and they make a decision right so whatever they go for and they are willing to pay that's fine we have also one customer that doesn't care he's paying 20,000 for cloud watch every month said no problem so it all depends and some other person is saying that I do not want a monitoring bill that is going to cost me more than 500 pound 500 euros per month another person doesn't care so it all depends so if a customer comes and say I do not want to pay I want to pay little or nothing when it comes to monitoring then you start looking at open source tools and one of the best in the business is prit andana Pro do you use it with um do you use all of them together neur Lake Dat Dog and per perit and grafana different projects are using different tools but different um um most projects integrate um a known AWS to and with Cloud wash because you remember Cloud wash there's some default metrics that cloud wash gives you right just for the fact that you're using AWS so we are we are making use of that so we are almost all environments even though they're using prom gaana there's still some Cloud wash in the background there's some dat there's still some CL wash in the background because by default if you remember we were talking about ec2 and all these things all AWS Services by default generate you some level of metrics so you can put some some monitoring on it all right so that's monitoring there's a difference between monitoring and alerting I don't want to have this conversation now we'll talk about it at then okay so when you monitor when there is a problem how do I know right now that there is a problem that's alerting alerting yeah so there are different tools for alerting okay what we are using is upsk I don't know I've mentioned this a couple of times but there's also alert manager so alert manager for pritus you can integrate that with slack you can inte with teams you can integrate that with your normal Gmail and stuff stuff like that so the the whole this this ecosystem there is not a one size fits all let me just I keep reiterating that all right so that's why if you get into an environment and they tell you oh we are using Spong here confident once we we are done with pritus and grafana and you also understand Cloud wash as as it works confident to tell them oh I haven't used sprong but I've used cloudwatch I've used prome maybe data do if you if you've been exposed to it maybe new New Relic and all the stuffs all right nobody knows everything good no question my CH I don't see Franchesca is she anywhere birthday today oh birthday today okay got you not to I want to send it great I sent a link please give me one Cho can you guys see that can you open that so for the handson today I want us to have a complete end to end it's still a low level the goal is that you understand what we are talking about all this Gates all this analysis and you actually see it and um to answer the person that asked about a pipeline this is a pipeline that will pick up our code from our um from GitHub build it push it to next I am not sharing yes okay and push push push it to um so and deploys it to deploys it to to Tomcat server all right so for this we are going to have a build server we're going to have a a build server which is M Marvin you going to have an automation engine which is Jenkins we're going to combine those two things on one ISU instance we're going to have a Nexus instance which is going to poost our Nexus environment keep artifacts we're going to also have a c instance uh that is hosting son Cube and we are going to obviously have our front end which is our web server that our our end users are consuming our application so this is a very simple Java application which I put together I'm not a Java developer so you can query it as much as you want and we will fix it and U we're going to deploy that and see what happens with the pipeline at the end of the pipe the goal is at the end once we have that setup then you should be able to make changes to the code push it to GitHub then the pipeline kicks off picks your changes does the bill does the testing does the analysis on Sonar Cube tells jenin that everything is good jenin finishes the bill pushes it to nexos and deploys it to to um Tom card and you can see I see that on the browser if we can achieve that today then we are done cicd EXA wow so are we supposed to what was the question I didn't I don't know if it's my network are we supposed to start or we supposed to follow watch you as you go and then just follow behind I think you can you can follow me I think you can also watch I want to do it so that we have a clean um recording recording yes I agree I can guarantee there will be no that's part of devops good so give me a second can you see my environment can you see my screen you see your face actually so next up two good yep we see it great so this is um read me of what we are am trying we are trying to achiev today so we have a simple cicd end to end project and for the project we need four servers like I mentioned one was going to host our Jenkins and Marvin one for Nexus another for Sona and our web server which is going to be based on Tom card we already used Tom card before for those of were those of you that were part of the session that looked at the hands on and all of the servers are based on Ubuntu will like to use T2 medium just so that we are uh we have resources and we do not face issues there then the necessary Parts Jenkins list is on 8080 so I 9,000 Nexus 81 8081 and Tom card 8080 so we can have all those pots all those firewalls open right any question if no question then I can go ahead give me a second let me loog into my environment then I'll share again can you see my screen yes bro good if there is a question please do not hesitate to stop me do we have some people that will follow the only question I want to ask is for you just to just explain a little bit again what this project is going to achieve what's the end goal so I said we trying to achieve a end to end cicd Pipeline and what do I mean by this um obviously you're going to have um your developers having written the quote from their local pieces and the push them to GitHub right so the project actually starts by picking up those changes GitHub which you can test I would like one or two people to actually follow up as we go along so that they can I can confirm that one or two people had success all right and you make changes and you push those changes to your GitHub repository and what will happen is you have a pipeline which you set up the pipeline will pick up those changes using pool SC which we've used multiple times and uh build that use the the unit testing Frameworks which is uh already inside which is junit send that for code analysis to son Cube push the artifacts to NE next Nexus and also deploy um those artifacts to our end server and we will be able to see the end result on the browser are we together yes BR did I answer your question yes sir yeah that's so once we have this you can actually um if you followed up of what we've been talking about you can actually have a good story that you can tell whoever you're talking to bring an interview can we use the servers that we used the last time the um Jenkins sonak and Tom okay I don't know how you've been playing with it so I don't know where your configuration be if you know it's clean for you that's fine right just what we did last time I haven't done anything else with it like I said if it works and your configuration is good that's fine okay question yes in a situation whereby the developers don't have um sort of um unit testing um as best practice in their code and we have our pipeline still doing some tests sort of would would that still pick it up or would it would it ignore or how do we manage that the unit testing the developer needs to put that in code you can put unit testing Frameworks in the pipeline if the because the testing is the test is actually code that is written to test the code that was the application code right yeah so the developer has to write that that test so so are you saying that there won't be a scenario whereby you know some some developers are so traditional that they don't you know have unit test in their they don't believe in you know they believe they they know all my my code is is good I don't need to have a unit test in my code to confirm or to I'm sure you face those type of people but that's now the uh politics of it's it's best practice to always have un testing nobody is um um everybody's prone to mistakes right there's no way that you can say that you write code and you don't get one or two things so automating that process is best practice you as a devops you should have a conversation with whoever is doing that the project managers the whole team to ensure that they have some sub unit testing implemented and I haven't seen that since I started talking with different teams but if you face that um if the developer the person writing it is actually not uh receptive enough to integrate unit testing into the code then you escalate okay but just just to be honest uh advocate here your pipeline scrypt can ignore and just continue with every other thing okay you can have a pipeline that has no no no no testing phase right yes exactly thank you I guess if you have a pipeline that has no testing ph and we talking about software then you and ready 90% of the time ship out garbage that's what I want to say will would it go into the production production wow that is disaster fir thinking yeah there another obviously there are levels of testing so we have testing teams as as well that will pick up whatever actif fact your pipeline is generating and test that before it gets into production manual testing you mean this is what this this is what we talked about when we started the whole devops or the whole cic thing because we said this testers it also brings about a delay in release because what happens when you have this build and you keep it there and testers need to take another two weeks to to to to do their testing before it's pushed out you actually have um um environments that are releasing to production every day so in that case you cannot have testers a bill process then testers come later to do the testing you understand what I'm trying to say yes I do yes I good so if you have a robust environment that it has thousand developers and they need to push out their changes almost every day then that structure will not work you need to have a rigorous automated testing policy and all that means you need test all your testing code and if any bill doesn't pass those tests then the bill is not released to production because if you want to have that scenario where you have build then testers come they test then it works that's the old way of doing it but if you remember when we started talking about all the devop Scorch and everything it slows down the release process yeah automated testing is the way to go pro absolutely sir that's true my question was uh the the integration test what's the difference between um the the test that being performed when the code is compiled by Marvin I think just before I believe just before you deploy it um Marvin sort of um does some that's the J unit test so what's the difference from that J test and the um the the compile test that it runs after the code has been compiled what do you mean by the compile test you can have different levels of test we are not it's not an exhaust and I do not know everything you can have different levels of test but I want you to what I want you to take home is the difference between unit testing and code analysis the difference what junit is doing and what sonar cube is doing those are two different things so junit is for unit testing and Son cube is for the ENT entire code analysis so sonak can evaluate for your code for read readability evaluate it for vulnerabilities evalate it for box evalate it for dep duplicated Frameworks which you're using and stuffs like that but unit testing is not doing it unit testing is trying to take this unit of your code to ensure that it is functioning as it's supposed to function and it's not breaking other things that were already working so whatever you're introducing whatever you're introducing into your into the source code is not breaking stops right so and integration test I think it involves other teams because you have to take into consideration other dependencies external dependencies while doing the integration testing so meanwhile for the unit test is just by the single function please um the unit and integration t depending on the testing Frameworks they can all all all be be be performing or trying to solve the same problem right because if I want to talk about my integration test I can look I I use we already use the the the analysis of our um Amazon UI and we said there already different applications that are running there and you're bringing in a new application or you're bringing in a new Feature Feature then you need to to do an integration test you need to make sure that this feature which I'm integrating into this landing page is not breaking the landing page right okay yeah and you as a Dev engineer you're not responsible for writing those tests application guys are doing that only do it and give you and you put it your pipeline if the pipeline fails you go to the p and you read why it failed the minute it says that this integration test failed because I'm expecting this result and I did not get this result then the pipeline is not a problem at that point I'm just sending a message to the developer and say like do you have five minutes they'll tell you no I okay the pipeline is not working please go and check this and you need to go fix it and you drink your coffee good so um it's very important for you to know in some environments out of curiosity some somebody might be curious to know and to learn and to try to Deep dive into it especially those that are have have metamorphosed into or shifted into into develops but they had a developer background so I've seen a couple of of colleagues of mine that were developers before that have have switched and when they have when when we have a customer that's having these problems they tend to overcommit like trying to solve that and at some point I'm just like okay I don't have to be in this call that's not my job please get whoever road that c to fix it but they because they already have that background from the developers they understand all the testing they can invest much more time and at times the man management FRS like that's not not being paid for thatuh yeah that's a job line yeah because um at the end of the morning you need to go look at your bookings how many hours you spend how many where and they are reading it and they are saying oh you fixing some unique testing and the manager is like what yeah trying to stay [Music] sharp good so let's go ahead two and a half hours three hours I think we should be done so I need uh four servers as mentioned so let me launch them please one or two people should follow along if you can that would be great so I need four servers and I have a we have a couple of of uh user data which we can use to launch this things so let me start with uh Nexus and sonar cube is it the same user data from last week he was going to share it the new one I think I already put it yeah it was in the in the the repo yes from and NEX yes the same user data we using from last week so now we can use the same instance let me let me launch yes for son keep Nexus I think you can actually use the same instance good so I want to launch my NEX server so you give me a second please yeah if you ahead you wait for me I so I want to make sure I have Keepers demo I don't know if I still have this in my so let me just create in jenin cicd so I can launch my Nexus Pamela you uh um Emma you following up yes so I I want um T2 medium and now let's use the jenken C kead I want this to be publicly available I want to use select an existing Security Group let's use the default Security Group I will check the default security groups um fire later so this is just a setup and I want to use the Nexus Nexus um install script so Mak install script from last week okay last week okay that's good it's in the in the in the now Ser this is Nexus server you please please read the in the thing there's a link in the in the RMI ah okay and now why Nexus is deploying let me just take a look at the security group which we using this is the default Security Group I want to see the rules inbound rules all traffic so it's good so the default Security Group looks good but in real life it w't be all traffic right it will be point in real life you would um compan is on no you would you would determine the pots which you need to open for example in the bre me I told you the poort that this different Services need Jenkin needs 8080 and other ports service every service needs has its default Port right we talked about SSH what's the default port for SSH 443 22 I mean 22 sorry exactly 2 yeah grand free server I want medium keep assign default and for Nexus this is Nexus this is son we use the [Music] sun install bra yes are we supposed to use the um user data from the Jenkins f is there user data in the Jenkins f um I don't think so that would be that would be in G I mean that would be in the local now Nexus is up and running what's the part of Nexus let's just ensure the Nexus is actually the P correctly so I can do that by accessing my Nexus on Port 881 881 so please good so next works as expected so now C is deployed my I can actually deploy my Tom card server all this is happening because your user script is functional I mean your user data data is functional actually so for the Tom cut um but for the Tom card I my use this usern data you just give me a second you would um for the Tom card I'm trying to launch the Tom card for those that are fing up please pay attention so we have um Aid and we're using uh default Security Group to ensure that we have the right parts open and for the Tom card installation I prepared a script for Tom card I don't see where the script I don't see it is in the um the repo look at me look at me uh look at my screen please so this is the repo which we shared yes which I shared and we say that in order to install Nexus and Sona please follow steps aligned here so here is another G up repository which we already use and in here you have setup steps for Nexus and you have setup steps for sonar Cube and this Nexus and sonar Cube has their install scripts here you see that install Nexus Dosh s those are the script which you're using what Tom I'm talking about Tom card so for Tom card is there there is a there is a script here that says Tom card sh so I want you to copy the script and uh we can talk a little bit about the script so basically I'm setting up the um Tom card version to use I'm setting up the Tom card URL so where to actually download Tom card and we are updating with upgade and installing WG and T if they don't exist and we were installing dependencies which is open jdk Java development kit and Fone config and we are downloading and instructing top card here we already saw all the steps right remember the last project so exactly the same thing I just put it in the our B script and I'm creating the Sim links now the issue is I still need to fix this um if you remember once we install Tom card we need to add users and roles in the Tom card server which we going to use for deployment and we also need because Tom card by default is listening on Local Host so we want to be able to use a different IP in order to access um um it on the browser so we need to make these changes so we can do that using um SED it's a Linux command however I tested it sometimes it works sometimes it work have this breaks so I need to fix that so but you can run the script that's commented out so can run the script in my St cut installation phase so this is next this is Prof we lost you a little bit you said the Tom cut listens on Port 80 is that what you said 8 8080 by default 8080 okay so there a tom cat installation so that creates Sim link and we have the Tom cut down and Tom Cat up stuffs right so that should give me the Tom card now difference pardon what do we do with the comments in the user data leave it like that it's commented out because some things break that's why I said I need to fix it what do you mean by the comments please maybe I did not understand your question no I meant um do we get rid of the comments or we just we just leave the user data as it is you can get rid of it because if it's commented then nothing happens right I leave it in this script because I need to fix something in it something breaks oh okay so if you look at the script I have a section here which I'm trying to not uh to update the Tom card users. XML file directly in the B script so sometimes the installation works and sometimes it it fails and I do not know understand why I need to figure that out and also to comment out a specific line inside my inside the file called manager meta do um context.xml we did this last time so this is commented out and we just going to SS into 7 and do this manually just so that our Tom card is ready for us right last time last time we did the we use the the same user dat user data you commented out before you do the installation no last one no user last one last was no for Tom card you had to type um um run all the commands man but manually but now I I I've I wrapped I think about 60 70% of the comments and we're just going to S into our Tom card to ensure that we have two things done then okay so now hopefully our Tom card is ready and let me see at least it should tell us that's deployed our Tom card what's the Tom card part 808080 so good so this tells me that Tom card has been deployed if you see it tells me that access is is denied and because I need to make changes in this file and uh also make changes in the Tom card users. XML right remember so that's what we need to do now so let's SSH into the Tom card file into the Tom card server am I too fast for those following CU we also need to dis out yeah yeah for first not following I'm I'm watching we follow later so I'll try to go a bit slow so I want to SSH into Tom Cat server now it's two and two checks passed so let's use instance connect and if I use instance connect then it opens it on a new browser for me and I could already see that the user data installed Tom card now I just just want to make the configuration changes can somebody tell me the file which I need to change um manager system context context XML service okay okay Tom tomat users. XML Tom card users. XML Tom the tocard user. XML file is found in op Tom card com so I am trying to C it into the comire it says I need to escalate my privileges I just did that so now I should be able to move into com and I can now see the Tomcat users. XML so I need to VI into this file slow down are you do presentation to your organization no the thing is they did this last time we did it last time and in the let us get all this ready before so um we did this last time and I said I want to Now update the Tom card users because in Tom card you create users and roles by adding them in the Tomcat users. XML file right yeah did you guys practice the last H demo yes if you did that then you should be familiar with this what I'm doing right now right yeah so in the com F there is a f here in the com uh P card opt Tom card com directory there is a file called Tomcat user. XML so this is what you used to add users and roles in Tom card okay so I want to get into this file so n the XML I can change it just that I'm I'm even there I'm to my to connect change it so I have my uh uh this and thise if you following up I would like us to follow to move um together all right so I'm not done with Tom card then you start telling me Oh I'm now with Tom card how do I go about it good so in the Tom card users there is a section says here that says Tom card users so in XML there's always the beginning and end so if you can see here it starts with Tom cut users and ends with Tom cut users and everything here this is how you you comment out lines with XML files so it's the less than bang and this is the beginning beginning of a comment and end of a comment and beginning of a comment end of a comment so all this in this file is actually commented out now we want to just add our users and we already have this somewhere right mhm give me a minute to look for it that should actually be in the r me for today oh yeah good so I want to add this and what is this this is how we adding the rules and this is how we adding users in Tom card so there's a user I'm calling the username admin the password admin there's another user I'm calling it deployer he has part password deployer and he using rules manager script so if you look at Tom card itself it's telling you how to do all the things here so read this when you face the 403 good we cannot my apologies but we cannot Deep dive into everything okay okay and I want [Music] to add that in my Tom card how do I remove this spin here hi no I I'm already insert mode but I don't like this it blocks my view this is why I don't like instance connect so I'm adding my roles in the user. XML file and a q w bang w q whatever W bang [Music] it's is fine without the B let's just make sure I have it sometimes the brain just freezes there too much going on in the brain sir good so that is um um updated and I also need to make changes in a file called sorry see opt opt Tom card web apps web Apps Manager manager meta yep and this is the file called context XML so if I cut this file context.xml if you remember it was telling us about this managers context.xml file that's the file and uh if I cut it it has this block here that says that it is listening on local holes so this is basically what I want to comment out so if I VI that then we can comment out that lock of code line what line is that I think V class name oh okay so how do I put um insert mode what is happening sorry sir can you explain what is that line of code doing again this is a line of code that basically tells Tom by default Tom cart is going to listen on its Local Host so it's going to listen on um 1 1230 1 127.0 do1 do you know the local host address so this is what tell Tom should listen all Local Host however we want to access Tom card from the browser and that browser is your local PC so it's not this Local Host it's not this machine you understand what I mean gotta so if if the browser which we we accessing was actually installed on this machine then we will not be doing this I'm doing this because I want to reach the browser from a different PC but now using the public IP of our Tom card 7 of our Tom card okay so show can you set it to all like 0.0.0 I actually did not try you can test that through your make your screen a little bigger I'm what are we doing with the valve give me a second yeah please something something just disappeared it's actually up it got too big maybe yeah got too big it got too big I think um little bit give me a second um bang no I do not want to save so that should be it that's fine I'm not sure what I did there so that's why I do not want to save okay so I have a question give me a second what is happening here bear with me with that that F structure I think it's because you're using um session session manager why is this behaving like this it's not it's not SSH I guess maybe that's why it is SSH give me a second okay sorry I'll close this this way and I want to oh that Tom cut server right yeah Tom cut server let me try that actually it should not be the problem it shouldn't be though actually you're right it's a screen screen thing give me a minute so I want to CD into opt Tom card um what was it again web apps web apps manager manager Meta Meta so CD opt opt let's just make sure we where we are we apps manager manager and I want the meta this is what I want just make sure our f is still the way it's supposed to be yes that looks good then I want to VI into this five and something looks good and I want to in set mode and I want to command this line out what the hell that's a very weird one what's that what happened here okay that's weird maybe should ssh in yeah that's what I want to try to do now and see what happens with my SSH works with SSH so SSH I need to bring in my I use a vs code the vs code is a little bit where is it where are you well use party so so give me a second so I want to SSH into this this will not work we need to move key CD downloads S Mode 400 what was the name of that [Music] Jenkins so now should be able to access it to my server and I'm moving to the directory again let just do sud Su and I move to actually maner web apps what I think you have to to um to use the tab you you're not going to see those context what the hell where is the rest of it there you go okay so I need to go to insert mode and I need that that's what I expected and I want to command this out and because we had the Tom card [Music] down and Tom Cat up Tom Cat started so our Tom card is started go back to the browser we should be able now to actually have the login page good that's what we wanted to do and we can test to ensure that the username we had the user they call deployer and password call what's the password deployer I think deployer deployer deployer deployer we supposed to on the no it's inside the context context XML no because the user data which I'm using is not working should work that's what I used because everything is uncommented and I do not uncom them I don't know why you're not supposed to uncomment anything in the us data user commented so this is the user data it installs ST card the only thing that this user data is not doing what is commented out is the configuration which you just fixed manually did yeah so but it should install and ensure you're using two filtering medium because Tom needs a memory okay check on that so now we have our instances how much time do I have okay have about two hours to go that should be fine yes um what do we do after we do the Tom card up is Tom cut up then you can just go back to browser and see if you can log in if your credentials or the users and rules which you added are working fine then you should be able to see a loging page that gives you um basic old username and password and you should be able to deploy and see this it means that this this works fine so Jenkins can actually lock in here once the P line is running uh Pro does a dick space matter it is fine but please when we go to Jenkins please switch that to 30 or 40 gab of di okay it is fine this is just a test case after that you can kill the server so now let's launch our Jenkin server and nice T1 um t2u T2 medium using the jenin C so 16 Security Group 50 gabes and um say user data for Jenkins I don't think okay you guys can prepare that right or I can also prepare Jenkins user data Jenkins is in my opinion pretty straightforward did you say we can prepare it no please prepare it son you can you can test your uh development of user data us [Music] data so user data is basically the same steps those steps which you using for installing the Jenkins you put them in just pass it yes right pass them inside so they should launch over Jenkins uh server then we need to get into the server and basically make the installation so still initialized in so it's running let's see if the instance connect I don't think it's is it up yet I thought so still initializing though uh for the do we go on the servers status once you have those configurations set up if you refresh that place it should show you a basic with pop uh login page Lo page yeah Power asking you for username and password okay yes bro um the other person of cre are you still having a problem with the Tom card I just cre another one and it's not starting let me just Che that you just what I'm still checking on it because it it's not it's not working let's take five minutes to fix your issues so that at least I have one are you following still initializing yeah yeah you go ahead so just keep just keep so I have my um Jenkins hopefully connects now why does it say Tom card that was the wrong instance thank you very much so Jenkins why are you taking forever yeah it has more more stuff doing it's B there's no user data there so it should so for the Jenkins installation a couple of steps there just run the steps we already did this so many times right so yes bro you guys are familiar with this Pamela Emma you guys are very quiet we together and they have disappeared everybody's offline follow sir following yeah so I want to install and in update and install Jenkins and Marvin so they should update and in Jenkins and Marvin Rob so while this is happening um in the cicd um architecture um are there any times when you would have um the say the Marvin server and the Jenkins server like multiple servers doing the same thing or uh it has to be one server doing the work Jenkins has what we call the control node and agents we talked about this when we started talking about jenin you remember yeah so you have a control node and that control node is where you have this UI where you're doing all this configuration then you can actually have a setup that once there is a job then the control node will spin up a a an agent an agent in this case is also a no a node but a node now will just run the job then once the job is done then the no the kills the it kills the node to also save cost we have that set up in one of my projects are we together Emma EV say yes event are you at work no I'm I'm at home okay just check in good thank you so we can verify that Marvin is actually there by running the Marvin command see good m is installed and let's um enable Jenkins sorry sir what was that command he just had clean something clear okay Marvin that's is okay Marvin help no okay okay I think was just a marving command yeah you know they did M minus something d f that's H okay pulling out error so let me help you with this error say just go back and we run the the same installation command when you get back everything will be Sol because you can stay here for long keep wait keep waiting for it to start you times you take longer time at times if you don't want this longer time just re the Comm back and will be okay yes yes from the sud this command here yes just reun it back you you will just come back with it trouble shooting [Music] 101 how many if you wait for a longer period of time it will start B to sa it Tak some time so so in your if if that is a case then when you're developing your B script for that what will you do who can tell me what you can do to ensure that it waits for that which command will you use in bash time or wait you can use weight or you can use slip right so you can tell it sleep for a while yeah sleep or wait H interesting okay I guess you can use sleep here and tell it to after 20 seconds tell it to start say you have not run all the command what did I not run say You're supposed to run fromo APO AP Java version sudo could run it back and and sud sudo star Jenkins yeah but this doesn't mean anything it's telling you that everything is done it's already there so it's not doing anything you Z upgrade zero installed zero remove not upgrader so that command is not doing anything there yes it just run it and then go issue is it just need to give it some time for it to actually just need to give you some time for actually to waiting for time wait for 15 minutes sudo system enable Jenkins sudo system City en Jenkins Jenkins what the give me a second see I'm another one those come out from the very beginning right to end I'm running I'm running it from the beginning wait I'm going right up to the end give me a second please that works that works you guys should have uh anyway you guys have done this already couple of times right like mine I just Now demo reload am I missing demon reload no I don't think so I don't think because just happened to me just happened to me right now I started by by from the very beginning right to the end en and it's working yeah it's gonna work now enable I want start it works it works [Music] now welcome to the wall catching up take some time I want to see my status stay come on status Jenkins good so Jenkins is finally live I think what you need to do is actually evaluate how long it takes between this I don't think the rerun is doing anything it needs some time for whatever to that happens in the background to happen that's true me just just help me to go go that over go over it faster you just help me to do more faster because the time I wait 15 minutes I had to run it again before it just went so I need to quick question sure um you know youing these um these servers and applications do you always sort of with um system D system D is is a good way right to always it's a better way of doing it right even with Tom cart this you can also configure it so that it uh systemd can manage it all right so what are you talking about systemd what's that it's um system management thing Linux administrators that's one of the startup startup um processes startup system processes but that's system C Now isn't it but not all services are managed by System C okay good so Jenkins is available so we can go to the Jenkins server and see that's fine good so let's access our Jenkins I hope do you guys want to break yeah so that us can get up to spe where you are that is a good place to pause and then we'll Circle back so just give me a second let's ensure that everything is actually working good so Jenkins is fine I don't know why I Ked that Ser so we need to get the password for Jenkins and it's called onl sudo and this is the password not install suggest the plugins so the different plugins are being installed can you hear me yes we hear you we see you too M say Mike Flor Dr T is gone Al I'm here I'm here he guys are work lad and clear so I'm just going to keep it admin admin for Simplicity nobody should take my my my Ur unlock into my junket [Laughter] okay what's the password I'm trying to get into it now yeah boy greatness is uh he's busy right now certifi Herer yeah but you're going to you're going to destroy it now after this right bro sure I'm going to destroy it so Leo you have an hour and now we have our jenin I get into that without give me any money save and finish start using Jenkins Jenkins is ready Jenkins is ready Tom Cat is ready um Nexus is ready is Nexus ready so Nexus we also need to go to the sign in it tells you that an admin user and password is located at this point so we need to also log into Nexus so next to server Em are you there offline see mute this is Nex to 7 that's the password so we go to admin so Prof uh quick question while you're doing this so in a in a real office scenario you walk into the office and they have already employed you as a as a devops um expert can they typically ask you to just create this these servers in the pipeline just give you a blank please create the end to endend pipeline for us and uh uh demo it will this is typically what we can do this these servers create them and and configure them like this yes typically what you can do and you can use even uh what it call anible to do some of those things right anible yes yes and but this is not a day's job right not certainly not that could be your assignment for whatever so I want three Sprint yes no it's fine it's fine so I want to call this admin will that work at admin one admin that worked okay that mean work so enable Anonymous access and finish Nexus is good fora some of you already have these things right so but for the sake of the video Let's have it so that those that do not have yes 9,000 answer yes yeah because I seriously it's because I'm not follow I'm not typing as he's doing this so it makes sense if I was uh trying to be very slow this old password was called admin new password is called JG but practice give me a second I type it somewhere then I copy and paste I need password called gch admin so gch in hopefully there's no space update so our next setup Jenkins is set up our SAA is set up and what again Jenkins next to Sona and Tom take a 10 minutes break somebody something that's a lot of work said once I'm done don't you me you me let set up your because I'm my don't now good if we're taking a break so do you want to pause the recording or you want yes I'm looking for actually looking for the so the setup process is complete and now let's move [Music] into the next phas which will still involve some um levels of configuration like configuring um credentials can you see my screen yes BR now are we back from break yes we are back from break okay but question someone is about to start the recording Mr ch yes I so um I on recording is in progress okay this is our sonak server this is our Nexus this is our Tom card so this is so um Jenkins I do not need all those things again so let me just clear my screen so this is jins this is Nexus d card and Son Cube good now if you look at the the repository which is sent to you please if you following along you will need to for the repository so that you can push to your repository and not mine and if you look at the reposit three there is Jenkins F which basically defines the pipeline and we're going to talk about this Jun fire and how you can U how is developed I did my best to put a lot of links inside so that you you can see that where everything is coming from it's not from space or from right so you can actually follow up good so I already have Theos my repos on my on my PC so for some of you that are following along you need to F the repository so that you can clone it make the changes that you need to make because a couple of changes need to be made let me bring my vs code I think it's better for so give me a second please so these are all the different repositories which we've been working on and we have the repository called Jenkins cicd this is the repo and uh in this Jenkin c i see the repository there's a Jenkins F and in this Jenkins fire we have everything configured so we talked about Jenkins and we said that this pipelines or the build jobs which you can go to the Jenkins UI and create a new item and do all stuff and uh put your pipeline script inside or configure all the Integrations manually all that can be done from the Jenkins fire right so we in here this is a simple pipeline which I took some time to develop for the purpose of today and in here I we need to make some changes for example um there's a Tom card it need the Tom card URL it need some artifact fire they should stay the same it needs the Marvin home because on the Jenkins build server we also if you also remember we did install Marvin there right so if you run this command Marvin the version it should tell you the home directory that M was installed and that home directory is important because um the binary needs to be picked in order to run the Marin command commands to Via the pipeline and we said in the pipeline you can then deploy um you can then configure different stages so in the stages I have a stage here that says I need to check out code basically I want to check out the code that is in my Branch so this branch is already there please replace the BL replace the branch URL with your branch URL this will not work if you do not make these changes as I'm talking to place that's why I'm talking about this so you need to change your Tom card URL you need to make changes for the branch URL and the build with so we're using the the Marvin which we installed in our build server and we are building it and we using the um D it is a directive from uh the note pop uh the plugin called give second let me just look for the plugin so we can also see what what this is about do I have got a so the uh D it is a uh directive with the node and processes pipeline plugin that basically helps you to change the current directory so any step that is in the D Block we use this directory as a current and relative part to be used for the relative to the base part what does that mean if you look at my I don't need you again if you need need need look at the J Pipeline and and the directory structure of our repository we have the um what is it you have your your J batch app then you inside before you have the P the S Source directory P the XML settings and all these things so we are telling with the this directive that please this is the directive that Marvin should use when is building or looking for files during the build process so it should uh move into the JJ Tech Bash app directory which is this directory and inside you can see all the N files which it needs so the test the main the p. XML and all the stuffs do we need to talk about all this I thought we already spoken about this a couple of times right any questions I just wanted to ask about the SRC you said that is where what is start so the SR SCE directory this is the directory where actually the source code is because if you remember we talked about Marvin and we said Marvin has what we call a project template right do you remember yeah so Marvin has what to call a project template so this is the direct let me let me show you what I mean by that so Pro see into Marvin and I see into Jenkins and I do a tree here and this is how the structure of a Marvin uh project should look like it needs to know the source it needs to uh if there's in test then it needs to have the test so this is actually where our source code is so this l. Java code so this is actually the space code and this is actually the test code so whatever source code that is written is stored in here main seet so this is our source code is basically it's a simple um server we WiFi that was going to display that we welcome to JJ Tech model badge develops complete CCD integration blah blah blah right and the test which is our integration test which is going to run is basically trying to ensure that whatever is being built is is expecting the same results so this is just a very simple way of demonstrating the integration test so that if this is the for example if this is the expected result of of our landing page then somebody makes code changes right and which we can test during the the pipeline and changes what we expecting as our landing page then the test will fail then the pipeline will fail right does it make sense test is this what type of test would this be a this a can call it integration or whatever this AIT test so it's a unit test okay it's a unit test good so let's go ahead and and obviously it's a Java project so that is the structure that the Java project expects we talked about this right is this the first time I'm I'm mentioning this no good so that's a structure it expects and it needs a p. XML file and this is the p. XML file that the project would use told we said that Java is based on pal right and in here putting all the dependencies that it needs in his J un need it needs Java seet because that's the framework that the application is actually based on so and all the stuff that uh is needed okay good most of this is good for you to know but most of this would be um you're not expected to know it more than the developers they building good they should they should produce this p. five X5 good and that said let's go back to our Jenkins F so it checks out the Jenkins checks out our source code from the from our repository it builds the some source code using the mavin plugin and this is the remember this this uh build life cycle Marin clean compile test package all this remember we talked about this hello yes sir good so we're doing a marveling clean comply package here and this is now a pluging that integrates with sonar Cube so in this stage we're going to scan our code so it pushes whatever we have in this directory to sonar Cube so that sonar Cube can do the scanning so I also ensure that I can put the links here so you see where I'm getting all this information from so so this is how you integrate that withar Cube so there a very simple SN snippet here so you can use and this is where we pushing it and so now is doing a scanning and we also waiting for the quality gate so what is a quality gate quality gate like I said it's a policy that ensures uh that organizations can set up to ensure um how do you call it standards so that whatever code that they um whatever code that they building actually meets some specific standards okay compan so exactly some compliances so now pro quality profiles quality gate to all those things so so a gate enforces quality policy in your organization by answer one question so basically is the project ready for for for release what does this mean this means that if the quality gate passes that means we are ensure that whatever we are building is ready to go to deployment right if you're using son in your envirment please you can dip dive into it and look at all I am I am good so let's go back to Jenkins fire and uh you can also see the quality this is where our server so this is what we this are the quality GI that we are talking about and this are quality profile these are all some rules and we look at that there right so this are all in the in the Sona Sona server good so is this what we're going to deploy sir or so this is the pipeline let's talk about the pipeline then we the pipeline basically is going to build whatever code that the Jenkins code that the Java code that is in the source directory right so there the Pol po uh poity gate so the polity this quality gate now needs to talk back to uh if it passes then it sends um information back to Jenkins that everything is fine then it can move forward and we are seeing that it it times out so Jenkins is going to wait for a response from this from sonar Cube for 2 minutes you can decide to put it in hours or whatever depending on your code so if he waits for two minutes and it doesn't get a success of fail report then it it abots the pipeline all right and if gets a pass then Jenkins moves to the next stage which means it it's publishing it's publishing publishing that artifact to NE to so Nexus exactly so here I'm using the build in maravin capability to distribute artifacts to Nexus and you can also use the plugging because you remember we said the plugins to do all these things and the pluggins they also have the links that you can you can see to um see how I developed all this this information here and after that is done then last stage is we want to deploy it to our Tom card server so we deploying it to Tom card and we're going to use a plugin called deploy to Containers if you remember the last demo we did once you install those plugins then they should give you theability to deploy adapters and we are using Tom card 9 and we need to set up the credentials for Tom card creds and um basically it once that's done then the post deployment stage is tell us if it was successful or it failed but that's B any a question where is everybody Prof ah we here it's the thing it's ENT people think is entry Victor here Emma when you guys go dark like that I don't know what to do you need to pray for us need to really pray for us so um this is a simple pipeline you can look at it I would encourage you to start with it and go through the Jenkins documentation and you see how this is all there's no there's no magic magic there's no magic you use that word definitely all right so just put some if you're using Jenkins in your environment have an high level overview please what I encourage you is that's why I spend some time to actually uh put the links here if you can spend two three four five hours or two or three days to understand this setup then you can confident confidently tell somebody in an interview that you buil a complete cic Pipeline with Jenkins that could pick up the code from J from from GitHub run some test deploy the Cod send artifa to Nexus and deploy it to servers this is basically what we doing here and we we can start adding more flesh to the skeletons as we go ahead please Prof I have a what what asking is JS do today today um I I have it before I that one I have in of today one today for today you can do that can one I have before yes yes I have I have a you can do that please ah but what I want to help me I want to for th I had before I what I I didn't before I have a problem with it can can we if you have a problem with your Tom card let's go through let's go to the end of the demo then I can solve your problem okay okay good so there are some placeholders in the file you can see that I'm having a URL for my Nexus here and this is mine you need to replace this with your own NEX server we need to create credentials so these are credentials which you're going to create in Jenkins and you need to replace this if you want to use the same credential name that's fine if not then you have to replace that same with the th cut credentials remember that Jenkins needs to know how to deploy to Tom card so he needs credentials to be able to talk to Tom card so we need to create those credentials and um yes that's basically it if you look at the build no the publish with build in the publish Nexus with the build-in Marin capability we are using the Marvin deploy uh uh goal and if you remember from our last class we started talking about the sex settings.xml and the settings xmi is where you configure all that's conf do the configuration for Marvin able to uh uh talk to to Nexus right so this d s basically tells uh Marvin which where the settings F where to get the settings F in order to make the deployment and connections to um to Nexus are we together yes Prof um quick question um for the um where is the credentials ID again where is what the credentials ID for Nexus within the pipeline which of them because for the Nexus there are two of them so you can see that this this stage is the builtin distrib the distribution capability and it's using the settings file if you remember this is where you're putting the that credential but if you're using the plock in then this is where we're putting the credential it means we will create it in Jenkins we'll do that as go so in this first step which is using the settings file then you need to come to the settings file and update this username and password with your credentials I think mine is called this and I used something else I don't remember was it jch yeah JJ admin you mean what you use tonight yeah yes J Tech admin I think yes that was the password and we need to make those changes so the St together now I need the URL for you also need to make the changes for um Prof next to snapshot so you need to also update this password this um URL for your Nexus so this is Nexus so I need to add get my Nexus server Nexus Nexus Nexus this is Nexus so it's a 100 that so go back to my file and I can make an update here what if I don't give me a second please better not get this wrong that looks good so Pro why were you looking for while you're looking at that uh um Nexus snapshots and Nexus release uh that's a little confusing to me now so there's a snapshot and there's a release repository so they are different basically repositories so you can have snapshots that the development environment when they have the artifacts they can keep their snapshots there right and the release is now that okay I have my code with tested we've done everything and we're now it's ready for release though we keep it in the release repository so from there we can be picking up and deleting so we can keep all artifacts different projects keeping the artifacts there right so now we are using the open source or the free version of Nexus there's a Enterprise version that comes with much more functionality okay you got to pay to use that um for the I presume for the the snapshots we can only we can have multiple versions but for the release it's only one H what like um the the snapshots I heard we can have multiple versions of the snapshot yeah you you can have multiple versions even for the release right each time you're running your pipeline because even in the Jenkins pipeline you can configure um a tag and say that okay let the tag for every release be the build number of the PIP line so it changes it we'll see that way we'll go that because once you have a release of let's say 1.1 1.0 if you R running the pipeline again that's deploying another release then if that is already there then release is going to tell you that there is a problem let's let's just go ahead want run the pipeline you see what I'm trying to say good please if there's a question please do not hesitate to ask maybe your questions will help me to Deep dive into one or two topics are we good yes sir can go a little bit the set we're good sir we are what do you want XM uh let me see what you guys change because I've made the changes on line L 41 and line 56 and line 13 and 14 if you're using different names 14 oh good so if that's if that's our update I think I should update that in the r mey or update Ry send that to you um that's for the settings and now let's look at the Jenkins file we also need to make some changes in the Jenkins file the Tom card URL where is my Tom card server so it's uh 54 good and my Branch still stays the same we need to create credentials so let's go to our Jenkins and make sure we can create these CRS are we together line line yes let's let's first of all forget about the Jenkins file we update it once we have all this credentials so if you go back to the where is my okay if you go back to the read me f we need to configure Jenkins by creating some of the credentials right so let's create credentials we already did that we need to install plugin so we need to install the sonak plugin the ne and the deploy to container plugin so let's go to Jenkins let's finish with Jenkins so in order to install plugins where do I go manage Jenkins management manage Jenkins I go to manage Jenkins and I look for plugins and I want to install uh plugins so I go to available plugins I need the Nexus artifact uploader can you see that yes good I need um deploy to container that's another pluging deploy to container that's another pluging and I need need soona soona soon keep son keeps con so I need so I keep scanning the three plugins so let's have this three plugins and we can install them so once that's installed it's all successful you can go back to main page we have that and we go back to uh manage Jenkins and let's create some credentials in order to create credentials we need to be able to create a credential for Jenkins to reach sonar Cube so for that you need to generate a token in sonar Cube remember we talked about about this um give me a second where is my son Cube yeah good no that's not it [Music] n good so oh that's a generated token we can just come here to our son and you go to um Administration security come to users are we together yes BR yes you go to Administration security is users so there's already a user the DU user which we have here it's called admin so I want to generate a token for this user so you come on the tokens Can you see here yeah yeah yeah so tokens then you give the token a name if you want so I can call it test token no I call it Jenkins Jenkins token Jenkins let me call it Jenkins then you can expires in 30 days that's fine for me you can generate a token this is the token I want you can copy the token and this is the credential that Jenkin is going to use to be able to contact on Cube so I go back to Jenkins and go to credentials and I want to create a global credential so I want to add credential so the scope is global global means every every other pipeline or some any other thing can use it and I won't type kind username uh with password that's not what I want I want this type called secret text are we together yes sir so it is a token so it's not a username it's not username and password so I want a a type a kind of secret text so if you come to this kind you can see it username password GitHub application SSH key secret file secret text certificates and stuff like that so I want a secret text and I can input the text in my clipboard then I give it a name so I call this there suggestion in R me let's see okay I need to add that sorry about that so I can call it Sona Jenkins whatever so give it a name so I want to call it Jenkins soona and um I can see Jenkins credentials or Sona credentials son for Jenkins connectivity MH please if you lost somewh you stop me because I'm very sure officially we're not coming back to this again so this so I can create the credentials credentials so now I have a credentials called Jenkins soona and this is the credential that Jenkins is going to use to able to Dr sonak now I want to also uh create a Tom card remember that we uh this credential that Jenkins needs to be able to talk to Tom card right so we we said in the read me we need to create credentials for Tom card credentials Nexus credentials okay so we also need to be able to talk to Nexus so Tom card credentials the suggested name is Tom card so let me just take that my clipboard I can go back to Jenkins I want to add another credential the scope is global that's fine and for Trum card is your username and password or is a secret text username username with password exactly so what's the username the username called [Music] lawyer and the password called deployer so I can test treat uh username like that's fine with me so can check that box and I want to call it um Tom card credits Tom card so basically Tom card credentials so Jenkins is going to use this username and password which was put in here to connect to Tom card well a password [Music] deployer remember when put had so many users and password when we changing when we changing from the very beginning no it was deplo forgot when we doing editing on the card we're doing that about the users we had about users pass this is where this thing is coming from the user called deployer there's a password called deployer the user is having a role called manage management manager script something like that and this Ro manager script is being created somewhere here Ro manager script question sir good yes so at this time we are integrating all these other tools stor and Son Cube into Jenkins yes so Jenkins is the automation server that's why we there when you talk about Jenkins they say the automation engine it's the guy that is going to orchestrate everything take this talk to sonak wait for sonak to give give it the respond if the respond is good talks now to Nexus and Stu like that that so that's why you say Jenkins is the cicd automation server or the orchestration server right so it's just like um the police at at traffic Junction you need to stop this guy when this guy is fine you move there just like that you're just communicating and putting Connecting People connecting the different tools together so Jenkins is a person doing that and for all this Jing is knowing is um cicv for process I did not hear your question I mean for everything you just explained that the process complete is called the cic cic exactly continuous integration continuous continuous integration and contined delivery right so um let's say we want to onboard some other team members right your team members are um can we take questions when we done it's not if it's not concerning if you're not Fe if you're not blocked by what we're doing right now please just put your questions put it in the in the chat so you don't forget and once we done we can answer that okay sure good so that uh those that are watching can have a clean follow uh step by step now where was I Tom cut credits so we also need to be uh Jenkins also need to be able to talk to Nexus so we need Nexus credential so to go back to credential and Nexus cred is it username password or secret secret Fern password pardon username and password good username and password and what's the username I think for me it was admin and and I think it was called JJ I think I put that somewhere right take ad hopefully this is right please make sure you use the right one even if I don't Zoom that should be an ID I want to call this um Nexus Jenkin Nexus [Music] forcation to Nexus say the same password I used to log to my Nexus that same I'm supposed to put here right mhm yes good zoom great so I have my credentials Jenkins Tom card credentials I should have called it Jenkins d card and Jenkins Nexus so we have this two three credentials so you can see where these credentials are being used in the file let's just take pick our Jenkins file if you go to um these plugins we need to configure the plugins okay so we have to configure plugins so go to give me a second dashboard manage Jenkins and system so when you go to system in here you can see configuration home directory um Jenkins location to where Jenkins been you can access Jenkins this one for Matrix and this one for sonar Cube servers do you see that yeah M good so in the sonak servers I want you to check the environment variables so if checked shop will be able to inject sonar Cube server configuration as an environment variable I will tell you what that means just can you go up a little bit yes so you go to manage Jenkins let's do that again go to manage Jenkins doing I we want want to configure the the plugin so that Jenkins can actually use it oh so we just created credentials right to to but now we need to actually configure those plugins so that Jenkins can actually use it to then talk to those uh different endpoints right are we together yeah so if I go to system configuration I scroll down to where you see son CU service and I want you to check the environment variables I'll tell you what this means very soon so for environment variables add Sun Cube so you want to add a son Cube so I want to give this a name what name should we give we can call it jenin right yes jenin cube right and server so this is the server where where is your sonar Cube so our sonar cube is this is the port I want so this is so now keep seven server authentication so now we need to use the crits that we created Created mhm right yes bro and that's it and that's that for son say cool sorry I after you put in the after you put in that you do create okay okay so now you can apply and you save right so this credential we said jenin should use it as environment variable if you look at the name we call it Jen Sona if you go back to the pipeline where Jenkins is trying to talk to son Cube using the prop the the plugin it's looking for a credential so there's a place here called credentials ID can you see that yeah yeah so this you need to replace with the name of your credential it so we called it Jenkin Sona so that will be the credential there or what line um line 80 80 so oh so so we change it to NEX give me a second this is Nexus what did I do [Music] here Jenkin that's supposed to be son yes that's supposed to be son not Jen sorry thank you very much so let's go to Sun Cube where is Sun Cube is Victor with us or he left I'm still we just cre how can be able to see it okay this is it um installation so the name of of that is uh the name of this integration is Jenkin Sona so it's called here Jenkins okay I have the same name here so you need to replace that line 82 yeah so let me add the configuration yeah give me a second replace with Sona Cube not cor so in this Jenkin so now we are using the credential then you need to replace this with this uh what do you have here are we together oh we together I already if I already save that how how can I get it what do you mean by save like what on your console if already click on save like present now how can you get it get what we just created no just go back to manage Jenkins system see scroll down you see it here if you don't want it you can delete it there's an xere you delete it create a new one if if you have a problem will you change the things things here you apply and save again did I answer your question yes yes I I was kind of afraid maybe I name mine separately from your so let me go there was little bit of confusion between the plugin and the credential where you want to explain so we have a plugin which we installed called the sonar Cube scanner right right yes so Jenkins need to be able to use that plugin to talk to sonak in the plugin in order to make that that configuration into that connection to the sonar Cube it needs credentials so we created the credentials and we are using the credentials when we are configuring the pluging here okay does it make sense yes bro and now this is how you use this plugin in your pipeline file because because we said that if if checked then the P will able to uh inject this as an environment variable in the bill you're going to see that when once we doing the building the bill so you need to check that save apply and in here say with sonar Cube environment installation name so this is installation name is the name which you configured that plugin with right so we call a Jenkins H are we together yes sir yeah yep and for the Nexus blocking this is this to talked about that and publish to Nexus using Jenkins plugging but this is fine this is coming from there this is HP you need to replace this with your Nexus line what is it line 7 to6 please don't just follow up don't just do what I'm doing so that we have success do you understand why we are doing what we doing right yes bro good so this is the Nexus URL so your Nexus server so my Nexus server where is Nexus here is 100 something so new URL I need to replace that oh Prof yes so where it says repository um can we use the snapshot instead of the I guess this will either be the snapshot the you can use it you can use a snapshot why I'm using the maravin releases here because the build in I'm using the snapshot okay with the build in which it's using the P do uh XML file and this other files we're using the snapshot okay and we also have to make those changes here I've actually forgot thank you very much so if you look at the pom.xml file you also have the uh uh Nexus configuration here right so update repository with Nexus config so we need to also put our Nexus configuration here make sense please tell me if you're confused little bit okay so so if you look at the pom.xml file there is also a Nexus configuration there at the bottom so go to line 93 and line 98 and update that because it's looking at Nexus a Nexus configuration so to deploy to Nexus it needs to be able to talk to that Nexus server right and it's using this so please so you go there good are we together yes sir when you go there what you do watch my screen yeah I'm watching 93 you update because look at it snapshot repository it's talking to Nexus so if you look at here there's an IP address here an 8081 which is not yours oh yeah have change it update that to your get it now thank you 982 98 and 9 93 and 98 yeah so that's said yes can you please clarify the the building and the the plugin yes I'm saying that if you did you do the demo last class yeah I did the demo last class if you remember in the demo last class we were able to still deploy our artifact to Nexus but we did not use Jenkins right yes that is the buildin capability that Marvin comes with oh okay so actually I put both here because I have actually seen some projects uh different projects using both some of them are using the buil in some of them are actually using uh how is it called the plugin pluging okay okay and I think one of the projects that is using the build is actually not because they are not using Jenkins they're not using Jenkins app so they're using the build in to actually be able to deploy to the the artifact the artifactory so can you use um let's say the yeahnot and the releas yes you can use to do to do both right my goal here is just to show you how to use both right okay there's no way I can we can cover that encyclopedia in in two classes or four classes great Nexus credentials ID Nexus credentials ID we have credentials here right yeah [Music] so Nexus credentials it's called Jenkins Nexus so this is what is called Jenkins Nexus so this is what we have to H here Jenkins ni are we together line 88 line 80 8 L 80 you know and can somebody tell me the problem with line 93 it's 92 if uh so if if you're not using Tom you have to update this right that's just basically what I'm trying to say all right hello we created a credential for Jenkins to be able to talk to Tom card and we call it Tom card credit if yours is not Tom card credit please replace it here that's why I have this information here replace credentials okay so this is the deploy to Tom cut server and I said it's using the plugin called deploy to container and how did I get this stage I also have the URL here for you for your consumption or for your understanding whatever it's not so you understand so if you see it this is the deploy W to a container so what type of um containers in this case a call container is just compl word but you can see can use tom cat so you can deploy to Tom cut 4 Tom cut 5 JBoss um glass fish and all the stuff so we are using Tom card 9 right now right our Tom card which we installed was Tom card version 9 so what are the steps it's have a string the URL if you look at our code code so this is the URL you need to pass in the URL credentials ID to the credentials that it needs to use and and uh basically yeah okay so you can see that's where I'm getting all the information so adapter is an array of list of nested choice of objects so this nested choice of objects so please there's a reason why I put this links in there if you do not get it please try to look at the links read it a little bit you need more clarity sure pick me at anytime are we together yeah good s have Tom card URL are we supposed to take it out or just allow it pardon okay the Tom card okay okay yeah yeah to know where to deploy to right if you look at this the deploy it it needs a needs a URL so the base URL to able to talk to Tom card okay good now if you remember when we talked about quality gate we said this quality gate is where at sonar Cube um has a web hook that communicates with Jenkins that um a build past all the quality gate so the conditions which you put in your quality gate and to ensure that all the build the build passed it so for that we need to create a web hook to ensure that Sobe can make calls to Jenkins are we together yes sir good so I also have a link here for you guys to see how the quality gr how that is integrated so you can go to that link and you can see how the Jenkins extension for son Cube and prequisite configure a web hook in your son Cube server pointing to your Jenkins instance for/ Cube web H how do you configure how do you configure or create a the the web hook you can just go to Cube S so if you go to son Cube you go to Administration right come to configuration here you have what we call Web hooks my are you still following up yes bro so if you just come to web hooks simple as that what are web hooks so web hooks are used to notify external Services when a project analysis is done so a post request is sent to the external Ser service with the payload so that uh the external service will know one once that analysis is done and also if it's successful or if it was a problem right so you can create the web hook let's just give the web hook name I can call a test now I need the Jenkins URL so I call it test that's web hook no let me call it Jenkins web hook and I need the URL so in this web H please you need to put in Jenkins URL here so your Jenkins URL not mine the URL of your Jenkin server so this is the URL of your Jenkin so mine is 98 this and where is it and what what did it say for slash son Cube web hook so the plugin once you you install this plugin it creates this web in Jen right just watch this video two or three times do this two or three times and actually understand what we doing good so now we don't need a secret that's fine and I can create my web hook and that's good now that this now that this is done if you've made all the changes with the gear and everything I can push this this is all fine the last stage is actually to create the pipeline so you can see say create a Jenkins job so let's go to now to our Jenkins and actually create a job can somebody tell me how to create a job item new it new item I can call it complete cicd cicd complete cicd and I'm using a pipeline and just okay now let's configure that job this all good so for bu triggers I want to use pm and what's the schedule I want to use um every two minutes so I can use every two minutes and uh in know post com hooks that's fine quiet build trigger Bill and pipeline so in we pipeline script it means you paste the script here but I want my pipeline from sem so it goes to Pand script from sem so what type of sem it's a git so I need the git repository so you need to go back to the repository and get your G repos I'm sorry that this is a little bit long but there no way I can so I need to get repository and uh this is my K repo credentials is public so that's fine branches to build it's Main script path so the path where the Jenkins fire is so if this fire is called some other thing rather than Jenkins fire then you need to put that fire in here then we can save see the main is the is the path is it's going to trigger after two minutes right trigger in two minutes so this this this would this would definitely fa so but let's just see what will happen do you question say um where did you get the part which you included Your repo give me a second let me push my changes I'm not pushing yet yeah I have status St get commit M um I want to update form XML settings XM and Jenkins F good keep push so now I should be able to see my changes here where are they now it's right there good so let's see what is happening with Jenkins now no I need it [Music] to pull [Music] so my field two minutes as well or what yeah why did you okay now now m in the quiet period expires in 1.8 seconds so it has pulled and let's see what is actually happening is er fing remote repo origin so which cred using is me are we talking about so I want to see if I got success download that works so this is the console you need to go through it right published so now this is the stage published to Nexus uses Jen problem skip due to earlier failures damn where is the earlier failure is it building from so question is it building from the the first one before you push so it it runs the pipe Jenkins pipeline it runs run okay okay so I'm guessing it's going to run again in 2 minutes or is it P if it the text changes then it runs okay um give me a second please I have a failure here I need to find out run fure zero skip one so here everything is fine okay downloading good downloading good so downloading downloading there's those watching if you spot the failure where the failure begins you told me right there downloading where uh right there say build fill this is ail somewhere uploading Nexus progress of leading to Nexus deployment fil to execute goal right there so fill to execute goal on Project deploy artifacts could not transfer artifact next is this 401 unauthorized there be the credentials so it's a credential problem now did I make mix up my credentials give me a second sign in it's called admin and I called it Tech admin right JJ Tech admin sign in okay I admin the password is admin no are you sure admin yes is actually admin so I need to fix this so it's admin admin actually so admin admin sorry for the mixtop okay then we need to go and change it in the um so we need to go and change it in I need to go and change it in uh Jenkins too yeah so dashboard manage [Music] credentials uh [Music] Nexus One just click on the system on the global click on the global yeah so what is it Jenkins Nexus jenin NEX name admin password password admin right ad me safe now you have to push your changes no I have to push my changes so to do a get commit so pipeline let's go back to the pipeline full ACM work so just in order not to waste time I can trigger it majorly connected my road to let's see what's happening again okay both success [Music] [Music] now that's the Marvin one right what it looks like now that's the Marvin build success mov fine so uploading to start so I releases to transer to fa to deploy a transfer artifa Marvin to Marvin releases so what is the problem let's look at the M releases Marin releases Jenkins Nexus is Jenkin Nexus right so where is it let's look M okay and the was created right artifact is created let's let's see the snapshots the first SN shot is there so did not could not get to Marvin releases so the ACTA could not is not dumped in yet yeah this is the problem you canot connect to those Marvin releases question is why give me a second so I want to but I did update this right dation to mark this NEX ad me give me a second I want to use um add credential let me just do this again then with password admin admin next SC next SC it's called next scits and it's Global ID NEX I don't seem to know my is complaining and we can confirm that the the the URL was changed to correct n URL good question I could actually look at yeah this Ur looks good looks good artifa path looks good rele go HTP this is the problem I was not supposed to put it again that was the problem did you spot the problem yeah mhm ah yeah two the protocol was there already protocol was already but I guess it should still work with this new credentials so pm so I to how many people are still in the call is this interesting it's long live so this is the new I don't know if this is the new build after but you didn't check in your code did so just let's build now so we can have the foot bu somebody succeed before me no not that I succeed before you I did not change of my IP I not change one of my IP so let's see what is happening [Music] here good so the problem was there was double protocol call them and now we should be able to see um browse Marin releases you should now see your WiFi here that's the version this is our Tom cut server and the Tom cut server where did it say the application is available let's go to R me it is available at Tomcat server gener back welcome so this is the part where this is available at is determined by the de the developers they are the ones tell you that this is where our application is available what the title so it's available at this path I need to fix that read me so just path and good so now we have the end to end are we together does it make sense it doesn't make sense it doesn't make sense not done mind so give me a second give me a second let's look at our Nexus now because we also connected Nexus right so if we go to projects we should be able to see that it has connected to Nexus and this is what the developers will be looking right code analysis are there box in the code are there vulnerabilities in the code what are the hotpots are there some code smells what percentage of code was covered are there duplications of lines how many lines of code did you cover and stuff like that so this is the quality gate so remember when we talked about quality gate so this is the quality gate and gave pass if you go back to the console there was a stage called um was a stage in the Jenkins file there was a stage called quality gate so if you come and we look for the quality gate stage where is that stage call scan after the scan stage then we should have the quality gate right stage called quality gate good so you see this is a time so time out set to expire in 2 minutes and it's waiting for status so Jenkins is checking status of sonak tax so this is when it's running those quality Gates so if you go to sonak clear quality gate what whatever conditions you have there so it's running that qu gate and is waiting for that status Jenkins is here waiting for that status and the status is still pending if it SE success then it means the quality gate is okay then it proceeds if in Sonu the quality gate here which we see pass was filled then it tells Jenkins in that stage again here that the status is failure then the pipeline fails at this point so you would evaluate the pipeline and say the pipeline is failing why is it failing if you come here and you see that it's because your quality gate is failing then at this juncture you call back at developers and say please go fix that thing together yes please if you lost you tell me I have another four hours we can go do you want to see my bro my G is not connecting to Jenkins say do you want to first of all we will get to debing I want to understand I want to be sure that you understand what we doing then we can start I can understand Victor gone Victor is gone no he's there still here Mr Victor was just observing he's there so now okay Pro now that now that we've SE the whole process I was going to say if you can just maybe recap yes I'll do that so now what actually happens is we have the whole process set up if the developers make changes in their code you as a develop engineer you've already set up this this thing right and is watching that pipeline so now the developers let's assume that the developers now go and they make changes in their code let's make a change in the code so our code our source code is actually here so Source main where is Java that's the source code and it needs to run a unit test and the unit test is expecting something like that so let's make a change in both the test and the seet code right so let me just add some new information here I'll see after debug after debuging so because the unit testing is expecting to see the same result I just have to ensure I I I take that to um unit test let's leave it like that so that you see what happens when the unit test fails right so now I've made some changes in the source code and I want to get at I want to get commit which is update add feature update is better what up landing page and get push now I've changed the source code and the unit testing or integration test or whatever is going to fail now because the test which was written by the dev team says that the landing page should be expecting a certain uh should have a certain um right and because what we've updated in our landing page is not what the test is expecting then it's going to fail let's see what will happen let's go back to Jenkins and give it some time so that we see what will happen Emma SE Victor Michael it looks like we have just four or five of us here abdalah where are you watching good right here so now so you can see good you can see that it ped this is the the fit bill so it started by source code management change and there is a problem because it's already filled why did it fail we can go scroll down to where we see the failure so all the steps failed because it did not even get to this stage why did it get not get to this stage so there's a failure here build failure test you can see run it run one test it's a failure so it skips everything you see let's look at the arror it says that seet test expecting where come to this this this because this is the test that this is the test that integration test right so this is what the test is expecting but it got something else are you seeing yeah so this is some sort this is how you they run they do the integration test they do the um unit testing so the test is expecting a result so if a new colleague a junior colleague comes and plays without code and changes something and the test fails the whole build fails so in this case if they say oh the pipeline is failing because most times when they do this and they push it and the pipeline fails the developers are watching the pipeline but they are going to come to you the dev you that configure the pipeline say please that peline is feeling please and check it there's something wrong with your pipeline then immediately you come back to the pipeline and you're looking at it and you want to understand why it fails it tells you clearly here that it's failing because the unit test has failed you tell the mind that please go back and fix that thing this is the reality there always a ping pong okay good so like you said it's expecting something and he got something else so now let's fix it so what is he expecting that's what he expecting so we can either update what it got let's do this do it this way so it got this so let's just go back to the test and update what the test is expecting after some deug that is now what it's going to be expecting please does this make sense yeah so now we' updated it let's just do a build now so it pulls that thing immediately let's see if it fails again so now I I started it let's see the console did already pass the test P you see test test run one failure zero errors skip zero so now the test passed so you should be able to do everything and deploy to Tom cut s now it failed why did it fail let's go back and see why it failed I have a hinge know why it failed if you look at the error it's going to tell you it cannot have the releases so see so this release cannot be updated that's why I have to have different different release versions so there are different ways of you can iterate that okay different ways of doing it so just need to change the version of my release if I go to this and version 1.1 so this is the problem because there's already a a a release called 1.0 so the new bill can cannot still be 1.0 we will need to remove it either you remove it or you you keep you keep having these different versions the best practice is to always have at least three to four versions so you can roll back so this should be fine let's do that again so I'll say fix release version fix release version somebody asked me this question right if I remember correctly so now our bill should be fine hopefully where's the bu Now button now let take a look is waiting for has gotten its success Resort so good so that means our new version of application is ready and it has deployed are we expecting a change here yes there so now this is a new change does it make sense mhm yeah good that's it for today if any questions then we can talk about the questions do I stop the recording or we take questions and debugging in the recording yeah before before you stop the recording maybe just summarize what went on good so um basically what we've done today is we've been able to integrate um different devops tools um which are very important in the sdlc life cycle for building testing um at a um storing and deploying um software or applications to the end users so for building we using Marvin for the automation or orchestration engine in the whole cic setup we using Jenkins and Jenkins is building Jenkins is also making a call to sunbe to analyze the code for COD smells box vulnerabilities and what and Jenkins is also pushing that pushing our artifacts to to next to Nexus once the build is successful and the quality gate from Nexus passes then we have an artifact and that artifact is pushed to our Tom Cat server so that's and and end server here as Tom card now Jenkins is using different plugins to to be able to achieve this it's using son Cube plogging It's using um Nexus plugging it's also using um the T pluging can somebody tell remind me deoy to container deoy container deploy to container plugging so all these plugins are being integrated with Jenkins so that Jenkins is able to orchestrate the different build faces in the whole cicd pipeline does it make sense yes that's the end to end that's the end to end now this is this is a simple end to end you have very complex end to ends so but the the goal here is for you to get the gist about the whole setup what it means so when somebody when you go somewhere they're talking about cicd and pipelines and stuff like that and build and triggers and and testing and sonar Cube and Nexus and all the stuff you know what they're talking about mhm please I've given you the skeleton you need to take some time go through this put on flesh in some environments you as a developed engineer you don't work on this code like that you just pick it up from the Ripple when it's been pushed exactly in some environment and then you execute I mean you deploy it yes some environment um for example if if we have a customer which is very we don't have a very good relationship and we very they very tight on budget from the contract it's very clear it's very very clear even your your repositories and stuff like that I just see it when I'm doing the configuration I will never clone it I will never fix anything there and stuff like that so just to add to your point in some environments you like the devops engineer you don't do it however in another environments depending on where you find yourself you might be responsible for doing that especially when you join um small teams right that they expecting you to do almost everything so it's possible that you find yourself doing it if you do find yourself my advice to you if you find yourself in environment and they using a tool which you've not used a tool please spend some time to Lear that tool everything is there it's just time for you to read the documentation okay yes sir I from from now in my from now to April I'll be working on a project that doesn't concern Cloud at doesn't concern AWS at all and I don't know know anything about it I have time I've told them I only have to go go to go start learning it so what I'm saying is there areund and the tools keep coming out every day there's no way for somebody to know everything understand the ones that are very popular and when you face your face a situation where they're using a tool which you've not um used before for the fact that you know the equivalent and you've used the equivalent be confident enough to tell them oh I've not used that but I need some time to learn it simple as that okay yeah like I can use everything yeah my environment they using moros for their cicd pipelines what is that from not kill me give me give me the spelling o r p h p h e us moros don't forget my question on the chat okay m o r y p e pH okay e Google is not why God green people into this so I'm going to see if I can um anyway maybe sometimes it's cost right put on the there two is hard more okay yeah but my my my goal there is to come and improve their their um processes so I'm going to look at the different tools they have and see if I can recommend ones that I know one you know what [Music] isend they say if from what I read here then some big big players are already using it yeah yeah Maus is actually good a popular a Greek whatever name gave because they they using um it's multicloud so and they they run hybrid too powerful self-service engine God some one hour to actually it I've never heard of it this is my first time i' been digging to left and [Music] right developer recuit to this one at all good then I can stop the recording uh Emma can you help yes it's