Create Your Own Build Pipelines with OpenShift 3.3, Part II

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
you hello welcome to the second video on using pipelines with openshift version 3.3 in the last video we have seen how to create a simple pipeline within the scope of a single project and create an application and deploy it in OpenShift 3 or 3 in this video we'll edit that pipeline a little bit to go across the projects so we'll have a development project where we will do a build and deployment and we will have a testing project we will where we'll just pull the image that was built in the development project and deployed there so in order to do that the stretching project would need image full access from the development projects image stream now last time we had a CI CD project where the Jenkins pipeline was running that pipeline will continue to run at the same place so we'll have Jenkins running there and the Jenkins would require edit access to both the development project and the testing project to be able to do a build and deploy in the development and the deployment in the testing product so now I am in the CI CD project I have cleaned up this project to remove the application my PHP that we used earlier let's go to the pipeline and edit this pipeline so I'm making a few changes here first I'll call this first step as stage in development and the deploy as stage a deploy in development I will add another stage called stay deploy in testing I change the name of the build conflict of my app just to show that we can use any name you want and while we are working the development project we want the Jenkins running in the scope of the CI CD project to initiate a build in the development namespaces so we are going to load double and Fred applaud a QA I'm adding a couple of steps here first we've tagged the email stream in the development namespace the source image stream is my app we'll pick up the latest one and we'll tag it as my AB column promote to QA once the tagging is complete we will deploy in the testing namespace a deployment configuration with my app and we'll create this deployment configuration using the promoter cue attack once the deployment is complete we'll scale up this application to three instances so those are the few changes we made to this pipeline so we have three stages in the pipeline building development deploying development and then take the same image and deploy in testing now let's create the development and testing pilots I am creating a project with the name development now I am calling providing access to a service account with named Jenkins in the scope of that is in the scope of CI CD Projekt this service account is used to run Jenkins application in the CI CD project so we are giving this Jenkins service account and edit role to the development project which means Jenkins service account can initiate the bills and deployments in the development project in the same way I'll create a project call testing and provide Jenkins service account edit role to the testing project as well we also need to provide image fuller access to the testing project to be able to pull from the development project now let's go back and check on the console we have the two projects development and testing the new ones that we added this time so the development project is just created and it is empty so in order for the pipeline to work the pipeline is expecting a build configuration and the deployment configuration here just like in first video so I am going to do the same exact thing as what we did the first video add the build configuration deployment configuration for that my app I have the service here I have the route I have built configuration I have image stream I have the deployment configuration now let's move on to the testing product the testing project is also empty the pipeline is expecting a deployment configuration with the name my app in the testing project as well and this my app should pull the image that is tagged as promote to QA from the development project so in order to create the deployment configuration let's use command line first I'll switch through the testing project now we'll type in a command that creates a deployment configuration with the name my app this is what the pipeline is expecting and this uses the image my app with the tap remote - QA from the development projects image stream so this is the image stream from which it will try to pull and deploy the application when I create this it will immediately try to start deploying it but it will fail because there is no my app there with a promoter queue attack now I'll create a service and create a route by exposing the service let's go back to web console here is a service my app and the route for that service is trying to do a deployment I am going to cancel this build we'll also make a couple of small changes to this deployment configuration first I will remove this trigger so whenever there is a config change it will not automatically figure in your deployment and I will change this image full policy to always so that it doesn't use the image from cache when Jenkins invokes this deployment configuration tool for a new deployment now let's switch over to the CI CD project and start a pipeline here I'll start this pipeline now starting a new build the building deployment which is a first stage just got started this should invoke a new build in the development project so let's switch over to the development project and see look at the bills there is a new build that got started here are the logs it's trying to download the source code so this bill was started by Jenkins from the CI CD project in the development project the build is now complete and this triggering a deployment let's go back and check in the development project it's deploying now it is scaling up to do part now that the scale-up is complete let's try this URL which was a green rose let's go back and look at our white line the deployment of testing is also complete so let's go and look at the testing project here are our three parts so let's test it again in the testing product so this testing URL is also pointing to the green part now let's go back to our pipeline and actually let's see in the core I'm painting this tribute rose now commit the changes and will initiate the pipeline again the build in development has started again the deployment in development is in progress so now it is doing a rolling the plant let us check the application it shows a blue rose this is in the development project now I will go to testing rolling deployment is in progress deployment is complete and it shows a blue rose in the testify the crosswalk so going back to the pipeline the second build is also complete all the three stages so it was a simple example of how you can edit your pipelines to go across different projects I'll post the build configuration file and the jenkins file that i used both in the previous video in this video on github and i put it along with the blog post that accompanies this video i hope you have enjoyed this video thanks a lot for watching
Info
Channel: OpenShift
Views: 10,207
Rating: 4.9444447 out of 5
Keywords: OpenShift 3, CI/CD
Id: tUqwKQsHLkY
Channel Id: undefined
Length: 8min 49sec (529 seconds)
Published: Fri Oct 07 2016
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.