How to Setup Docker Containers as Jenkins Build Agents (Step by Step guide for Beginners)

  Рет қаралды 31,759

DevopsCube

DevopsCube

Күн бұрын

Пікірлер: 72
@ashadujjaman_hiru
@ashadujjaman_hiru 2 жыл бұрын
Looking for series of jenkins. Please do not stop posting the videos
@sylvainatanga5387
@sylvainatanga5387 Жыл бұрын
Thanks for this wonderful video and explicit documentation on your block.
@praveshsudha439
@praveshsudha439 Жыл бұрын
I am going through your jenkins blog, the blogs are engaging and informative. Keep up the good work :)
@bulldozerbaba3830
@bulldozerbaba3830 2 жыл бұрын
Looking for more videos from you. Please do not stop posting the videos.
@devopscube
@devopscube 2 жыл бұрын
Hi Lovely, That's really a motivation. I will create more..thank you for the support! :)
@notyournormaldev1419
@notyournormaldev1419 2 жыл бұрын
@@devopscube will these things work with my jenkins running as a docker container.
@mehransaeed7207
@mehransaeed7207 Жыл бұрын
Hi. quick question. can we use the same server to host jenkins master and docker
@devopscube
@devopscube Жыл бұрын
Yes. But I wouldn't recommend it.
@chandu806021
@chandu806021 4 жыл бұрын
Very good explanation.
@devopscube
@devopscube 3 жыл бұрын
Thanks, Chanrasekar..
@shiningshaan
@shiningshaan Жыл бұрын
Excellent video
@jalandharbehera99
@jalandharbehera99 5 ай бұрын
Wow its very much informative video
@vinaynan
@vinaynan 4 жыл бұрын
Very Good Explanation....
@NattaWang
@NattaWang 9 ай бұрын
I've tried for the whole night for this tutorial, but it still couldn't start the agent. 😿
@gerry709
@gerry709 6 ай бұрын
Thanks for this video, there is a way to pull image from a repository such us Nexus Repository?
@peterwoo2718
@peterwoo2718 10 ай бұрын
I couldn't figure out how to run and connect with the jnlp agent in jdk 11 environment, and why docker's creating a agent every 10 secs on my host?
@RapperRank
@RapperRank 2 жыл бұрын
Am i missing something? I've followed the setup but i just keep getting error whatever ip i use in Jenkins. I have Jenkins running as a war file not in docker and its running on virtualbox Ubuntu. Does the tcp://ip need to be a public ip for Jenkins to work or can i connect to docket host uri with the virtualbox ip?
@magrag1987
@magrag1987 2 жыл бұрын
How to make Jenkins to run another docker container inside the slave container. I have attached volume docker.sock to the slave container but still not able to do it
@adrianaranda4560
@adrianaranda4560 2 жыл бұрын
Hello, first of all, thank you very much for your videos. I have a jenkins server as a docker container. I have setup a remote server for the docker api and I am able to do the curl using the IP or hostname from the jenkins server instance, and even from inside the container. I am getting a response similar to yours. But, when I configure the docker agent in Jenkins and press Test connection I get the following error: A problem occurred while processing the request. Any clue on this error or how to find more details about it? I am just configuring the host URI just like you with tcp://:4243 Thank you!
@amarlukade2225
@amarlukade2225 3 жыл бұрын
Could you please make - video on docker pipeline .. end to end software dilivery project taking some live example ..
@devopscube
@devopscube 3 жыл бұрын
HI Amar,, There is a plan to publish an entire CI/CD tutorial using Docker, Jenkins & Kubernetes which explains a real world project example...
@ravishukla85
@ravishukla85 2 жыл бұрын
@devopscube Can we use these steps to create the windows docker container as slave for Jenkins?
@cloudmasterlive
@cloudmasterlive 2 жыл бұрын
A beautiful video. Thank You for creating this. Is it possible to have master node onprem and slave in AWS with VPN? Will it autoscale or need to create slave node manually? Please help.
@devopscube
@devopscube 2 жыл бұрын
Glad it helped..You can do that as long as there is connectivity on required ports through VPN. You might experience bit of latency if the corporate VPN is not setup for high speed connections.
@Rahul-hx9dz
@Rahul-hx9dz 7 ай бұрын
How to use pipeline groovy script option instead of freestyle project?
@lakshmipasala9091
@lakshmipasala9091 2 жыл бұрын
Thanks for video, but i am unable to run docker commands inside agent.. can you help me with this please
@zainsiddiqui6657
@zainsiddiqui6657 3 жыл бұрын
Good explanation
@harkiratsingh5253
@harkiratsingh5253 3 жыл бұрын
how did you install jenkins master - is it running as a docker container itself ?
@devopscube
@devopscube 2 жыл бұрын
For the demo no. But you can run it in a container as well.
@rocketbox9
@rocketbox9 2 жыл бұрын
Hi, congratulations... one question : Is ok for jenkinsfile with stages docker?
@notyournormaldev1419
@notyournormaldev1419 2 жыл бұрын
Will these things work with jenkins as a container
@jagadish86
@jagadish86 2 жыл бұрын
Great video Rather than manually creating new cloud machine is their any rest API or automated way to create them... I have requirment to create 30 of them dynamically... Please let me know your thoughts
@jagadish86
@jagadish86 2 жыл бұрын
Hello, Great Video, i wanted to know similar to how you manually configured cloud node, can we do this via rest api. Plan is to create / delete cloud node via rest api
@raghavendramagalam8289
@raghavendramagalam8289 2 жыл бұрын
Can I mention agent as any if i want to use Jenkins itself as docker host.
@devopscube
@devopscube 2 жыл бұрын
I believe no... You need to pick a specific docker template that needs to be deployed. If you want to use the master node, install docker on master and configure the api. I wouldnt suggest it for actual project implemention. For testing its ok.
@rahulrale9722
@rahulrale9722 6 ай бұрын
Hey can use docker daemon from windows vm
@jamescoder3997
@jamescoder3997 3 жыл бұрын
When i tried to install docker in your given docker image and in volume giving /var/run/docker.sock:/var/run/docker.sock then also I am getting Bad Message 414 reason: URI Too Long
@sameergoyal6353
@sameergoyal6353 2 жыл бұрын
Good one
@putinscat1208
@putinscat1208 3 жыл бұрын
I got the same steps running. But when I ran a pipeline project using agent { docker {, the console says docker: not found. It's like it is running a docker container, and then tries to run docker from it?
@nandiniachugatla932
@nandiniachugatla932 9 ай бұрын
yes
@ishikamandloi4215
@ishikamandloi4215 3 жыл бұрын
Sir i am getting error ssh connection failed can you pls guid further
@ganeshchowdhary3024
@ganeshchowdhary3024 3 жыл бұрын
SSH slave docker file is ubunut but i need to set up the same in windows. Do you have the similar ssh slave docker file for windows?
@devopscube
@devopscube 2 жыл бұрын
not at the moment!
@rocketbox9
@rocketbox9 2 жыл бұрын
9:32 hello I have a question because in the url is the PRIVATE ip of the docker host server? because when you modified the service you tried with localhost and with the public ip so I understand that the url you put is the private ip of the docker host server? ip private docker host 6:04 not same
@vireshsolanki584
@vireshsolanki584 Жыл бұрын
it because public changes everytime we start our ec2 machine
@rubenpetrosyan2341
@rubenpetrosyan2341 3 жыл бұрын
thanks
@jamescoder3997
@jamescoder3997 3 жыл бұрын
My docker host is installed in windows machine and I am not able to find docker.service file. Can you please help me on that?
@manikantajayavarapu6009
@manikantajayavarapu6009 11 ай бұрын
Same issue to me.Could you please confirm how to overcome this issue.
@quangminhpham3819
@quangminhpham3819 2 жыл бұрын
What is username of your authorized keys in Dockerfile? Do I need to create a Jenkins user on my host machine so that I can copy that key to slave container?
@devopscube
@devopscube 2 жыл бұрын
Hi Quang, The default ssh username is jenkins and the password is also jenkins as per the given Dockerfile Please refer this doc: devopscube.com/docker-containers-as-build-slaves-jenkins/
@premprataptiwari2912
@premprataptiwari2912 2 жыл бұрын
Kindly, Please tell me about the ssh credential how did u create it or randomly given anything
@devopscube
@devopscube 2 жыл бұрын
Please refer devopscube.com/docker-containers-as-build-slaves-jenkins/
@amarlukade2225
@amarlukade2225 3 жыл бұрын
my job ran on docker-slave which i made ..but I am not able to find any containers created under it ? does it mean - it creates, run commands and delete once complete ?
@devopscube
@devopscube 3 жыл бұрын
HI Amar,,,yes..Docker agents are ephemeral...it gets deleted when the job completes...During the build process, if you do a "docker ps" on the node, you will see a running container.
@h.rpareek5243
@h.rpareek5243 4 жыл бұрын
i want to achieve following , can you help how to do it 1. jenkins up and running on one ec2 instance 2. now from running jenkins, want to add a job which should do following - create a container in ec2 instance - it should create the container from an image in git. - then perform the commands i mention in BUILD section. - once my commands done, kill the container. can we do it, if yes, please help me with steps , highly appreciated the help.
@devopscube
@devopscube 4 жыл бұрын
If you combine this tutorial and this one devopscube.com/run-docker-in-docker/. You should be able to achieve it.
@takhiabedsarkil5082
@takhiabedsarkil5082 4 жыл бұрын
why did you used 4243 port instead of standard 2375 or 2376 ports for tcp connection?
@devopscube
@devopscube 4 жыл бұрын
Hi Taki, ther is not specific reason for using 4243... you can use 2375 as well..
@Big99Joe
@Big99Joe 3 жыл бұрын
Why is the range of the port's so big?
@devopscube
@devopscube 3 жыл бұрын
HI Joe, Because the containers launched will assign a random port in that range.
@ganeshchowdhary3024
@ganeshchowdhary3024 3 жыл бұрын
Getting connection refused from jenkins master
@devopscube
@devopscube 2 жыл бұрын
Please check the firewall and configurations
@girishananda3611
@girishananda3611 3 жыл бұрын
Incomplete info
@devopscube
@devopscube 3 жыл бұрын
@girish What info is missing? could you please eloborate
@peterwoo2718
@peterwoo2718 10 ай бұрын
I encountered below errors while following your steps -- [01/10/24 10:58:47] [SSH] Starting agent process: cd "/home/jenkins" && java -jar remoting.jar -workDir /home/jenkins -jar-cache /home/jenkins/remoting/jarCache Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.UnsupportedClassVersionError: hudson/remoting/Launcher has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:756) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) at java.net.URLClassLoader.access$100(URLClassLoader.java:74) at java.net.URLClassLoader$1.run(URLClassLoader.java:369) at java.net.URLClassLoader$1.run(URLClassLoader.java:363) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:362) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601) Agent JVM has terminated. Exit code=1 [01/10/24 10:58:47] Launch failed - cleaning up connection [01/10/24 10:58:47] [SSH] Connection closed.
How to Use Kubernetes Pods As Jenkins Agents
25:15
CloudBeesTV
Рет қаралды 58 М.
Happy birthday to you by Secret Vlog
00:12
Secret Vlog
Рет қаралды 6 МЛН
How Much Tape To Stop A Lamborghini?
00:15
MrBeast
Рет қаралды 201 МЛН
ТВОИ РОДИТЕЛИ И ЧЕЛОВЕК ПАУК 😂#shorts
00:59
BATEK_OFFICIAL
Рет қаралды 5 МЛН
Миллионер | 3 - серия
36:09
Million Show
Рет қаралды 1,8 МЛН
How to Setup Docker Containers As Build Agents for Jenkins
9:43
CloudBeesTV
Рет қаралды 77 М.
Learning Docker // Build Container Images
23:02
Christian Lempa
Рет қаралды 35 М.
How to Create an Agent Node in Jenkins
23:57
CloudBeesTV
Рет қаралды 99 М.
100+ Docker Concepts you Need to Know
8:28
Fireship
Рет қаралды 1 МЛН
you need to learn Docker RIGHT NOW!! // Docker Containers 101
23:19
NetworkChuck
Рет қаралды 2,7 МЛН
The intro to Docker I wish I had when I started
18:27
typecraft
Рет қаралды 242 М.
Happy birthday to you by Secret Vlog
00:12
Secret Vlog
Рет қаралды 6 МЛН