good so last week we looked at Jenkins and we said Jenkins is an automator it automation server which you can use to build your projects so it acts it can act as your CI continuous integration tool and also your continuous delivery or continuous deployment tool that deploys whatever artifact that has been built to your deployment staging or uh test environment so Jenkins is the central orchestrator of the whole cic flow you can have other tools that integrate with Jenkins such as um um ago CD for example if you want to use ago CD to deploy um microservices you can also integrate Jenkins with anible separate anible ser and Jen is going to do the build and anible will pick those artifacts and deploy them you can also integrate Jenkins with um test tools so that after jenin compile your s source code it triggers these test tools to run automated test onour SCH to ensure that um you have all the required functionality of your code is as expected so in the next few classes there couple there's a flow or what I intend us to achieve is we would having a scenario where you have using it's wrong my ink today um Prof so if you push what would you call artifacts because you mentioned that yes artifacts um bills like the B okay if you have code like a Java code or Pyon code which you that's the language in which you're building the code but that is not a bin that's not an executable for those using uh something like like um windows I think when you want to download a a a tool from for to run on your Windows machine it always comes in aex exe something like that right so that's some sort of a a build or that's a binary that will enable whatever tool you're trying to De install actually function so that's an artifact for the tool for example so if we have um application for that application to be able to run on our server or for us for us to be able to deploy it we need to compile the source code because code is just you getting into your IDE writing some lines and that code needs to be compiled into some sort of a binary that can actually be run on the server and made available to your end users so that's what it's called an artifact okay so it's generally referred to as build artifacts so each time you do a bill the bill will generate what we call artifacts and if the language is something like Java which we will see an example then it must time produce artifacts in the format do J Java artifacts um do J which stands for I think Java archive there's a Java developer here right correct me from I'm I'm wrong M think it's Java I right and more JavaScript no which is web archive so these are what we call artifacts and it is the artifact jar f Jes that are actually deployed onto a server and made available okay so in that Jawa file you during your build process any dependency that your application need will be compiled together and deployed we'll see that we see an example right hopefully at the end of tday are we together yeah uh but can I ask a question please sure before you started talking about this particular part of the actual artifacts you you skim through some things I don't know whether we did that last week or maybe I wasn't paying full attention when you said that the Jenkins uh will can be combined with anible um and there was something you called I think the ago CD Aro CD I don't know whether you mentioned it last we because I didn't catch any of that in my notes I wondered how that infection happen I'm just saying okay I did not I'm not so sure I should have mentioned it from the when we all started the OC see the thing that Jenkins is just an auto orchestration server and the middle is the automation server but it has plugins that can integrate with so many other things okay we see see it as we go go ahead we would use Jenkins to build um simp simple Java application that produces some artifacts then we can deploy those artifacts on a server web server for example Tom card but going we can also use uh the Jenkins it uh connects with um repository artifact repositories so some sort of a repos repo where you can store these artifacts like um Nexus to keep your artifacts from where you can now have use those artifacts to deploy into different servers you can connect your Jenkins with ago CD ago CD flux CD these are all tools that I used for deploying microservices so we'll see an example of this where we do microservices so when I talk about microservices I'm talking about containerize containerized applications okay okay good so for the next few days what I will I intend us to achieve is to have the the the the the the flow of we have our git and in G we build we build we let me let me start from the beginning so we first of all do uh develop our source code so develop source code and using G we'll push push our source code to GitHub from GitHub there is a Jenkin server that monitors this GitHub so this would be our jenin s and watches GitHub for changes it's called a g giop g g web hook GitHub web hook oh you have what we call sem pooling so SCM pooling so basically the jenking server is going to pull your repository um based on a configur configurable interval so you can see once every hour every 12 hours every 5 minutes so Jenkin server is going to go to um this specific repository which we configure and if there are changes in the repository performs a builds and deploys our artifacts to wherever we have our artifacts okay so will put a s for today we will test with our terraform code and also with a simple Java application so once um our Jenkins builds our artifact or pulls and clones and and and builds the artifact then jenin is going to push our artifact to artifactory repository so we have Factory so the uh different types of artifact there jrog there's Nexus so we're going to do that with Nexus and this is where basically it stores different versions of artifacts and Jenkins can also keep our artifacts say or picks the artifact where it keeps an artifact in in a repository you can also configure the pipeline to deploy this artifact to a web server okay egy Tom card okay any question Prof can you um can you go over the the factory again so from my understanding when you say at the factory let's say you develop a C MH right um let's say you develop a JavaScript the artifactory would be like an artifact like you keep it as a copy somewhere or can you just simplify atory okay if you have your application today we've be we've developed an application right and we we've done the build and we generate an artifact do you understand the fact that that flow yes good so let's say we developed our code and we have one or two features of the code and the first day we build it we want to call the uh bu that version of code um what what is it web application I'll just call it version 1.0 of our web app okay yeah we have a jar or a Wii for that application so we're going to publish that 1.0 to our end end users so the users are going to be using this version of application so one week two weeks down the line we discover that there are box in the our application there are some issues in the application then we need to do a fix right M how do you do the fix your developers go back to the drawing board ensure or research on how they want to do the fix right source code to make the fix create a new branch of is it not working give me a second please okay I have I have choice so your developers go back to the drawing board they write oh see the reason de develop code for the hot Fix You Remember in the hot fix now we have a master Branch that's already put uh talking to um um that is live so the code is live is the code is version 1.0 right so MAA now discovers or some users will discover that our code has a problem they come back to MAA the developer Myer develops a new code it creates a new Branch for our hot fix develops that code pushes it to this new Branch sends a pull request to Emma or to Victor that please this is the fix for the issue which our users are already facing right so em I approves that P request P request goes back to development and there is there is now goes is merged to the master branch and there is an update to the code in the master Branch at this Junction Jenkins needs to build a different version because we already have version 1.0 which is live right mhm so where do we keep this version 1.0 which is live because in the artif factory exactly so once you do the fix then you can you having a different version of your code are we together got it okay so at that point now you can call it version one 01 or whatever so this is another artifact okay so you can push now this 1.01 to your artifactory and you're having different versions of your artifacts so you can either deploy this from the artifact now you deploy your Z 1.01 to the end users after doing rigorous testing however there are cases where your testing did not show you all the issues in your code so you deploy 1.01 to the end users and you discover that the issues that they are facing is much more dangerous or is much more severe than the issues that you had in 1.01 you need some some way of rolling back to um the previous version so your artifact is holding that previous version for you to roll back to okay all right so this is the same concept once we go to microservices you will be building different versions of the micr of of a Docker image so you be a Docker image first Docker image in that case you will not be using artifact for for for for keeping the artifacts the docker image is in this case is still an artifact right because it's our code which will compiled with the dependencies and we build an image that's our artifact then in that case we'll push our artifact to can somebody tell me no where do we push an image push our image to ECR or do hope yes exactly so in that case dock hope and ECR will be the repositories that are keeping our artifact artifacts for micros service application are we together and we version our image so it might be image version one image version two image version three then we have another pipeline that picks that image and deploys it to kubernetes are we together yeah so an artifactory is actually Version Control um Center or for for uh uh code it's basically a repository for your artifacts right so Nexus reposit stor but you are do one putting it in different version because you need to T it as per the versions that you you you you you want then push it to the artifact does it mean yes your question go ahead oh you can you can finish so just like um GitHub you're having versions for different versions of your source code after you compile that source code you need to keep it someware GitHub is for the raw data the raw code it doesn't keep artifacts you need a different place of keeping those artifacts that's where Nexus that's where doer hob that's that's where ecrs and stuff like that come into play are we together okay Pro does it mean that if we use um we using containers um we don't use the artifact the artifactory the artifactory is is not I think Nexus also supports Docker images but there are other tools that are built with containerization in mind because for example Docker hops you will not send jar and Wifi there but when Nexus and jrog were being developed in those days those they they were not build purpose build for microservices so if we go to microservices they are better tools to to do that with you can obviously use it for for for for imag right I think JFR Incorporated that so Jr should have it I have one project which I think they're using Jr for images but if I'm in um uh AWS I will use ECR or I can use Docker hop Docker hob was the first and the the P tool for keeping um uh do images which is a in my opinion a very great great uh repository yes it it's a matter of choice um um I'm I'm kind of confused between like when you were explaining what an artifact meant I thought it was like different versions of your code that you store in the artifactory based on the changes that you make um to the code and so I don't know what's the difference between an artifact and versions of a code I write my code in my IDE so this is my IDE your local right and I push this code to GitHub so GitHub stores the source code the raw source code you can go there you can see the python says import this import that but you cannot take that python code and Deploy on a web server or deploy it on an application server itself and it that is not an application that is the the the source code for you to deploy and run python I think you guys have done python right yes we for you to deploy and run python or deploy and run goang you need to build that into an executable if you want to download uh those are using Windows I I like I'm using the example of using Windows because I think it's much more common if you want to download any tool and you go to the web you click on the download it downloads um a file which you have to click on that file to continue the installation process right have you experienced that yes sir yes sir that F which gets into your download folder which you use in installing whatever tool you want to install this is just an example that is an executable that is an artifact in this case it was compiled like that to install this specific tool or software which you want on your system but that is not the source code there is a source code behind that um uh binary which you downloaded on your your system that source code is what is kept in GitHub that artifact which you have is what can go into artifact repositories like Nexus like um um and others that are out there does it make sense yes sir it does thank you so what converting executable from GitHub that is from a source code to an executable what does that part mavin ah so there are different build tools based on the language okay so for Java you can use something like marav for uh for python I think it's called P test or something give me a second python po2 I just want to find out the name for python bu tools a pro is the executable like the command the commander runs to like sort of install the um dependencies and is is like an instruction it's it's only it's already bundled everything is bundled in inside during when you're building the application that is when you you package all the dependencies into that executable okay like we have the uh Jenkins Dosh something like that the jenin that's just a sh script that's telling you what to do Prof um for instance for like um tar would that be like the dot um the DOT form um folder I um a gap because you know when you when you when you push it to get um you have to sort of um ignore those files those independen that's still that's still your your that's ra F that's still the source code that's not executable in terms of P um um in terms of terraform P Builder that's the name I was looking for so the the build to give me a second I'll come back to you it just came back to my mind P Builder so the build tool for python based applications an example is pi Builder I think that's the name you can Google search it so a build tool for Java base applications it's mavin so you can use mavin to build javab base applications and so many that's rer there an yeah there a bunch of them out there okay based on the language which you're using so you'll decide on what B2 to use so if you have your so code coming back to your point event if you have your source code then you need to build the source source code so we need to build the source code and this now will generate an artif fact some people just call it generates a build and it is that build artifact which is then deployed to your server in this artifact or in this bill we will have all the necessary dependencies so any dependency that the application needs that will all be packaged in the build dependencies okay so everything that the application needs it would all package it in the Bild just the same as with images once you want to build a Docker image all the dependencies we will see that when we get to writing Docker files all the dependencies for the application you have to package it in the docker file then once you do a Docker build Docker then Builds an image and packages all those dependencies so you can immediately run that Docker image so in this case once it builds our J or our Wy in here we all have the application source code and all the necessary dependencies that the code needs to run are we together does it make sense yes sir does thank you good good I have my hand up Sir oh I didn't notice yes on the on the same regard right for the explanation just giving so I was just trying to see how get up actions fitting in that explanation so K up hand actions is manage cicd so in that case yes get up actions will be be our our jenin server that will be do the build that will be pushing it to wherever it needs to go to so J get up actions is your man C like if you go to gab you go to um what's it called yep go to bit bucket you go to all this uh even AWS code ComEd has AWS Cod pilin those are all money cicd tools all right mhm but all these cicd tools that are coming out they all came behind um uh Jenkins so the go why we go with Jenkins is so that you actually see what is happening so once you understand what is happening once you go to the different um tools then it's you in the background you actually know what is what is what is um what is going on right and when you go to this manage tools there's always something they call a runner runner is just like your Jenkin server which you're using it needs resources CPU memory uh discs and all those things in order to build that that that um application are we together okay so it's some sort of platform that is um used for automation um yeah to automate all this process yes automate all the processes okay good one more question quickly so it's important that we understand all are aware of the various um um versions of these managed pipelines you know the the options to Jenkins is what I'm trying to say so you just mentioned GitHub actions you mentioned one other thing that um uh like even code code I think code deploy or code code pipeline for pipeline AWS C Pipeline and code deploy yes there is um bit bucket pipeline most of these hosting platforms have also integrated C man cicd into the offerings so that's okay so you have uh uh G up actions you have bat bucket pipeline you have gab cicd that's how it's called you have um things like team City that's one there's octopus there's another one there's um now um what most companies are also trying to use now is something we call Azure develops yes I heard about that one okay so azzure devops I've not used it I have one or two projects that are using it but uh from the application side but from the infrastructure side since we are using big pocket we're using big bucket cicd okay so as Des just also another thing that is out there and a devops has not been I think this is not up to I think it's about 5 years old but Jenkins is has been there since the Advent of sofcore development cic I got it now thank you Prof can you scroll to the right a bit so I can just take a screenshot of the explanation of yeah okay got it thanks [Music] this is the first time I fully understand what you've been talking about for two weeks end to end pardon I it's the first time I fully understand what you've been speaking about end to end this cicd pipeline thing because my my my knowledge stopped at git at GitHub and then of course there's Jenkins and then artifacts and artifactory and of course deploying it to the servers and so on and so forth it's a it's a complete train it's a complete train don't worry I by the time we end we get to the end of the session we'll do an end to end from pushing to picking it building the artifact sending the artifact to wherever it's being stalled picking the artifact and putting it on the server that end to end and you put all those pieces together right good thank you good great um that's enough about Jenkins so what I wanted you to get today is what we did last week which was pting the pipeline and putting the pipeline in our jenin 7 that keeps our pipeline script on the server itself so that's not best practice right because as we continue to build as we continue to uh improve our environment or our infrastructure we we also need to wa way of editing or reviewing or updating our Jenkins pipe uh pipeline so best practice is to develop your Jenkins file push your Jenkins file to sem just like GitHub as your other source codes then from there um your team members can review the Jenkins P they can ED it they can develop it as we go forward all right so we'll see we'll see that today so I want to talk about one of the bu tools one of the common bu tools which is maravin so what is Marvin Marvin is just an automation it is okay it is not just a build tool for for building artifacts for for Java based applications even though that's the call function but it has other functions okay give me a second we can use mavin to build our application into artifacts and deploy those artifacts to uh and users good to share my project management so basically a software management and project project management and coration Tool which you can use to build um your Java base um projects so any project which is based on Java you can use um MAV to build this Java and Marvin works by based on a model called the project object model so with the project object model you have something a pom refer to as a pom fire so in the pom fire you configure all the necessary um configurations that your application needs the dependencies that the application needs the repositories that you need to download those dependencies from so all those things are de and and place in your pom fine have an example pom file which it's in your I already shared your gith up link so you can it's in there we look at it and I want us to have a quick look at simple MAV project so the MAV has um standard template that it expects to in order to build your application right so this is the pom file pom file is the file that will have all the configurations for your project for your mavin project for your Java project so the the the the learning curve of the pom f is a little bit steep but it's based on an ex it's an XML file that has all the information regarding the project so you can see it has an element of the project it has an element of the model version the group ID artifact ID which is basically the name that you want that your artifact should have and what version so you can see this is an example of the version so once we build this it would have a name of my app version and it would push we can then push that to our artifact artifactory so it has different sections so if you are in an environment where they doing Java base from the perspective of a devops engineer you're not really responsible for developing this this um pumy it's a good it's it's good you you understand what it's all about how you can configure it how you can um improve it because the the developers that are developing the application is their responsibility to Able is their responsibility to provide you those file okay are we together am I audible no you are are sorry we're just on mute we can hear you processing according to evet good so the Marvin tool expects a standard project project uh uh has a standard project structure and the P file which has the configuration for the project should always be at the root of the the the the project so you can see and there is a source and in the main here the source main Java would have the Java base application or the Java source code so this is going to be the standard the structure of your GitHub repository and if there are some unit test or there are some automation test or some user exception test which you need to do based on the the your source code then you can also put that in your um sourcecode management system your vision control system and Marvin is going to use the test which you have to run against the source code to ensure that all any unit test which been developed over which written against this um application is R okay so you can see that the source main Java directory contains the project source code and the test Javas test Java com test sorry source source test Java contains any test um which you uh to run against the application right then our pom.xml file which we talked about it's basically stands for the project object project object model which is what um Marvin is based on and in this prom. XMS file we are putting all the configurations for the project are we together sorry I I may have I have to stop you here just so that at least I can not just pause for a minute um there's still a gap for me um between your um SCM and this Marvin say say in that diagram the original diagram you before this because in order to understand this what this thing is trying to do I I have to understand how it transitions from inside the Jenkins server which is just basically um something that listens for the GitHub changes you know and then have this thing called or you know to build the executables am I right this is what builds the ex from your what builds ex exactly so if you remember when we looked at simple uh uh Jenkins fine we said Jenkins has something we call stages remember so in each stage you can have the build stage the test stage the deploy stage so in that build stage that's where you're going to invoke Marvin or call the Marvin plugin that please build the S code does it make sense build the source code or build the executable that's build the executable from the source code from the source code okay okay okay got you so if you have a Jenkins I'm trying to look for simple simple you see in the Jenkins P line we are having different stages and the first stage is we want to build for example and it is in this first stage that we will call the Marvin which is the build tool to to build our source code so in here we invoke Marvin and the second stage which is test now in the second stage we will invoke the test which we need to run on whatever Marin has built and this will have our deploy so you can have another stage this is a very um high level um schematic of of of of a pip line so you can have another stage in um uh between the test which is uh let's just call it um push to artifact which actually pushes the artifact which the build to had to the artifact artifactory right I'll write something like that so we can see it at end to end then at the last stage if for example our build to we had a build tool that build our artifact we we have a build stage that builds the artifact we have a test stage that actually runs whatever test that the developers run developed on for our application so these tests will be run against the build artifact and if all the tests are passed we have 100% passed then we can incorporate another stage that says push the artifact because we are sure that this artifact is good enough to artifact okay then in the Jenkins last stage we have a deploy stage that now tells Jenkins that please go to the artifactory have we need to set up the connection to the artifactory the the UR the authentication methods and all those things to pick the um artifact and then deploy it to a server do you see the difference between Jenkins and Marvin now yes yes so Jenkins is just the orchestrator is what is telling you that oh do this telling this other two that need you to do this and telling the other two that I need you to push this to this place so it's your orchestrator it's what we call the automation server you remember I've used that word a couple of times yeah automation server that is orchestrating all these different arms or all the different parts of your cicd pipeline that is the field me so all of the these are built within the jenin they are within it right because it um their activities pardon it orchestrates their activities the activities exactly so okay we going to say something so Marvin mostly used for the deployment process Marvin is used for the development for the build process to build the the Artic fact sorry not the development the developer develops a source code pushes that source code to GitHub Jenkins is triggered when you push that code to get and the first step in gang Jenkins says that oh I need to build so who needs to build this source code for example Marvin Marin the first St step which is the build stage has will have a step that says um uh maving make or maving package and the M maving package is the step that would develop our artifact this will develop an artifact we need to tell it where to keep the artifact probably on the local Runner and we need to run a test this test is also developed by our um s our developers and this test is also in our GitHub remember I just showed you here so Jenkins orchestrates that pick talks to whatever tool that needs to run that test there are different test tools called like like junit so it's going to have a communication with junit and say junit please you need to run test against this artifact and invokes J unit J unit J unit J unit this is a test tool okay so J unit is an test automation framework for Java programming language so Jenkins will trigger junit and junit is going to run whatever test that the developers have developed against this Java application if we have the test phase we have 100% success then the first the stage one and stage two the first stage and the second stage bills are good then we can tell that okay the artifact that resulted from our bill has passed all the test and we are happy with it we can tell Jenkins that okay now Trigger or push this to um Can somebody give me an example Nexus to Nexus exactly so that activ will be pushed to to Nexus so we have our first version 1.0 in Nexus then we can trigger Jen oh now that our artifact is good our test is good our artifact is in is in Nexus please deploy that to uh th card server or whatever server that need to run the application Jenkins makes that deployment Jenkins is the orchestrator there are other tools that are very good for for for for these okay I a question yes where's the test um artifact stored par where's the test artifact stored the test is is what do you mean by test artifact so um after it's built and the um developers are testing it where where are they um writing the the um the code where is the code stored the test code or the code to run against the is stored in your GitHub repository okay so you can see I'm just here for example this is a simple Marin project structure and this is our GitHub repository and in the GitHub repository we will have our pxm file which is the file that you would have all the configs or the configurations for our project and the source directory has two subdirectories main Java and test Java so the main Java this is actually our raw source code for Java and test Java will be now have the source code for testing that jav application so this would have our source code this would test whatever uh unit test we want against our application everybody's offline are we together okay that makes sense yes we are F sir we're still here this is a we want to focus in fact you guys have gone off offline I don't know if okay I'm singing a song here which is not making much sense it's it's quite a lot because the like I said they all connected and if you miss one particular piece of it then you miss the connection you know what was what was missing for me was basically that connection between um Jenkins and Maven and of course the artifact artifactory artifact repository that connection was missing in my head and I think you just solved it with what you just showed on the screen uh connecting GitHub to um Maven and then of course to to the actual deployment in in the artifact uh repository in Nexus exactly are we together any question no Pro we're good well I'm good so this is an example very simple um for the Java developers that have been working with uh Marvin for a very long time they would be so Versed and understand the uh P fire and how to to edit it but in most cases you just have to understand the little bit of if you're using Marvel your your in your environment for example and if you're not using microservices and you're us you're still building Marin projects then spend some time understand the structure of the pom.xml F it can be a little bit um um how is it called a little bit complex for a beginner but once you get a gist of it then you can actually understand so you can see that you have um basically the project it always starts with the project element and the project element you have the version you have the group group ID these are all in artifact ID then the properties section then the dependency section so if this application which this Java application which we want to which we want to build Java app need some dependencies then we need to specify all those dependen is in our um pom.xml file we together yes sir yes sir yes sir so Marvin like I said as you into it you'll be hearing the word plugins everywhere Marvin is a plugins bills tool meaning most of the things that Marvin does it needs plugins it needs those extens extend extensibles extension because extensions which um gives Marvin the functionality to do what it does for example Marvin like a provider yeah like a provider for for for terraform all right so mavin is a plugins based too and there are a bunch of plugins that you can use for mavin and based on whatever you're building then you can look for the pop the pluging add that necessary plugin into your um environment good one final question Prof so this is for Java now if we were using some other you know language like python it will be a different um a different build tool build tool okay gotcha so I think it's called P builda me conf pild P build okay thank you there so if you want to if your um uh building your application is based on python then you need to go into P Builder see how P Builder is done see how you need to write P Builder uh buildings uh configurations and stuff like that okay that's also greater So based on the application then you can use the different B tools for that so you can also use gdle to build Java applications to build some Android and some codling codling is um also a language for uh so there are bunch of B tools out there based on the the um language they based on the language which you're using for your application this can build C++ pattern you p p sorry no about how is it how is it PB web p w e b p a c k can you say that again w e b p a c k w EB P web pack oh what is it used for I think Al like react um JavaScript you see that so you see wherever you are whatever to you're using then you dig you deep dive into it to really know the gist and look in CR of it okay so for those that are already in environment if your your developers you need to find out what are they developing which language are they using then you start looking at those build tools which they are using but most of times the developers are responsible for actually generating the build um file for you the build configurations but you need to understand what is happening because if you're responsible for the cic City Pipeline and you your build is filling you need to at least be able to troubleshoot a little bit about your um for example p. xmf why is it not working and if there are some things that are not moving then you can have the Zing call developers to actually uh Deep dive into whatever issues you do have then are we together y yeah does it make sense at this point yes sir was an uphill climb yes sir yes Leslie so from my understanding um Maven is a c building tool um that uses the Java um the Java for um language right Maven is a building tool for building software based on Java M yes all right that's my question thank you good so if you were building the the develop we using python what will you use moving no what will you use um I think I I forgot the to it to exactly you get I was not looking for the name exact because I guess there are so many building tools for python but just to to for you to the point I need you to get is every language has its own building tool all right to package that application and you as a devop engineer you're not responsible for deciding that the developers are responsible for deciding what building to they are going to use to package their application okay okay thank you most of of of your responsibility like I said if you're a devops engineer in the depth in the developer team then you you might need to to know more about this building tool how it works but if you're a de if you're a devops engineer that is responsible mainly for um uh the operation side of things then um you might not have to uh deep dive into this make sense it does sir yes it does sir thank you yeah you have demystified it for me and I think for most of us here second I wanted to show you um I shared a simple Marvin project my internet has started can you hear me we can hear you sir sorry my my my had a very poor internet today it seems the issue is back just went and need it good so um I share simple project here and if you see in here this has our very simple Marin uh p. XML file and in the build section or the build element of our we are putting in all the different configurations or different plugins that we require for building our our our software okay yes bro good but this part we don't have to be too much concerned about but we just have to understand it right I need you to understand it understand that mavin projects there's no maravin bill without a XML the form of the XML is the orchestrator or is the Marin yes for configuration everything happens in the p. XML file right okay every everything happens in here as a devop engineer if you're not using Java or you're not responsible for it you might not might not have to know deep into much about it but if you find yourself in the javab base application and they using the mavin tool to build then then spend some time there's a documentation I always tell you every twool has a documentation and get into the documentation um familiarize yourself with it and understand how that is used and how that is configured for um uh building whatever U soft code or source code that you need all right good but do we need to learn how to write the pum file or just understand what's in it you need to learn how to write if you are if I am in a if you're in a team and the devop engine in their team that are building M applications it's pretty important for you to know how to write that to write the okay because you are responsible for the bills so once every time your pipeline fails at least you need to be able to see what is there what is happening okay some environments will Mo most most most the times respon developers are responsible for providing this but you need to understand what is there okay yeah responsible for providing this they're responsible for providing all the test which is needed and you can see here um this I do not have a junit test here but I just have the dependency if I wanted to do use junit then you need to pass in the depend dependency because the application needs it or test Source who need it then um add those into the p xm5 and that will do your build are we together great scroll up again a little bit that where you enter that J that's where the test uh that's the the test part of that code you showed us a little earlier no this is the pum thatx find the test code Cod will be different but the test code needs this tool to be able to run the test against the artifact so how do we get the tool the p. XML fire says that we need the J unit as a dependency so in this case Marvin is going to install junit it needs to go to wherever it needs it um junit is bring all those dependencies and install it once you do the first run for um Marvin build then it's going to install all those this dependencies we're going to see that as we go ahead are we together yep yep yep do you all have this repository uh it's on the chat oh okay so what I want us to do uh once we come back take about 10 minutes break what I want us to do is I want us to configure our initial Jenkins you still have your Jenkin server right or in Jenkin server to be able to pull sem so pull our code from GitHub so rather than you running your pipeline or clicking on the bill now which we we did last class you just configure Jenkins to be able to pull that code every 5 minutes and it's going to pull that build it and deploy then we will going to for the first P for the first session just understand how this is developed understand how this is generated because mendu does provide some steps to generate um this standard template project template understand how it's generated then um test a build locally then from next week we were going to then automate that um whatever we did here manually so the first step is you do manually know what is actually happening there then we'll see how Jenkin is going to help us to automate that that that that okay does this sound like a plan you guys are all gone again yes it sounds like a plan sir yes a good that sounds good boss it's a good plan but what if you already uh um deleted your jenin server I was going to say the repository is there for you to install it okay I sent you two repositories one with the Jenkins thing I think so if you need the Jenkins go back to the repository think is in this repository and there is a step here for installing Jenkin somewhere all the thing everything is there you go back to repository and you do that okay are we together yes sir great so see you guys in um at 3:00 no what's your time which will be hour 9:00 good this is a brand new jenin Ser nothing on it I'm looking at your one note oh sorry uh what do I have oh dear share uh oh no yeah that's the right one isn't it no sharing I share again oh dear Jenkins server fa this sorry what about this good yes I can see you let me get this how that happened wow good so um if you look at the repository which is I want us to just if you have everything set up as what do you mean by everything I mean like uh we already did all the six all the steps yeah that's that's um let me pull this up and see where I am here kind of was doing it in at at Brick time uh is the I have to go to your I have to go to the kind of confused here now where is the chat yeah there you go chat I think is this is the link I believe I think that's the one so the steps you're talking about Sir is uh step seven and eight this one yes seven step step seven step seven is what you guys did last week right a simple build job using the pipeline plugging yeah and step eight is what I want us to do because if you remember there should be um Jenkins fire there and that file should be very similar to what we shared last week in which you have um the Bas the simple pluging the simple pipeline which you deployed last week I'm talking about the repos no I don't mine is empty right now because I don't believe I built totally I shared a repository with you that's what I'm talking about you just need to clone it talking in the browser right yes okay do you have do you have the repository open the one that this particular one yeah that's the one I had open just now repository not your I'm looking this is your juning server yeah this is the one that you you this one right we can't see it no it's okay is it the one with Jenkins am I sharing the wrong screen again actually this is the I want to see I want to see Jenkins server screen but if you if you if you if you if you can just open another tab with our repository so it's easy for you to oh this is a different browser that's why it keeps going elsewhere sorry about that uh let me let me share my entire screen that's probably why sorry I didn't share I was sharing the screen not not the um yeah um share come on where are you which one are we sharing okay it's the entire screen I want to share screen one share the screen please tell me what you're seeing because I think my sharing and share screen let me let me stop sharing and start again please sorry it's coming back let me share it again shouldn't be one oh it's because it's screen too not sure how this happened though wow trying to share the entire screen but one note keep no U um the screen we are seeing that's fine okay the browser you were saying something about the repo yes I'm saying in that repository there is a Jenkins fire there can you copy the Jenkins F oh okay let me pull it out then in fact leave it don't if you do this this way this this is this is not the best way to do it because the report there is pointing to and the account there is pointing to my account you need to make changes you guys already have this right I'm sure you guys this is what you you in put requests amongst yourself right that's for people that delete this instance here let's do it this way Victor just go to your uh G bash and you clone the you make this one or two changes for your information so you will be deploying this into your account okay let me just wondering why my entire thing is not together all everybody did you just share something right now no I did not second let me let me give you Comm man the command then please why am I not see yeah you might have to stop sharing and share your entire screen instead of a window yes s what really confusing the heck out of me why is it not doing it goes back oh okay maybe it took this this this this all right all right all right all right okay I got you it's it took the wrong um monitor sharing the wrong monitor this is Monitor two entire screen should be on one should be on one or two so going to show how this happened jeez just confusing fix this that fix this we're not supposed to take break today sorry I didn't realize I think somebody else should share my monitors are all screwed up I want to share the whole screen but it keeps going back to my second screen on which I have some other stuff so maybe what I'll do is I'll close but I need two screens because I have to do the I have to open up the um yeah what if I shut this screen down and uh see if it will acquire screen too can you stop the recording please please stop the record the reposit the repository which um it has some uh like the IM R the ID and stuffs like you need to change that so that it deploys in your account so for that you have to clone um can I have a link to the repo where is the r CH it's in the ch [Music] uh the one that says terraform test that one yes okay that's what I had opened okay let me just follow um as should clone in here yes so this is um hope you do not have network issues like me today um do I need to install T form first you have terraform on this machine I don't have terraform on this machine on this this new this is a new E2 instance that I just installed um Jenkins do you have the IM R from last class I have the IM Row from last class yeah but the installing tform is not a big deal just a couple of commands you run them you're good okay um Prof I'm in the repo good so if you go to the Jenkins f you can do it from your IDE let's see it from that this is your local no this is the the easy to instance no I need this on your local because you need to um push this to your own repository um I have it on my local as well do you guys understand what we trying to achieve if somebody doesn't get it you tell me please you understand what we trying to achieve I I didn't get I have the I have the I have the repository my repository it has my information inside right so if you build and deploy them it means um um yes Prof I mean sir you'll probably be deploying you probably be deploying into my account so you need to make some configuration changes to be able to deploy from yourit into your account does it make sense we created a GitHub report r at some point right yeah everybody so what I want you to do is yes Prof I'm here hello yes I can get you this will not work if you make the changes and you push you'll be pushing back to my repository and not yours right oh oh I can um I can um Sor I can um remove it um and I I guess I just need to create a new repo and push it there yes exactly I'll do that now um I'll share my I'll put down on the screen um so this command was to um delete um remove the repository so I'm going to go on GitHub link to me so it removes everything links to um provs repo so I'm going to log to get and um sort of create a new rep are we together Emma yeah if somebody's lost not clear you stop you ask I'm creating a new repository now no as Jenkins ter what was that command to remove the thing again it's um it's just like you're deleting a file so um deleting a directory so it's the rm-rf but you want to get rid of the doget folder um um let me ask you something um did you do the assignment did you do the the the demo last week if you did the demo last week it means you already have a repository that has tform F right oh I just deleted mine because it didn't have Jenkins anyway it's okay go ahead so I'm going to um I'm going to initialize get now so you can clone the report that the the uh okay exactly get OD to get at present working directory so get add DM in puts put your commit message and get push then um another way to achieve this would have been push what's the other way another way to achieve this would you go to your repository you create the repo there clone it then you just uh copy or you move all the files into the repository oh Prof I'm on my new computer so um I think I might have to I have to reconfigure it say please what you just said that you go to your remove the the G things which she G no RM rf. git because once you have git f as um um how do you call Dot folders git folder is yeah hidden files exactly hidden folders so you have a in a g repository there is a hidden uh directory called kit that has basically has link to the G repository and all that stuff so once you remove the. kit file then you've basically disconnected that link to my environment then you to your repository you create a repository just like you create any other repository then you clone the empty repository down then you go to where you have the files and you move them that's also easy so you just do a a move has [Music] the MV the move come on then you send it to the repository that you C you created and that should also move all the files into your new report then you can push back toos that already exist are we together if if you had the rep did last week then we should not be doing alls um I'm on I'm on a new I'm on a different computer I'm not home I'm on my laptop and I'm okay um it would take me 30 40 minutes to demonstrate this and we go but I think it's also good when somebody's doing it so do it the move is it a regular move to the git um place or is it a g move no move you're moving F then we're not talking about okay from from our local to gate okay no moving because you've cloned the gate repository in your local and G will directory in your local system so I just want you to move the files from one directory on to another make sense everybody can we can we F our own name what can we to our own name yeah you can do that if you want change it to F it first before yeah you can f it if you f it then you can CL it from yoursite and that's also fine I convert it to my own okay um prop I already did the rm- RF and I created um a gate repository so what do I do on the local because it's all the GE commments are not working do it's because it's not a regular folder right it's just a regular directory yes just a regular Direction G cands will not work yeah that's why say you just do a MV use a MV to Move It from your local to that repository yeah Prof I'm I'm back great so let me see now you want to see my repo yes I want to see see that you pushed it you have there yes sir it's right no your repo UI not the G side of it so this is in uh M four minutes ago great this is what I want so if you go to the um Jenkins just click on the inspire you can do that from your local you can do from wherever you can see that scroll up you can see this is talking to my Branch you need to change this to yours does it make sense online 10 yes Prof line 10 yes yes Prof so you get to you have to change that your that's the first place the second thing is if you go to Providers the me if you go to sorry the provider TFI so prophecy going to be the um which link the https what do you what yes the https and if I go on the provider it Prov the HTTP doesn't have a dotg at the end so you need to put it there it has it doesn't if you go to the provider it's talking to my uh uh I am role so you need to make sure you have that change to the I am role which you have on this server okay um so another way for you on that server on your server you can just do I think a command AWS STS get as color identity so this would be the is the Arn that's the Arn owner without the um ID at the end there without the ID at the end so it's in ID it ends at admin admin yes BR good do you make the change in the Jenkins bu um is it what do you mean the the report URL the repo yes I've made it good can uh please put put that in one uh on line so you you spread that fion line 10 and can you is that better can you yes that's what I want exactly push that push your changes then let's go to jenkinson configure p yes I'm still working from the main branch hello that's fine that's okay bro so have you pushed your changes you need to push your changes I'll push your changes good so let's take me to your again Jenkins UI so on your Jenkins UI this is where we need to configure the Jenkins UI uh Pro for some reason the junkins UI looks different what do you mean um oh yeah this is it I'm here good new new item let's create a pipeline so let's call it pool uh is po I infrastructure is called pool ACM I pool ACM all one word yes h n p ACM it's called p o l l po oh PM po SCM sorry SCE code management so we're going to pull and we want to use the uh pipeline project yes um do I need to install terraform cuz I hav't install terraform it need it it needs terraform but you will see what will happen let's go ahead okay you go you would um go to uh build triggers you scroll down to Bild triggers and this is what will trigger the build it says build after other projects we talked about this build periodically I want to pull SCM so you can click on the the the help sign the to get more information what this is all about so config to pull changes in SC so this is just telling you that is because it's sem based on your CR tab or based on or your CR schedule this can be a little bit um um so much overhead on the Jenkin server right so there are other options of doing using the Geth hard trigger for G SC pulling which we'll see next week so with the pull SCM just do star star star so if you do I want to five stars now what does this mean I want to look give me a second let me show you the documentation it basically stands for I think every hour um every minute of every hour every day of every month of the week how many stars five stars yes five yes so it's a CR job it's a CR job so for for those who do not know uh what cron is pleas send a link there's something called chrone Guru that's the name Crone Guru it can basic it can help you do if you want to Chrome tap Guru thank you that's what I was looking for so if you go to Chrome tap Guru can you do that on your browser from to Guru you can you can basically use this to customize uh um Chrome jobs Chrome jobs schedu scheduling SCH jobs as you want exactly I've actually seen this before so you can use that to get all what you want so back to our what so there's a star star St see that's every minute that's St star every minute exactly every hour every day so so if you want it every uh so star star star star five stars is every minute of every every day month okay and every day of the week so if you want to have it at a specific hour on specific day on a specific month you can all do that magic here with the right good so let's go back to our our UI the browser please the browser yes what does it say you appear to be missing white space between star and star can you put the white spaces click outside of the box and let's see yes so it tell you do you really mean every minute so that's fine because we want to see the changes in a few minutes right yes bro so I want to in post commit hooks that's it for now then we screw up should I um ignore post commit hooks it's okay just leave no scroll down scroll down that's what I'm looking for so scroll down there should be a place for you us to configure the repository here so um in the pipeline back yeah right here is my pen so pipeline script this is what we did last week which was putting our pipe our declarative pipeline directly on our Jenkins controller and because of that Jenkins keeps that pipeline or our pipeline F in the on the server itself so that is not a very good practice because in that case others are not able to see the pipeline others cannot modify it cannot improve on our Jenkins F so it's good practice and there are so many other advantages of putting it in sem apart from apart from Version Control every other um repository which you've configured for Jenkins to pull from once they have the pipeline Jenkins F in uh uh there is uh repository Jenkins is able to use that Jenkins fire to build okay see on the pipeline I want you now to use pipeline from SC so what does this do with pipeline from please select pipeline from Jenkins is going to look at the repository which we are going to configure for a specific for the Jenkins F basically are we together yes bro good so now you need to put your repository here so copy your repository uh HTP s um do from yes this good why is he saying why is he complaining public it's a public report at this point no no points of credentials is going to clone that scroll down so branches to build you need to you can tell G that okay I want you to build from specific branches if you leave it blank there it's going to build from all the branches in that repository what what is the branch name you have is it main or Master main good so you need to change it to main so basically your JS this Jenkins job the specific Jenkins job to always build from the main branch okay yes bro are we together y yes BR good scroll down I think that is it so exactly give me a second so the script path so you can see the script part can you put your C on the question mark let's see what it tells us but basically is you need to tell Jenkins the path on in your repository where the Jenkins fire is found all right so it needs to it's it's going to be looking for a fire with the name Jenkins fire it is K sensitive it is um u k sensitive the in the specific name all right so if you do not have a fire there called Jenkins fire Jenkins is going to tell you that I went to your repos and I could not find that so because of that um Jenkins is going to go to this repository which we've configured and build the pirate line based on the Jenkins fire found in our repository way together you can save that once you save then I expect Jenkins to trigger yes um besides the the the Crone the Crone um job that we've um specifi in terms of using the star star star like um let's say if we were to merge does it um cost a trigger if we were to merge into our m is it automatically going to um like remember what we we this is pulling pulling means go there and get it so merch in that case is not what is going to cause a trigger it is because we've told K go there every minute and Pull and build okay that's what causes Jenkins to go build but when we dig when we commit work books then it is the merge that is going to cause the trigger okay do you understand because in that case there is going to be a web hook in the repository which will configure to our Jenkins with our Jenkins server once there's a commit inside then the web folk is going to trigger Jenkins please there is a commit you need to build then Jenkins will build at that at that point can you refresh exactly if you notice we did not hit bill now we did not do anything but there has right we just said hello we did save yes BR immediately you save he went and build because you told Jenkins to go every minute are we together yes sir is this making sense it is sir yes sir it is so but is said to build every minute it does it mean that um is it is it again like um like terraform even if it tries to build um the what it built one minute ago and there's no change will it then nothing happens then nothing happens okay because it's ter right yes okay so the state the State Fire will be there everything will be fine because this is St and I'm why am I saying every minute I'm just using every minute so that um we could see our changes now okay all right there are environments that they want their bills to happen every night every midnight or very early in the morning okay okay and they build and push to the artifact so that they have complicated test that test will run for a couple of hours or so all that that happens in the night so you can use this pool SCM It Go right because let's say they have a development team and that they have like 50 60 developers that are working throughout the day if they are doing a lot of merge the master Branch or to this branch and they using the G committed web hooks then each time there's a merge there's going to be a bill but they don't want that they in want that oh all the merch and things would happen and we have our final build probably at midle of the night are we together yes Prof Prof even though we're doing the um the poll can we sort of run like custom triggers yes you can do custom triggers you can still use bill now okay you can even still do uh build now build now will still okay yes bro so look at your bill it filled why did it fill um would did tell us somewhere yes there should be a build there should be a console lock we saw it last week click on the build click on the build itself click on the build the one itself the one that F yeah go to console output yeah that's it you can do this and you debug you should be able to debug this from what we did last time so look at it you'll see why that field at the bottom where are the where's the Red X there supposed to be a red X somewhere error sayc due to earlier failures so yeah it's um terraform not found exactly so you don't to build you cannot build without Tero right yes bro correct so I guess I have to just run the commands to install terraform here you need to run commands install terraform there interesting and you're running this thing from the server itself not from your local from the no from the the server where Jenkins is running because is using that server as it Runner right now as a runner so it's our Jenkins controller and also as Runner if if you remember I said that some environments because they're doing complicated bills and long bus then they have what we call controllers and Runners so you have a your Jenkins master that has you're doing all these controls from then you have Runners and each a job Jenkins spins up and a runner runs that job on it kills the East to server so those are high complicated um um setups so I have that we have that because I have one two pro using Jenkins one of the projects um came to us with already having uh a setup so actually the Jenkin Runner is is is in another Cloud Jenkins controller is in another Cloud I think Oracle but the runners are in AWS H there's not let's not get into it that's a little bit complicated it's just certainly so MOA what are you doing I'm moving very fast you're not saying anything um I'm not doing anything um I just um installed um terraform on the server on the E2 instance so I'm guessing he going to do a poll after a minute and um hopefully as you see can we can can I see your your your your bill how many bills do you have that's one um where is the the bill click on ACM po I am ACM let me see 6 minutes ago so it hasn't built once in 6 minutes or 7 minutes now is it going I'm guessing it's going to automatically update I expect it too how how many minutes is your C J is it a minute every minute so something is wrong something is wrong should have run check your terraform again did you type terraform to be sure that your terraform is actually active and working on your server it is working and it's very active Okay go back to let me see go back to the uh Jenkins pipeline go to configure configure is the fourth one down uh sorry give me a minute sir I just spilled soup on my laptop interesting yeah it's it's fine um so I should go configure yeah the number four down see that on the left yeah yeah every minute says ignore post depository Jenkins file so that's the last time it ran so it had just one bu why it's not eight minutes yeah it's been 8 minutes and it's only been one build that's something is definitely wrong no the schedule is correct I don't know what I did the schedule looks correct this is where it um yeah the it needs the white space in between SC is get do we need some credentials so and let me check I guess it's my yeah it's just the main branch can you run the now let me see run build now build now so we do it manual override yes I want to do manual override and see what happens why is it saying last bill bill number five exactly 15 1.5 seconds ago maybe it finally took yeah is it oh well no maybe because you clicked on build now no but but it should number five has done five yes it means that it has done five bills uh where are the Bills scroll down let me see scroll down where are the Bills we we are supposed to see all the I think I think I clicked it I clicked it at the same time what I mean I think I clicked it the 2 three four five I click I clicked it multiple times I hit the Run M the build now multiple times yes probably is not working yeah version is not working but it's not it's not just version even the build Now isn't working either because it shouldn't take this long to build it and we see it being built double shooting 101 this doesn't concern us really it it keeps failing see why it's feeling that's a different issue why I'm I'm curious why it's not pulling not even why it's failing it's failing because your configuration is not right can you change the the Chrome tab to Star 4/3 so the first one I want to build every two minutes or every 3 minutes and see what happens what I can read um sometimes every minute go to configure where you going configure you have to go back to the actual job itself yeah you have to go so I should change this [Music] to and the first 4 SL put three four SL three nine staff three could you please put in could you please um put it in the chat no we're learning now so that show click outside let me see what what what what's the presentation of that is yes spread load evenly by using than that that's every every hour 3 hours that's is not please put the thing up that I'm looking for every three minutes is it okay put what you just put a 3 minutes so it's just three um three stars three four stars put put what we have in the from uh ly put the entire thing there you removed the other why did you remove the other parts is saying I copied it from kab no what what what prop said is uh to put what you had there before into the CR tab from your Jenkins into Chrome tab yes every third minute yeah so this is what he wants but the syntax it says here now it wants it to be something else can we look at the configuration again did we miss something while we in some of the other fields why it's not because I don't think it's a time is a a is a um a crown T issue now commit hooks scroll up periodically scroll up pleas this [Music] prev F is there uh a wrong book or step by step for number eight oh that information because i' not really been following yeah it kind of lost me in the middle somewhere but I was hoping to follow up with uh watching the video later but looks like we're stuck here too why did you P just once yeah I saw this online with a h um I saw the this on with a h 43 and four stars and I'm not getting any error all right ahead this post every um 3 minutes save maybe you put it uh H H 4/ what is it St then maybe that works let's see if it pulls every 3 minute or should I change it to one minute okay 3 minutes is fine let see what happens okay per or two it um I spent the other days almost three four hours trou shooting a customers environment where um synthetic canaries do we do synthetic canaries Cloud wash Cloud was inter effici of cloud wash there monitoring was working because somebody made changes and in the canary is expecting a hyphone the person use underscore we didn't do that um 8 minutes ago is it upes can you change that think 2 minutes just the time to spend here almost there almost the third minute yeah we almost at the third minute so this is happening this is supposed to happen real time we don't have to refresh anything here this is real time 9 minutes is it more than 3 minutes but when I scroll down was the last view it says number okay number five so it's still number five two 55 so maybe five more seconds what 255 well oh that was when he did okay 10 minutes ago definitely more than 3 minutes so far definitely more than three minutes yeah okay that thing is not working say is about like 6 minutes now definitely the I um the Chrome type is not working so but I think it's not a crown issue even it might just be the fact the build the build isn't working because you tried a manual build and it failed too I expect it to pull it and F oh really okay no credentials it's a public report so should not be credential issue right credentials invalid That's why nothing is happening denied STS assumed R admin is not authorized go cut cut your provider the TF and then try to look on it is should is your role that you're trying to assume you need to adjust the trust relationship yeah remember the trust relationship with we did the last time so that's it's an i thing you have to just adding the right need to add a statement in the trust relationship uh policy yes so if he had that if he has done that last we does he have to repeat it again this time what I I said I since he has done it last week does it have to do same thing this week what we're doing now is not what we did last week it's a continuation from last week yeah I'm talking about the trust the role itself the TR you don't have to it's the same R then it should be there okay that's what yeah that's what I'm saying I think you may have tampered with the role for a minute go back to your role and check I me that's the one yeah copy this I think that's the same thing though yeah well just copy maybe me oh did you oh is do you still have the RO attached that e yes you you recreated this thing is it attached to that instance though are they connected moena talking get we can't hear you if you're speaking to us he's on sorry sorry sorry sorry I'm here maybe the ENT saying did you attach this Ro did you attach the RO to your e yeah so the row that I used was this one I think I made a mistake with the row um so I'm going to push this code again I'm going to push this code again yeah I made a mistake you use the one with just single end right no it's not the one with just single the one that I use the one that I use I can show you it had STS it had STS and stuff there he didn't use the make um without clicking the bill can you make changes in the repository click um just add something in your ec2 just add another E2 file and push it to the repository and let me see if that triggers the bill with this new um of rule I think the RO I should add another AC too yeah you you you are trying to solve a ro problem I'm trying to solve a Junkin [Laughter] problem and and and all I was say well okay L we halfway lost what was that one now remember um you know we're watching you remember that his commit message it's a commit message Remember You The F the new instance you're creating should have a different name or teral complaint right yes bro um but I've changed the rules so I'm I'm I'm I'm trying to see if it's going to work scroll down yeah it's most likely going to fail but we have to have wait for three minutes now right again no I'm going to change it to one minute is a config yeah to one minute don't worry we have all night we can stay I've change it to a minute so now it's building so it was it was my on it click on it no um hit build now or it triggered on its own it triggered on its own okay I and I think it was it was because of my RO I don't think it's a ro problem I expect the pipeline to run and fail yeah the RO problem now is an a problem I think it's going to fail it's still going to fail yeah let be posi because if it's not feeling you're supposed to check out the grin and still spin click on it and see the console output look at the console output let's see console output is on the top there third one on here hold on building something it's waiting for you to approve deploy deploy Pro all right you can do the deploy then I want you to add um um add an E2 um resource add another res E2 resource and push without if it if that triggers it immediately so copy the existing one and change the name no just add another one so you have to inst you need to change the the logic the local resource name T2 micro the only any from T's perspective the only thing you needed to change was The Logical the local name yes push the local resource name is the one that terraform recognizes the Lo The Logical name so there's the commit message Mr Victor new ec2 new instance I'll just say new instance gotta then get then run get push to push it once you've committed it okay go back to your Jenkins and let me see what happens so the first one succeeded gives me a new Bill yes so if you go to your account you should be able to see E2 there I want don't don't do not click I want to see if the seventh Bill comes after is it after the next minute well it's supposed to happen immediately actually or maybe at the at the remember it's your pool yeah after the minute from okay after a minute okay 59 more seconds more seconds I thought we which clock are you using Moa is the gunam on time refresh refesh well are you supposed to refresh though sir I don't know so it's not it's not building Auto automatically automatically building so that last one probably worked from the deploy I mean the build now rather than from the so you you you iig yeah did you hit build now on the last one I didn't I didn't hit build now I didn't hit build now didn't okay go back to the PIP go back to configure this is crazy I mean we have three three C2 instances three Jenkins running one hello world which is the first one I think new Jenkins they did deploy it without of knowing um no that's not the name you gave to it is it I'm not sure no the new Jenkins was is for the um guess that's for the it's for the Junkin server yeah Jin server yes but I don't know about the J deploy J deploy go back and look at it let me see you you you you you named it isn't I think no no that looks like a name I give J oh Che go back to the source code J depl looks like from me we only have the hello world and then the test oh then there's another one called okay Web Two web two yeah yes so that that went so the new one the test one is not here the test one is not here yeah go back to the test let me see the the source code you mean the source code yes so the source code this is um your gen's um deploy which is the second um web server that you deployed and this is the first one from line one to9 and this is the test one that I just added okay and i' I've pushed it as well but yeah it didn't trigger anything wall where is it coming from it's from your from week come again hello worldall where is it coming from the hello world is from the um the tag name the name it's in the tag guess it picked it it picked it from the first the first one that you um created the instance web the instance web yeah web there the I mean the one that I just added I supect I guess we're going to see test as a name we should yes um I'm going to look into this I don't know why Jen take it as forther tomorrow okay I guess really weird investigation yeah well I'll investigate too CU I I stopped following on my own code I mean my own um vs code so I just another oh you did a you did another build manually yeah May is a problem with the plugin oh look it don't we look at tomorrow okay yeah yes BR yeah manually it seems to be working so it's got to be the plugin yeah man seems working seems to be the plugin um we can try um is give the code to co-pilot with the configuration looks correct it is correct I mean something inside Jenkins oh we may have missed something though yeah we may have missed something all right guys all right thank you very much Prof I think um tomorrow we'll finish up with this and we look at Marvin and we'll try to build aut toate Marvin manually then try to build it with mavin to all right build mavin from Jenkins that's what I mean yes here for you please um can you stop let me stop the record yeah stop the and So Pro for tomorrow class do we need to set up our jcks before the class stop the Ser yes please set up the okay okay the class of tomorrow I'll update the Jenkins wrun book again and push to yes can I sh my screen can I share my screen now okay the test is came through oh excellent so it's not a terap problem not a terap problem no it's not it's from the server yeah yes I want to that is Em still here so I was going to say if you want to um if you want to kill your instances in the code um just comment it out and push to get commented if you want to kill your instances in the code just comment it out and recommit and like rep your code to GitHub Oh you mean like to destroy Dy to destroy the instances because you know that's what's going to charge us so I've commented it out I've run G status to to see that to make sure that oh yes my ec2 instance is actually modified and I'm going to add it um I'm going to Stage it so get add e2. here then I'm going to commit it for the jenin server please you can just stop it so that start kill instances do Dr last time you posted this so you have to um come back here and then if you if you were following this you have to come back here and um we can't see your screen trigger it again you have to come back here and Trigger it again so you click on the build now to trigger it again since our Jenkins wasn't working and after the build D you have to sort of do it manually and um make sure that um make sure that you deploy it as well that's the only way to actually kill your instances so so I'm going can you can you just go back to your your um vs code let's just read call your command that you used in doing this thing so we can okay yeah so it's just the same commit right Victor just like you commit any other thing all you need to do is comment the terraform resource terraform file you push it back to GitHub then you build okay you you come as you can see I've commented it out here I've commented all my ec2 instances then you run get ad uh you run get add and then get you run get add um you add the ec2 file so that TR or stage then you run get commit you commit it then you push it so after you push it make sure that you go into um Jenkins and sort of manually deploy it in Jenkins man manually deploy it um in the Jenkins server and it will destroy and it will destroy so if you deploy but you have to make sure that you click on that um deploy to actually destroy okay yeah where where it stops to say deploy or not deploy okay deploy or not deploy yeah Pro I'm not sure if I've asked you this question again um do we always have to deploy manually you don't always have to but some environments want to so that at least um especially the master branch that goes life some environments want that final approval not just that we also especially infrastructure related the master branch is what is actually hosting the INF carries the infrastructure for the where the application is running so let's say somebody joins you and just push and give the person push Privileges and the person pushes it there and it needs to Auto destroy Auto create and stuff like that so we need to be sure it's just another security gate right to be sure that this is what I actually want okay yeah short answer to your question is no well I mean you the option is obviously to have a crown job and uh and do it on a Time Time basis but even the Clone job you still have to click um deploy yeah even the Clone job here you will still have to click deploy oh really yes yeah this is just pulling the pipeline oh now you need to tell the P want to do if in that pipeline if you don't want to if you don't want to if you don't want the then there's a command for you to use remember we is it a auto um Auto apply approve Auto approve yes so if you approve going to ask you those those again okay dash dash to approve got you I thought I had a question about um the homework that you gave us I wanted to know how we're going to test um the the the second server I think with with a PO 80 from our Bashan host you um you just SS into your private instance