Thanks for the explanation and can you please help me with how to decide whether which runners has to be decided ? and also when i try to hit the wget with the required rpm it is saying connection error to download? please suggest to resolve
Hi @Prabhu ilamathihere, here I am considering that you want to know that out of shared runner, group runner and specific runner which runner to choose. Though there is no standard thumb rule but from my perspective comments are as below: There are few criteria based on which we can decide: • Accessibility of runner : ◦ Is a runner accessible by all the members, particular group of projects or a specific project only. ▪ If a runner needs to be accessible by all the members than we can go for shared runner. ▪ If a runner needs to be accessible by group of projects only than we can go for group runner. ▪ If a runner needs to be accessible by specific project only than we can go for specific runner. • Availability of runner / Priority of CICD execution: ◦ If a project’s cicd pipeline needs to be executed asap without delay go with specific runner. ◦ Group Runner works on the principal of FIFO so if a project’s pipeline can be delayed for certain time than you can go for it. ◦ Shared Runner’s principal to do the job is fair usage algorithm you can read more about it here docs.gitlab.com/ee/ci/runners/#how-shared-runners-pick-jobs so again if a project’s pipeline can be delayed for certain time period than you can go for it. • Freedom of runner creation : ◦ Shared runner can be created by either system admin if setup on local server or by GitLab if using GitLab’s shared runner. ◦ Group runner and Specific runner can be created by individuals. • Execution time of CI-CD pipeline : ◦ If execution time of ci-cd pipeline is more then go for Specific runner else you can go for Group/Shared Runner. • CICD Deployment Machine ◦ Lets say we have 10 projects of out of which 9 projects’ CICD will be deployed on X machine and 1 projects’ CICD will be deployed on Y machine in this case for 1 project you can go for specific runner whereas for 9 projects if they have quite common deployment mechanism one can go for Group/Shared runner else they will again require 9 specific runners on X machine. Regarding the wget issue if possible can you please mail [wildest.imagination@outlook.com] me the screenshot of the error.
Enter The Executor Step and Purpose: Whenever you are registering any new runner it needs to mention any executor to run steps mentioned in .yml file. Its kind of medium / tool through which we want to execute all the steps mentioned in .gitlab-ci.yml file. Without executor it is not possible to complete Ci-Cd pipeline, so it is an integral part of Ci-Cd mechanism. How it will come in effect: There are 6 mediums which are right now being supported by GitLab which will work as executors and GitLab also supports custom executors as well which can be defined by individuals on their own. All the executors have their own advantages and disadvantages. Let me explain it with "Shell" as an executor. Let's say you have Ubuntu as host machine and target machine. Now on your target machine when you install and register a runner with shell as an executor, by default it will create a directory by the name gitlab-runner and whatever Ci-Cd steps you have mentioned in .yml file on host machine will be carried out under this directory on target machine. Now let's assume that you have written a python script which will fetch the data from some website and will store the data as csv in the current directory. To run the same script on target machine without human intervention we have installed gitlab-runner on target machine with shell as an executor. Next step is you need to write a shell script file in the same directory where python script has been written. It will be on the host machine. This shell script on target machine will check if python is installed or not if not it will install python, then it will check if required packages have been installed or not and if not it will install the required packages as well and then will finally run the python script. The runner on target machine will check for every n interval if there is any pipeline that needs to be executed on target machine or not so once you have written a shell script and push it to the repo with python script it will trigger runner on the target machine [you have to mention this runner name in your .gitlab-ci.yml file and you also need to include the shell script that you have written in this .yml file] to run the shell executor which in turn will run shell script and steps mentioned in it. Hope it has provided what you are looking for. I will suggest to visit the below links: docs.gitlab.com/runner/ docs.gitlab.com/runner/executors/ docs.gitlab.com/runner/executors/custom.html - In case you need to create custome executor th-cam.com/video/ZAFtrgbZ-Qg/w-d-xo.html th-cam.com/video/70UGMTDMbNA/w-d-xo.html
Hi Raghavendra, please watch the video available on below link if not already watched. th-cam.com/video/ZAFtrgbZ-Qg/w-d-xo.html The general steps should be as follows considering you are going to deploy cicd on debian or its derivatives os machine: 1. python -V > /dev/null 2>&1 Check if python has been installed or not. 2. if [ $? == 0 ] then echo "Python is installed" else echo $password | sudo -S apt install python -y echo "Python has been installed" fi To install the python if not already installed. 3. cd folder_of_python_application ls | grep "venv" > /dev/null 2>&1 if [ $? == 0 ] then echo "Python vevn available" source venv/bin/activate else virtualenv -p python3 venv source venv/bin/activate pip install -r req.txt echo "Python venv has been installed with req.txt" fi Change the folder where python app / scripts available. Check if virtual environment is available or not. If not create the virtual environment and then finally install the packages from requirements.txt file.
Hi Raghavendra, at first glance it seems the issue of other service being run on 80 port which will be mostly nginx or apache web server but it might be other service as well. On windows you can run netstat -aon | findstr :80 and on linux you can run sudo lsof -i:80 to get the service running on 80 port. Here you have two choices, one is to kill the service running on 80 port and another one is to change the port in your test script.
in my organisation, i dont find any Server in azure portal. So that means in HOST machine they might installed Gitlab runner. so how can i deploy the image from ACR to Azure App serviceS? is my understand is Right ? plz tel me if i am wrong
Hi GitLab runner will always required to be installed on the guest machine where we want to do CI-CD deployment. Here we have 2 concepts first is to use GitLab for CI-CD and second is to use Azure App Service itself for CI-CD. You can follow below URLs which will clear your doubts. docs.microsoft.com/en-us/azure/app-service/deploy-continuous-deployment?tabs=github techcommunity.microsoft.com/t5/azure/setup-gitlab-continuous-ci-cd-on-azure/m-p/811100 code.visualstudio.com/docs/containers/app-service docs.microsoft.com/en-us/azure/app-service/tutorial-custom-container?pivots=container-linux docs.microsoft.com/en-us/learn/modules/deploy-run-container-app-service/
@@NayankumarGajjarIs it mandatory that we must create a Virtual machine in AZURE CLOUD or can we use WEB app service to deploy? I am little bit confused with this.
Nope its not mandatory to use virtual machine. You can use it with web app service as well. docs.microsoft.com/en-us/azure/architecture/solution-ideas/articles/azure-devops-continuous-integration-and-continuous-deployment-for-azure-web-apps
Thanks! Good overview of basic GitLab Runner setup
Thank You.
very clear man, thank you
Thank You.
Thank u💫
Welcome
Thanks for the explanation and can you please help me with how to decide whether which runners has to be decided ? and also when i try to hit the wget with the required rpm it is saying connection error to download? please suggest to resolve
Hi @Prabhu ilamathihere, here I am considering that you want to know that out of shared runner, group runner and specific runner which runner to choose. Though there is no standard thumb rule but from my perspective comments are as below:
There are few criteria based on which we can decide:
• Accessibility of runner :
◦ Is a runner accessible by all the members, particular group of projects or a specific project only.
▪ If a runner needs to be accessible by all the members than we can go for shared runner.
▪ If a runner needs to be accessible by group of projects only than we can go for group runner.
▪ If a runner needs to be accessible by specific project only than we can go for specific runner.
• Availability of runner / Priority of CICD execution:
◦ If a project’s cicd pipeline needs to be executed asap without delay go with specific runner.
◦ Group Runner works on the principal of FIFO so if a project’s pipeline can be delayed for certain time than you
can go for it.
◦ Shared Runner’s principal to do the job is fair usage algorithm you can read more about it here
docs.gitlab.com/ee/ci/runners/#how-shared-runners-pick-jobs so again if a project’s pipeline can be
delayed for certain time period than you can go for it.
• Freedom of runner creation :
◦ Shared runner can be created by either system admin if setup on local server or by GitLab if using GitLab’s
shared runner.
◦ Group runner and Specific runner can be created by individuals.
• Execution time of CI-CD pipeline :
◦ If execution time of ci-cd pipeline is more then go for Specific runner else you can go for Group/Shared
Runner.
• CICD Deployment Machine
◦ Lets say we have 10 projects of out of which 9 projects’ CICD will be deployed on X machine and 1 projects’
CICD will be deployed on Y machine in this case for 1 project you can go for specific runner whereas for 9
projects if they have quite common deployment mechanism one can go for Group/Shared runner else they will
again require 9 specific runners on X machine.
Regarding the wget issue if possible can you please mail [wildest.imagination@outlook.com] me the screenshot of the error.
Awesome explanation
Glad you liked it
please explain the "enter the executor" step and its purpose and how it will come in effect
Enter The Executor Step and Purpose:
Whenever you are registering any new runner it needs to mention any executor to run steps mentioned in .yml file. Its kind of medium / tool through which we want to execute all the steps mentioned in .gitlab-ci.yml file. Without executor it is not possible to complete Ci-Cd pipeline, so it is an integral part of Ci-Cd mechanism.
How it will come in effect:
There are 6 mediums which are right now being supported by GitLab which will work as executors and GitLab also supports custom executors as well which can be defined by individuals on their own.
All the executors have their own advantages and disadvantages.
Let me explain it with "Shell" as an executor.
Let's say you have Ubuntu as host machine and target machine. Now on your target machine when you install and register a runner with shell as an executor, by default it will create a directory by the name gitlab-runner and whatever Ci-Cd steps you have mentioned in .yml file on host machine will be carried out under this directory on target machine.
Now let's assume that you have written a python script which will fetch the data from some website and will store the data as csv in the current directory. To run the same script on target machine without human intervention we have installed gitlab-runner on target machine with shell as an executor.
Next step is you need to write a shell script file in the same directory where python script has been written. It will be on the host machine. This shell script on target machine will check if python is installed or not if not it will install python, then it will check if required packages have been installed or not and if not it will install the required packages as well and then will finally run the python script.
The runner on target machine will check for every n interval if there is any pipeline that needs to be executed on target machine or not so once you have written a shell script and push it to the repo with python script it will trigger runner on the target machine [you have to mention this runner name in your .gitlab-ci.yml file and you also need to include the shell script that you have written in this .yml file] to run the shell executor which in turn will run shell script and steps mentioned in it.
Hope it has provided what you are looking for. I will suggest to visit the below links:
docs.gitlab.com/runner/
docs.gitlab.com/runner/executors/
docs.gitlab.com/runner/executors/custom.html - In case you need to create custome executor
th-cam.com/video/ZAFtrgbZ-Qg/w-d-xo.html
th-cam.com/video/70UGMTDMbNA/w-d-xo.html
Nice explanation
Thank You.
Hi, wat are the commands to use in build pipeline for a python application in cicd pipeline?
Hi Raghavendra, please watch the video available on below link if not already watched.
th-cam.com/video/ZAFtrgbZ-Qg/w-d-xo.html
The general steps should be as follows considering you are going to deploy cicd on debian or its derivatives os machine:
1. python -V > /dev/null 2>&1
Check if python has been installed or not.
2. if [ $? == 0 ]
then
echo "Python is installed"
else
echo $password | sudo -S apt install python -y
echo "Python has been installed"
fi
To install the python if not already installed.
3. cd folder_of_python_application
ls | grep "venv" > /dev/null 2>&1
if [ $? == 0 ]
then
echo "Python vevn available"
source venv/bin/activate
else
virtualenv -p python3 venv
source venv/bin/activate
pip install -r req.txt
echo "Python venv has been installed with req.txt"
fi
Change the folder where python app / scripts available. Check if virtual environment is available or not. If not create the virtual environment and then finally install the packages from requirements.txt file.
@@NayankumarGajjar thankyou very much sir.
And i am facing one issue like when i am running test scripts i am not able to connect to port 80, what might be the problm? Any idea
Hi Raghavendra, at first glance it seems the issue of other service being run on 80 port which will be mostly nginx or apache web server but it might be other service as well.
On windows you can run netstat -aon | findstr :80 and on linux you can run sudo lsof -i:80 to get the service running on 80 port.
Here you have two choices, one is to kill the service running on 80 port and another one is to change the port in your test script.
@@NayankumarGajjar ok thankyou , i will try now.
in my organisation, i dont find any Server in azure portal. So that means in HOST machine they might installed Gitlab runner. so how can i deploy the image from ACR to Azure App serviceS? is my understand is Right ? plz tel me if i am wrong
Hi GitLab runner will always required to be installed on the guest machine where we want to do CI-CD deployment. Here we have 2 concepts first is to use GitLab for CI-CD and second is to use Azure App Service itself for CI-CD. You can follow below URLs which will clear your doubts.
docs.microsoft.com/en-us/azure/app-service/deploy-continuous-deployment?tabs=github
techcommunity.microsoft.com/t5/azure/setup-gitlab-continuous-ci-cd-on-azure/m-p/811100
code.visualstudio.com/docs/containers/app-service
docs.microsoft.com/en-us/azure/app-service/tutorial-custom-container?pivots=container-linux
docs.microsoft.com/en-us/learn/modules/deploy-run-container-app-service/
@@NayankumarGajjar Ok sure and thankyou ...
@@NayankumarGajjarIs it mandatory that we must create a Virtual machine in AZURE CLOUD or can we use WEB app service to deploy?
I am little bit confused with this.
Nope its not mandatory to use virtual machine. You can use it with web app service as well.
docs.microsoft.com/en-us/azure/architecture/solution-ideas/articles/azure-devops-continuous-integration-and-continuous-deployment-for-azure-web-apps
@@awsservices8144 Welcome
thanks a lot
Welcome
നന്ദി
Welcome
Background noise.. please record clearly
Thanks. Yes with new videos I am trying my level best to reduce the background noise.