Configure GitLab CI Runner with Docker executor using AWS EC2

Поделиться
HTML-код
  • Опубликовано: 16 дек 2024

Комментарии • 108

  • @tonyBeloni
    @tonyBeloni Год назад +4

    After wasting several hours trying to get the my pipeline working - was failing on the "dind" service - this video saved the day. Thanks a lot Valentin - love your presentation skills and technical insights 👍

    • @vdespa
      @vdespa  Год назад

      Thanks, Tony. I'm glad this saved you a few hours ;)

  • @ARRABELLO
    @ARRABELLO 2 года назад +1

    The best vídeo of all youtube to learn CI CD !!!

    • @vdespa
      @vdespa  2 года назад

      Glad that it helped. Thank you for leaving a comment.

  • @rohitw548
    @rohitw548 2 года назад +2

    Your Tips and Tricks have helped me so much. as a result of which I have now Powerful automation sitting in Jenkins . You are Fabulous. God Bless You

    • @vdespa
      @vdespa  2 года назад

      Great to hear! I am glad that it was helpful.

  • @shavis4811
    @shavis4811 10 месяцев назад

    Very clear and concise tutorial.

    • @vdespa
      @vdespa  10 месяцев назад

      Glad you think so! Thank you for leaving a comment.

  • @brincolnar5191
    @brincolnar5191 Год назад +1

    Thank you, not only does it work but you also nicely explained it!

    • @vdespa
      @vdespa  Год назад +1

      Glad to hear that. You are welcome. Thank you for leaving a comment.

  • @NIVI800
    @NIVI800 2 года назад +1

    Thanks!

    • @vdespa
      @vdespa  2 года назад

      You are welcome. Thank you for leaving a comment.

  • @wendel1210
    @wendel1210 Год назад +1

    that video is absolutely gold

    • @vdespa
      @vdespa  Год назад

      Glad you liked it. You are welcome. Thank you for leaving a comment.

  • @dambujopaulo4204
    @dambujopaulo4204 2 года назад +1

    Wow first to comment 🤪... Great start I think will be great tutorial

    • @vdespa
      @vdespa  2 года назад

      Thank you so much 😁

  • @vignesh3405
    @vignesh3405 Год назад +1

    Thank you valentin. I was stick in this place from past one week it made me happy. Also i liking your teaching style and showing us what happing in background with error this may helpful for every one when they follow this tutorial if they get any error like this. Error and pactice is make way for us to learn more. Please create this type of content that may help us to learn new things.
    I suggest to you to create docker full tutorial for beginners to get into devops practice.
    Thank you so much for sharing your knowledge to us.☺️

    • @vdespa
      @vdespa  Год назад

      You are welcome. Thank you for leaving a comment.

  • @tensetv
    @tensetv 2 года назад +1

    Thank you so much man! The privilege error fix helped me a lot!

    • @vdespa
      @vdespa  2 года назад

      You are welcome. Thank you for leaving a comment.

  • @sohampatel5805
    @sohampatel5805 2 года назад

    You made my day bro......Thanks Buddy......

    • @vdespa
      @vdespa  2 года назад

      My pleasure! You are welcome. Thank you for leaving a comment.

  • @GabrielPyron
    @GabrielPyron 2 года назад +1

    help me alot, I bought some of your curses and on the gitlab course I was looking for this information, thanks

    • @vdespa
      @vdespa  2 года назад

      Great to hear!
      You are welcome. Thank you for leaving a comment.

    • @GabrielPyron
      @GabrielPyron 2 года назад

      @@vdespa one doubt, im doing it into a internal lab using the gitlab community for study. My pipelines is getting stuck initializing the git repository. We have to manually configure the git client on runner?

    • @vdespa
      @vdespa  2 года назад

      @@GabrielPyron Yes, the runner needs to have access to Git.Is the runner on Windows or Linux?

    • @GabrielPyron
      @GabrielPyron 2 года назад

      @@vdespa thanks for reply, I found the solution. The main problem is the installed version of gitlab thats conflicts with gitlab runner. So I updated the gitlab and it back to work as expected.
      Thanks

  • @frankreich5018
    @frankreich5018 Год назад +1

    Awesome video. Keep going.

    • @vdespa
      @vdespa  Год назад

      You are welcome. Thank you for leaving a comment.

  • @luongminhhoang2341
    @luongminhhoang2341 6 месяцев назад

    Great instructor

    • @vdespa
      @vdespa  6 месяцев назад

      Glad you think so! Thank you so much.

  • @ThomasKanzig
    @ThomasKanzig Год назад +1

    Really good tutorial.
    You helped me a lot.
    Thanks.

    • @vdespa
      @vdespa  Год назад

      Glad it helped! You are welcome. Thank you for leaving a comment.

  • @cattayswift
    @cattayswift Год назад

    Great tutorial, subscribed

    • @vdespa
      @vdespa  Год назад

      Awesome, thank you!

  • @OsascogamingBrSP
    @OsascogamingBrSP Год назад +1

    Thank you Valentin!

    • @vdespa
      @vdespa  Год назад

      You are welcome. Thank you for leaving a comment.

  • @manfredmann1905
    @manfredmann1905 2 года назад +1

    Thanks, It was very helpful.

    • @vdespa
      @vdespa  2 года назад

      You are welcome. Thank you for leaving a comment.

  • @HaPham-mk6od
    @HaPham-mk6od 2 года назад +1

    Thanks, It was very helpful. Still waiting for your new videos.

    • @vdespa
      @vdespa  2 года назад

      You are welcome. Thank you for leaving a comment.

  • @ShubhamChaurasia-p8d
    @ShubhamChaurasia-p8d 11 месяцев назад

    Thanks, it is working for me. Can you also do the same thing for deployment on EKS after building the image?

  • @usmansaeed9377
    @usmansaeed9377 Год назад

    Valentine, thank you for the excellent tutorial; it has been incredibly informative. However, I'm encountering an issue while attempting to execute Docker in detached mode using the command 'docker run -d ' and utilizing Docker-in-Docker as a service with the Docker executor. Although the job appears to complete successfully within the pipeline logs, I'm unable to find the running container when using the 'docker ps' command on the GitLab-runner host. Is there a method to run containers in detached mode using the Docker executor with Docker-in-Docker?

  • @marklong6572
    @marklong6572 2 года назад +1

    Thank you so much for this. What would be a production ready setup?

    • @vdespa
      @vdespa  2 года назад +1

      Mark, this largely depends on your organization needs. For personal projects, this setup is enough to get you started. However, for an organization, let the IT operations team handle this.

  • @tkmania1
    @tkmania1 2 года назад +1

    Thanks Valentin for the great tutorial. I'm a bit confused when it comes to Docker in Docker image. I see when you registered the runner, you mentioned alpine image and when you ran the test job you mentioned alpine image as well, but in build job you mentioned "docker" image and in services section you used "docker:dind". I don't understand which image is used at which stage and is the docker container ran on the gitlab runner server (EC2 instance) or inside another container. Can you please explain which image is used at which stage and which image value overrides the others and where the container is ran.

    • @vdespa
      @vdespa  2 года назад +1

      Check the job logs, they will tell you which image is being used. docker:dind is a service that allows you to interact with the Docker daemon. Try removing it to see what happens.

  • @kumaresanperumal2581
    @kumaresanperumal2581 Год назад +1

    Thanks bro

    • @vdespa
      @vdespa  Год назад

      You are welcome. Thank you for leaving a comment.

  • @messysoulinjapan8755
    @messysoulinjapan8755 2 года назад

    Hey Valentin Thankyou very much for the simplified explanation...I was having one doubt ....What if I want to Pull Docker image from Azure Container Registry......Do I need to Specify Image path of container registry during Runner registration step and in the .gitlab.ci.yaml file

    • @vdespa
      @vdespa  2 года назад

      You need to specify that in your YAML file.

  • @yesubabupataballa4867
    @yesubabupataballa4867 2 года назад +1

    Thanks for doing this. Would you mind doing DB migrations with Sql server , flyway, and GitLab CICD pipeline?

    • @vdespa
      @vdespa  2 года назад +1

      Thanks for your suggestion. I will look into it. Is there something in particular that does not work for you?

  • @hanrin062
    @hanrin062 Год назад

    Thankyou dude

    • @vdespa
      @vdespa  Год назад

      No problem. You are welcome. Thank you for leaving a comment.

  • @jun-uen0
    @jun-uen0 2 года назад

    Thank you, Valentin! This tutorial is extremely interesting and helpful for me, and my job.
    I have a question, how come we installed “git”? I could not find any command using git.

    • @vdespa
      @vdespa  2 года назад +1

      How about cloning the project files using Git?

    • @jun-uen0
      @jun-uen0 2 года назад

      @@vdespa I get it. That’s right. I was just wondering if I can remove installing git if my team doesn’t need to clone during the CI. Thank you for answering my question!

  • @joepinto5066
    @joepinto5066 Год назад

    hi, and about security groups, we should give permission to all IPs ?

  • @momopatel9054
    @momopatel9054 2 года назад

    Hey Valentin, These Tutorials have helped me a lot in terms of build docker image and testing it(I've also set up my runner on my ec2 instance with a docker executor), I was now wondering how would I go about deploying my react web app(which is in an docker container) from my GitLab pipeline to an ec2 instance? would I have to ssh into said instance, pull container from GitLab registry and then run the docker build? If so I am not sure how to do this.
    Thanks.

    • @vdespa
      @vdespa  2 года назад

      You can deploy a static web app directly in S3 (without Docker) or using ElasticBeanstalk with Docker. I don't think you want to use EC2 directly for this.

    • @momopatel9054
      @momopatel9054 2 года назад

      ​@@vdespa I see what if my web app had a backend? Would it still be advisable to do it on EB(Since s3 can only host static web pages)? I am just trying to understand what would be the pros or cons of using EC2 vs. the other software's. And also asked this questions since I was asked to directly deploy to EC2 instance
      Thanks.

    • @vdespa
      @vdespa  2 года назад

      @@momopatel9054 EB is a managed service. If one of your container dies, EB will try to restart it. On EC2, you are the one who needs to manage everything, including software updates & co.

  • @Billiam112
    @Billiam112 2 года назад +1

    Can your show something that one should do for production? You said in the beginning that one should not do this for production..

    • @vdespa
      @vdespa  2 года назад +1

      Good point, Bill. What "production" means largely differs from project to project. There is no single definition. However I understand the point you are making and I am considering more advanced tutorials that would be a better fit for most production situations where reliability and scalability are a must. Thanks!

    • @Billiam112
      @Billiam112 2 года назад

      @@vdespa that would be great. There are so many tutorials on stuff up to actual deployment, but then actually deploy something, perhaps a project for a small business (one might want to do some small freelancing for), how to deploy (not with heroku 😁), would be really good. 👍

  • @user-zt5rb2rd9j
    @user-zt5rb2rd9j Год назад

    created a gitlab cicd pipeline to build the docker image and push it to container registry in gitlab and when I run the pipeline it shows following error. Copy failed file not found in build context or excluded by .dockerignore:stat pkg/demo.war:file does not exist. Can u help in getting through this error

  • @Warawarayadnus
    @Warawarayadnus 5 месяцев назад

    my friend configuration for the runner is executor: docker and docker image is docker:latest... why did you choose alpine
    on his pipeline he have this
    services:
    - name: docker:dind
    alias: dockerhost
    can you please explain me that dind?

  • @momopatel9054
    @momopatel9054 2 года назад

    Hey valentine was wondering if you could do a video on how to deploy a MERN Stack App on AWS ec2 Using GItLab CI

  • @guidocaru
    @guidocaru 2 года назад

    thanks!!

    • @vdespa
      @vdespa  2 года назад +1

      You are welcome. Thank you for leaving a comment.

  • @HHojatAnsari
    @HHojatAnsari 9 месяцев назад

    thanks a lot..

    • @vdespa
      @vdespa  9 месяцев назад

      Welcome 😊

  • @erhon007
    @erhon007 2 года назад

    Please show the command in terminal docker images?

  • @jaeger3010
    @jaeger3010 2 месяца назад

    My Gitlab UI response are very slow, although I'm using ubuntu t2.medium instance

    • @vdespa
      @vdespa  2 месяца назад

      Thank you for the feedback. I'll look into it.

  • @neelesh271980
    @neelesh271980 6 месяцев назад

    Getting this error
    sh-5.2$ sudo amazon-linux-extras install -y docker
    sudo: amazon-linux-extras: command not found
    Can you suggest

  • @likbezpapuasov4888
    @likbezpapuasov4888 2 года назад

    Can somebody here please clarify what course of actions i have to perform to realize this what i read on someone's gitlab project i want to download, compile and run. It has just 3 short lines of text: "Getting started. The first time, run these commands to download afivo, particle_core etc.:
    git submodule init
    git submodule update". Then compile the code". First obvious question immediately comes: is just downloading and using ZIPped archive with the code available there not enough as usually ?

    • @vdespa
      @vdespa  2 года назад

      Just downloading the files usually is enough. However, since you need to run additional Git commands, you need to clone this repo with git.

    • @likbezpapuasov4888
      @likbezpapuasov4888 2 года назад

      @@vdespa Thanks Valentin. But why this was done? Cloning means that i will make one more gitlab place (my own clone of original one) with absolutely not clear reason why i have to do that as i do not need to keep there anything. The original place has sources Zipped, and i just can download them without bothering with useless cloning. Additionally the commands "git submodule init, git submodule update" etc are cryptic because obviously are incomplete (they show no address from which address to which address will be performed init or update. What i do not see here?

  • @nitikasinghal522
    @nitikasinghal522 2 года назад

    Hi Valentin,
    Video is very informative and helpful. But I am facing one issue.
    I have followed all the steps mentioned in the video and it worked for me, my pipeline started working, but once job is successful and I tried to ran another job, the runner went offline..
    Can you help me how can make online again?

    • @vdespa
      @vdespa  2 года назад

      Did you try checking the status of the runner?

    • @nitikasinghal522
      @nitikasinghal522 2 года назад +1

      yes, I have checked the runner status and it was running.
      @Valentin Now I am facing some weird issue, the CI/CD job is stuck in-between after running fine for 6-7 mins, and when I go to my EC2 instance that also stops responding. Any idea why this is happening?
      I have checked the space on the instance, and it has enough space to run the job.

    • @allanvaldez3209
      @allanvaldez3209 2 года назад

      I got this error
      I'm trying from a lxd container
      when i change to privileged = true
      ERROR: Job failed (system failure): Error response from daemon: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: unable to apply caps: operation not permitted: unknown (docker.go:403:1s)

  • @aniketjaa5416
    @aniketjaa5416 2 года назад

    Hello Sir,
    I have connected my GitLab with remote rdc with specific runners (tag )installed at remote windows workstations.
    not able to trigger scripts from .yml file on remote workstations.(windows 10)
    (.yml file is successfully building pipeline by passing maven command for Windows)
    Thanks

    • @vdespa
      @vdespa  2 года назад

      I am sorry this is not working. What is the error you are getting?

  • @geyangxiao9666
    @geyangxiao9666 2 года назад

    How do i solve this error when i input"sudo rpm -i gitlab-runner_amd64.rpm", it shows that error: gitlab-runner_amd64.rpm: not an rpm package (or package manifest):

    • @vdespa
      @vdespa  2 года назад

      Are you sure that file is not empty?

  • @highway9691
    @highway9691 Год назад

    Please increase terminal font size while recording

    • @vdespa
      @vdespa  Год назад +1

      Thanks for raising this point. Are you watching on a mobile device?

    • @highway9691
      @highway9691 Год назад +1

      @@vdespa yes i am watching on mobile, thanks for noticing my comment 🙂.
      Increasing terminal font will help to see it clearly

    • @vdespa
      @vdespa  Год назад +1

      @@highway9691 Got it. Thanks for letting me know.

  • @febrian1546
    @febrian1546 2 года назад

    Can i do this with ubuntu and another cloud provider to configure gitlab runner ?

    • @vdespa
      @vdespa  2 года назад

      Yes. The process is the same, you just need the package for Ubuntu/Debian.

  • @dongpham7789
    @dongpham7789 2 года назад

    I ran the command "sudo rpm -i gitlab-runner_amd64.rpm" then got the following error messages:
    error: Failed dependencies:
    gitlab-ci-multi-runner conflicts with gitlab-runner-15.0.0-1.x86_64
    gitlab-ci-multi-runner conflicts with (installed) gitlab-runner-15.0.0-1.x86_64
    Please help, I did not how to fix it. Thanks in advanced

    • @vdespa
      @vdespa  2 года назад

      It seems that it is already installed.

    • @dongpham7789
      @dongpham7789 2 года назад

      @@vdespa Thanks Valentin, do I need to create one EC2 instance for each project?

    • @vdespa
      @vdespa  2 года назад

      @@dongpham7789 No. This tutorial shows you how to create a group runner. In a group you can have multiple projects.

  • @QuangPham-bc7lc
    @QuangPham-bc7lc Год назад

    i set up an vm in GCP and do everything like you but when run pipline, it show "This job has not started yet
    This job is in pending state and is waiting to be picked by a runner"

    • @vdespa
      @vdespa  Год назад

      Did you configure a runner?

    • @QuangPham-bc7lc
      @QuangPham-bc7lc Год назад

      @@vdespa yes, i have registered my vm, set correct tags, give gitlab-runner user sudoer permission, install docker, check status of gitlab-runner and docker service but i still not work after i type "sudo reboot" in that vm - vm on GCP

    • @vdespa
      @vdespa  Год назад

      @@QuangPham-bc7lc did you configure it to run jobs without tags?

    • @QuangPham-bc7lc
      @QuangPham-bc7lc Год назад

      yes
      @@vdespa

  • @pipe201196
    @pipe201196 Год назад

    Where is push u docker image? Dockerhub?

    • @vdespa
      @vdespa  11 месяцев назад

      Sorry for the late reply. You can push to AWS, Dockerhub or GitLab.

  • @kritsatornsaengweang715
    @kritsatornsaengweang715 8 месяцев назад

    g8 video. Like + Sub here !

    • @vdespa
      @vdespa  8 месяцев назад

      Thank you!