CI/CD pipelines explained

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
let's start hi developers and this video I'll explain to you the basics of the CI CD pipelines and develops those are the continuous integration and continuous deployment we talked about those pipelines when we want to automate and create a process where the build and the release of the application will be fully automated so let's start with our developers who are developing the application so we take here the example of a web application that connects to a database then we'll go from the source code enter the deployment of the application and we'll explore those two pipelines the CI and CD in order to to get the application deployed from the source code so at first we'll have our developers writing the application on their laptops so we'll have here so they will be writing the source code files and here they had the source code for their applications and then I still here we have and our team will have those developers the developers then in order to share their application source code they will use a source core source control management like github for example so they will commit or push their code into an SCM system so here we'll have an SCM this could be anything get this could be either github get lab as your repo earth could be also bitbucket so the code will live in the stores corn source control management with this is assumption in order to start creating the CI pipeline or the build so from the source code manner management will take the applications source code then we'll go to the next step which is the build so from here we'll have our build pipeline and during the build pipeline the goal here is to compile the applications to generate a package for the application so let's stay here the goal is to compile the app this will run the command MPN package install or dotnet build or any command depending on the programming language that we use in order to generate the package so once we have generated that package let's stay here this is the output of the build is the applications package this could be the DLL file or dot jar or our else depends on another the framework we are using so the output of the bid is this package then during the release pipeline from here the goal is to deploy the application so during the release we say here will go to deploy the app and your deploying the app for our application means we deploy it up into a web server for example so we'll go here to stay we want to deploy it to production for example so we'll have an environment a production environment where we want to deploy the app so this is the basics of the CI and CD pipelines the basics of the DevOps implementation but maybe we want to add more steps here in order to make sure that this package that we want to deploy doesn't bugs and doesn't have anomalies for that year it would be great if I could run my unit tests during the build pipeline so during the build I'll add another step which is running my unit tests I can add another step in addition to make sure my package is is good and is ready to be deployed maybe I want to run a static code analysis for my source code so here I might run those static code analysis and here maybe I want to use something like Sun our Sun our key a cube for example so this makes sure my package is is ready to be deployed when we deploy that package until the release may be here I need to make sure that before the project to production the package is ready or I want to make more tests before deploying to production and here where we can use for example some other environments like the test environment so this could be your ua t user acceptance test QA for quality assurance and many more and maybe even before running booze or before deploying the package and to test to make it available for my beta testers maybe I want I wanted to want to make it available for my internal developers I want the PIO and the other developers to be able to to deploy the application and see it running successfully before giving it to my external testers so here maybe you have another environment which is the dev environment and the difference here between the dev and the test is that the dev is more restricted when the test and they have I have many about let's say 1020 users who will the application and the dev environment then once they validate the application and dev will move to deploy the application in the test environment and will give it to 100 users or 1,000 or even 10,000 users and they will be able to test it like an beta program then if the test environment was the tests are elevated then we can go to a production so here maybe also during the release pipeline and in addition to those different environments I want to I have some integration tests so I can run tools from here maybe also I want to run more tests like the UAT tests or the UI tests so maybe I want to run some manual QA tests my keyway engineers will want to test the application and the test environment so here what I have done is that I have added more tests and more more chicks in order to make sure my app bids successfully it generates a good package and that package will be deployed to different environments before going to the production so if we go back then here to the to this section here here we mentioned only developers but we know that DevOps is about making the developers and my IT pro and my DBA all of them they should work together so it doesn't make sense to only mention the developers here so let's start adding the DBA because my application maybe it have a database so for the database scripts the booth they will be written by the DBA and most of the cases so we need to add the DBA to this loop here so let's go here to add our DBA I'll use another color our database administrator he will be working on the sequel scripts and the best of the cases is that he will put his scripts inside this time a git repository used by the developers so his scripts we live here then during the build maybe if he using something like a sequel server management studio SSMS and he is using the database project then he won't manipulate directly the sequel scripts but he need to compile this database project in order to generate those scripts so during the build pipeline we'll add another step for compiling the database project so from here we say the goal here is to generate the scripts and in addition to generating these scripts maybe we want to add more tests in order to make sure those scripts based on text is correct so let's say here generate the sequel scripts and in addition to that we want to make more testing testing these scripts then during the release pipeline so a boost clips will be posted from the build to the release pipeline through the artifact and inside the release pipeline we want to do here as we have deployed the application unto the web server we want to deploy those sequel scripts and to our database so we'll add another step here and the release pipeline which we'll be deploying the sequel scripts the sequel scripts and to the database and maybe here I have also more tests I want to run maybe if I'm using sequel server then I want to run mighty sequel T is equal T those are unit tests to test the stored procedure and my database maybe I want to run those during the release pipeline and here the integration tests and the UI and QA tests they will validate not only the application but they will also validate the schema for the applique for the database so my database tests will be covered by the integration and UI tests and the same for the database for each of those different environments we'll have web app we have a different web app and the different database so on production we'll have web app here plus DB for the production environment and the same here we'll have web blast DB and the same for for dev so that we can make sure we have those different environments are isolated so we have talked about the developers the DBA now we still need to add a third third one here which who are the IT pro so let's add boost I used again different color I keep row or the the ops because the verbs is about the developers and the herbs so we need to add those and to this different pipelines the IT pros will care about the infrastructure that we run the application they will care about this Web up the database and maybe if I'm using some other components the root balancers virtual machines so they will care about provisioning those resources and they we'll make sure that the app will fit inside the created Emperor structure so the IT pro as the developers and the DBA they have their own source code files here maybe they are using some tools like tea reform for example which is which could be used in order to provision and freh structure and maybe they could also use our templates as resource manager in order to provision resources on Asia if they are using Amazon maybe they're using cloud formation so each ploud provider has its own technology in order to provision and maintain the infrastructure so they have their source code files happily they luckily if we are lucky enough they will put those files inside the source code management so we'll have the application source code the sequel scripts and also the infrastructure files and during the build pipeline maybe here we want to make sure or to validate those files for tea reform for example we want to run tea reform in it and the reform plan in order to check the changes that will be made by this template so here we say we want only to check the Alfre structure the answer files already an thourough config it won't deploy at this stage but it is just checking the sun tags of the the files then during the release pipeline boos terraform files or those armed templates they will be deployed and - or they will be used in order to prevent the opera structure so from here we go to say the goal here is to deploy the amphora config files if they are using cloud and they have a way to deploy those infrastructure onto the cloud another to provision the different resources that needed in order to run my application so this is the basics of the CI and CD pipelines at the end during the build or the CI pipeline you want to compile the app run some code static code analysis unit tests deal with the sequel scripts and the unfair config files then during the release the goal is to deploy into the different environments we have we talked about continuous integration and continuous deployment but here we mentioned only the builds and the release so what is the difference here we say if we say for example in each time I have a new git commit or git push to the source code management system I want to trigger the build then at that time this will be called the CI pipeline or for continuous integration and each time I have a new change I want to trigger the build pipeline so from here I can say for example this is this could be call it my CI pipeline and if in each time I have a new build or a new CI pipeline that runs then I want to run the release pipeline just after that then here it will be called the CD pipeline for continuous deployment and from here to go from the source code management to trigger the build pipeline we can define different strategies so we can go to say in each time I create a new comment or a new push to get I want to trigger the build or even better than this I can trigger the build and each time I have a new poll request because when we develop the application we don't want to use or to commit directly to the master branch but other than that we want to create a dev branch so here let's say you have a master and also then we'll have a dev a branch and for each developer we'll take a user story and he will develop that user story so he will go to create another branch from dev or from master so he will go to create a branch right here he will develop the application commits only on his own branch so this is will be called the feature ex branch and at the end when he finished committing or we finished developing his user story here he will go to create a pull request onto the master or the dev branch depending on what you are doing so let's say here for example he will commit and he will create the pull request onto the dev branch so here let's say this is going to be a pull request then just at this time we'll go to trigger the build pipeline and we can configure our CI CD tools in order to take into account the pull requests enough ups and addition to running the build and the release pipelines we need to worry also about another thing which is monitoring the application so after releasing the app introduce different environments maybe you want to make sure we can monitor the application in order to in order to be able to improve it so from this step right here we'll be able to see if the application is behaving as expected or not so this loop could be configured using a CIC do tools and here we can mention some of the most known tools for example Jenkins which is the most known CI CD tools we have also edger develops the tool created by Microsoft get lab also they have their own to get lab CI call it some other tools like circle see I for example go CD and many many other tools that could be used to implement this CI CD pipelines in order to create a process where the applications source code go through this process before going to the production environment so that we make sure that everything is automated you through using those different scripts and also they will be more confident when we deploy the application we don't need then we don't we we are not depending on the developers machines so I hope this explanation was helpful for you and thank you no that's not the end if I didn't yet asking you to follow me on Twitter on my handler is awesome delight that's the end thank you
Info
Channel: Houssem Dellai
Views: 76,714
Rating: undefined out of 5
Keywords: devops, ci, cd, build, release, continuous integration, continuous deployment, pipelines, lightboard
Id: XusC2o-Y_fU
Channel Id: undefined
Length: 20min 38sec (1238 seconds)
Published: Fri May 31 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.