GitHub Actions - Self-hosted runners - Installation & Calling

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ต.ค. 2024

ความคิดเห็น • 99

  • @karthikeyanb7518
    @karthikeyanb7518 ปีที่แล้ว +7

    fantastically explained.

  • @merlingt1
    @merlingt1 ปีที่แล้ว +63

    My left ear loved this video.

    • @MickeyGousset
      @MickeyGousset  ปีที่แล้ว +3

      Yep I messed up this audio and a couple of others, sorry about that

    • @kaywanbarzani5268
      @kaywanbarzani5268 4 หลายเดือนก่อน

      😂

    • @NvStarKaraoke
      @NvStarKaraoke 3 หลายเดือนก่อน

      @@MickeyGousset kinda funny, but your video was great, thanks for explaination

  • @BlueyMcPhluey
    @BlueyMcPhluey ปีที่แล้ว +1

    The instructions on GitHub are quite straight-forward but I found this video useful to get a sense for how they would work before I commit to them

    • @rodfalanga3770
      @rodfalanga3770 ปีที่แล้ว

      I've tried to find instructions on how to run and self-hosted runners on GitHub, that covers what's here. I've not been able to. For example, it wasn't until I watched this video that I learned that self-hosted runners can work on repositories, organizations, and enterprises. I had thought it only worked against a repo. Can you please supply a link to that documentation on GitHub?

  • @rodfalanga3770
    @rodfalanga3770 8 หลายเดือนก่อน

    FYI
    If you're installing the GitHub self-hosted runner on a Windows machine, and you want to create it as a Windows service, then you must run the CLI as Administrator. I didn't do that, because I didn't know, until I got to the question where it asks if I wanted to run the GitHub self-hosted runner as a service. At that point, it bombed. Thanks, GitHub, for leaving out important details like that.

    • @MickeyGousset
      @MickeyGousset  8 หลายเดือนก่อน +1

      Hey @rodfalanga3770, that is my bad for not mentioning that in my video. The official documentation does have that listed: docs.github.com/en/actions/hosting-your-own-runners/managing-self-hosted-runners/adding-self-hosted-runners#adding-a-self-hosted-runner-to-a-repository

  • @mertakbulut241
    @mertakbulut241 4 หลายเดือนก่อน

    Sir, thanks for the crystal clear explanation.

  • @swapnilverma3936
    @swapnilverma3936 ปีที่แล้ว +2

    Loved it.. Beautifully explained.Good job!

  • @rmikeable
    @rmikeable 2 ปีที่แล้ว

    Great video on Self-hosted runners, got me going in no-time

  • @strazhnyk84
    @strazhnyk84 2 ปีที่แล้ว +3

    hello, thanks for the video, could you create the same insctruction but for installing and use runner in docker, please?

  • @manas9815
    @manas9815 2 ปีที่แล้ว +3

    Hi Mickey Gousset, Its a good session and thanks for that. I think you have configured it in the HOME directory, which will be accessible to you only. How to install it at some common place in a common Linux machine/VM so that all who have access to that machine/VM can access the runner? GitHub runner does not allow SUDO due to security reasons.

    • @nicolenlama
      @nicolenlama 10 หลายเดือนก่อน

      I know you asked this forever ago, but our team uses AWS codebuild for this and a shared GH repo. It doesn't offer the flexibility of accessing a common VM, but it meets security requirements.

  • @saisrujanpasupuleti8460
    @saisrujanpasupuleti8460 ปีที่แล้ว

    even though runners are available at organization , getting the message "Waiting for a runner to pick up this job..." . Runners are available and they are active/idle . FYI, used correct labels.

    • @MickeyGousset
      @MickeyGousset  ปีที่แล้ว

      Has your repository been granted access to the runners?

  • @uaena182
    @uaena182 ปีที่แล้ว

    Appreciate ths.. i learned.
    Subscribed!
    Thanks Mickey Mousset! 😻

  • @TheMightyWolve
    @TheMightyWolve ปีที่แล้ว

    thank you so much for this ! really helped ease my workflow!

  • @TR1_CV_DRM
    @TR1_CV_DRM 8 หลายเดือนก่อน +1

    Oh hold on, I need to put my headset on my forehead, give me a sec. xD

  • @Eriddoch
    @Eriddoch ปีที่แล้ว

    I only hear the spoken audio out of my left earphone while watching this video, yet the music comes out of both. You might consider tweaking your mic setup if you haven't done so so that the voice recording comes out as stereo sound

    • @MickeyGousset
      @MickeyGousset  ปีที่แล้ว +1

      Yep I screwed this audio up. I've fixed in my more current video. Thank you for letting me know!

  • @matthewgrainger8285
    @matthewgrainger8285 11 หลายเดือนก่อน

    My left ear really enjoyed this.

  • @nicolenlama
    @nicolenlama 10 หลายเดือนก่อน

    Thank you for this overview!

  • @hereps
    @hereps 8 หลายเดือนก่อน

    Simple and efficient, thanks 👍

  • @miereza
    @miereza วันที่ผ่านมา

    very helpful!

  • @rodfalanga3770
    @rodfalanga3770 ปีที่แล้ว

    Mickey, this is an excellent video. It answers an important question I've been wondering about GitHub self-hosted runners.
    But I've got a question about ports. A few years ago, I tried doing the same thing using Azure Pipeline, with what they call self-hosted agents. The thing that we never got to work was opening the ports necessary for the Azure Pipeline self-hosted agent to communicate back to Azure DevOps. There must be a comparable situation here with GitHub self-hosted runners. Is there a list of ports that the security team must open for the self-hosted running to communicate back to GitHub?

    • @MickeyGousset
      @MickeyGousset  ปีที่แล้ว +1

      You need port 443 opened as the agent does long polling to GitHub.
      There are also some urls that the agent needs to be able to hit. Those are in the docs somewhere. But 443 and maybe 80 are all you need

    • @rodfalanga3770
      @rodfalanga3770 ปีที่แล้ว

      @@MickeyGousset thank you

  • @ylohnitram
    @ylohnitram ปีที่แล้ว +1

    How do I refresh the token when it expires?

  • @febdx3485
    @febdx3485 11 หลายเดือนก่อน

    thank Mickey , it's a great course !

  • @dimitridev9126
    @dimitridev9126 ปีที่แล้ว

    My left ear loved your video !

    • @MickeyGousset
      @MickeyGousset  ปีที่แล้ว

      Ha! Yes, I have a couple of videos that I really screwed the audio up on. Sorry about that. I’ve gotten better in my newer videos.

  • @MickeyGousset
    @MickeyGousset  9 หลายเดือนก่อน

    You will need to script that or look at something like actions runner controller

  • @-SANJAIMI
    @-SANJAIMI หลายเดือนก่อน

    I couldn't able to connect to the SonarQube server which locally hosted and I'm trying to use the self-hosted runner for the first time and I couldn't able to address why the sonar-scanner couldn't able to connect to the sonarqube server( I tried this stunt thinking about the security). please help me, the connection is established when I expose the server to internet and the github actions in running on a cloud. the repo I'm currently working at is private and the mentioned connection is established when I worked in a public repo.
    P.S: I don't have any knowledge about the docker stuffs ... I'm new to this 🙂
    please help me !!!

  • @web-sprint
    @web-sprint 9 หลายเดือนก่อน

    I want to automatically connect the runner rather than going to the server manually.

  • @web-sprint
    @web-sprint 9 หลายเดือนก่อน

    I need to runner connected on automatic not manually.Kindly provide best solution

  • @ElongateFeel
    @ElongateFeel 6 หลายเดือนก่อน

    I have a disability where I can only hear from my right year. I could not hear anything except for some music at random points in the video. Is that intended?

  • @ashwinowada
    @ashwinowada ปีที่แล้ว

    Great information

  • @mehdicherifi6289
    @mehdicherifi6289 2 ปีที่แล้ว +1

    Very interesting. Please If I want to run python script for my local machine from GitHub action will hosted runner be useful in this situation? Thank you

  • @SaschaStriegel
    @SaschaStriegel 10 หลายเดือนก่อน

    my left ear enjoyed this video

  • @mariocortes2670
    @mariocortes2670 11 หลายเดือนก่อน

    Great video.

  • @2-Minutesforyou
    @2-Minutesforyou ปีที่แล้ว

    Please help to set parallel job processing for the self-hosted runner.

    • @MickeyGousset
      @MickeyGousset  ปีที่แล้ว +1

      To be able to run multiple jobs you will need to install multiple agents. You can do that on the VM by installing them to different folders. But make sure the vm has enough resources

  • @yousifmobark6981
    @yousifmobark6981 2 ปีที่แล้ว

    if my deployment via docker-compose and i need to restart the docker-compose located in /opt/ how can that be made ?

  • @salmansrabon9799
    @salmansrabon9799 2 ปีที่แล้ว

    Getting this error always. How could I solve it?
    Error: The process 'C:\Windows\System32\actions-runner-2\_diag\_actions\actions\setup-node\v3\externals\7zr.exe' failed with exit code 2

  • @bl_int
    @bl_int 2 ปีที่แล้ว

    thanks for sharing, is runner can install for 2 repository/project on 1 host? frontend repo and backed repo

  • @krzysiek5806
    @krzysiek5806 7 หลายเดือนก่อน

    Can you please explain how to refresh token? TBH - I would like to be the runner available ALL the time. So whenever there is a push to my master branch, I want to trigger an action and deploy new version. Now I cant do it - token gets expired after only 1h.
    I have an idea to write a script in a VM to call github API for the token, restart the runner with the new token, do it each hour. But does it really needs to be so overhelming? Thinking about moving off to jenkins

    • @MickeyGousset
      @MickeyGousset  7 หลายเดือนก่อน

      Are you trying to create your own ephemeral self-hosted runner solution? The GitHub official solution for that is github.com/actions/actions-runner-controller.
      However, if you are trying to create your own, then you need to make an API call to get a short lived registration token: docs.github.com/en/rest/actions/self-hosted-runners?apiVersion=2022-11-28#create-a-registration-token-for-a-repository
      You can always just have a VM that is always available that you are running say in AWS or Azure. In that case, all you do is install the runner software. The token doesn't expire on you, meaning that the runner will keep working.
      I might need more details on what you are trying to do. If you want to email me at mickeygousset@github.com I'll see if I can answer them.

  • @JayShankarpure
    @JayShankarpure 2 ปีที่แล้ว

    Hi Mickey , Jay here
    I have created a Public repo which is already live & wanted to hide my API credentials on that Repo . Is their any way to do it cause its already live right now ??
    I just want to hide that line of code where it has mentioned my Private API key

  • @Luther_Luffeigh
    @Luther_Luffeigh 2 ปีที่แล้ว +2

    Only left ear audio 😢

    • @MickeyGousset
      @MickeyGousset  2 ปีที่แล้ว +1

      Yeah I messed that up. Sorry about that.

    • @Luther_Luffeigh
      @Luther_Luffeigh 2 ปีที่แล้ว

      @@MickeyGousset no worries, thanks for the great walkthrough in this video 🙌🏽

  • @snehashekar4152
    @snehashekar4152 ปีที่แล้ว

    In my github repository page under settings i cannot see the actions tab on to my left side

    • @MickeyGousset
      @MickeyGousset  ปีที่แล้ว

      If you are working under your company’s enterprise account, then they may not have turned on actions for you.

  • @nikolais9297
    @nikolais9297 ปีที่แล้ว

    Hey! Is there any way to check what labels were applied to a particular runner instance?

    • @MickeyGousset
      @MickeyGousset  ปีที่แล้ว

      You can see it in the Web Browser by going to settings | Actions | Runners and looking at the runner information. You can also pull it using the APIs

  • @sureshbe405
    @sureshbe405 ปีที่แล้ว

    Thanks a ton 🙏🙏🙏

  • @Rayhand117
    @Rayhand117 4 หลายเดือนก่อน

    Great!

  • @vamshikrishna-th2ly
    @vamshikrishna-th2ly 2 ปีที่แล้ว

    I have couple of questions related to self hosted runners.
    1. I have configured self hosted runner and i always wanted to be active so that my other team members can use it. But when my laptop is not turned on, other people who are running the pipeline, it is going to queue. Any idea on how to overcome that?
    2. Lets say I create 3 individual self hosted runners in 3 of my team mates machines. I need github pipeline to pick the one which is online not the one which is offline. Is it possible and how do we do that.?

    • @MickeyGousset
      @MickeyGousset  2 ปีที่แล้ว +1

      1. You need to install that runner on a machine that is always going to be one and available
      2. All three machines will have a label, say "self-hosted". When you build the workflow file, you use that label in the runs-on command. Then Actions will find a free machine with that label and use it.

    • @vamshikrishna-th2ly
      @vamshikrishna-th2ly 2 ปีที่แล้ว

      @@MickeyGousset Thanks for the reply brother. I have given runs-on: self-hosted in ci.yml file and have 3 selfhosted runners. Sometimes it is picking the one which is active and sometimes it is picking the one which is offline and waiting in the queue. Not sure how to overcome that

  • @mfarhantariq-ro6bf
    @mfarhantariq-ro6bf 5 หลายเดือนก่อน

    is this self-hosted runner need ssh open connection?

    • @MickeyGousset
      @MickeyGousset  5 หลายเดือนก่อน

      No self hosted runners use https to connect to GitHub

  • @sirrobert4820
    @sirrobert4820 ปีที่แล้ว

    Brilliant 🙂

  • @pindab0ter
    @pindab0ter ปีที่แล้ว

    My left ear really enjoyed this. My right ear kinda felt left out.

    • @MickeyGousset
      @MickeyGousset  ปีที่แล้ว +1

      Ha!
      I’m about to create all brand new self hosted runner content. You will be happy to know I’ve fixed the audio issues 😎

    • @pindab0ter
      @pindab0ter ปีที่แล้ว

      @@MickeyGousset Looking forward to it!

  • @_us.m.an_
    @_us.m.an_ 3 หลายเดือนก่อน

    All the knowledge is in the left part of my brain, jk but thank you for this!

  • @tatajsr13
    @tatajsr13 ปีที่แล้ว

    Hi, After all these steps, I am not able to access os.environ value which in worker log shows as access denied because it's checking environment value in /proc/id/environ on which linux user doesn't have permission to. Also after setting value in .bashrc file using export, it's reading value from /proc only and not .bashrc file and now I am stuck to execute the action and pipeline is waiting in infinite loop and had to cancel no choice to continue. Please let me know what I can do next here?

    • @MickeyGousset
      @MickeyGousset  ปีที่แล้ว

      I’m not sure off the top of my head. Do you have a repo you could add me to (mickeygousset) where I could take a look, or a public repo that is forkable?

    • @tatajsr13
      @tatajsr13 ปีที่แล้ว

      @@MickeyGousset test:
      # needs: start-runner
      # needs:
      # - build
      runs-on: [self-hosted, Linux, X64]
      continue-on-error: true
      defaults:
      run:
      working-directory: .
      steps:
      - name: Checkout
      uses: actions/checkout@v3
      with:
      fetch-depth: 0
      - name: Install python dependencies
      shell: bash
      run: |
      source /home/githubuser/actions-runner/_work/bin/activate
      pip3 install --upgrade pip
      pip3 install -r requirements.txt
      pip3 install -r requirements.dev.txt
      - name: Set Environment Variable
      run: |
      echo "UNIT_TESTING_DB=${{ secrets.UNIT_TESTING_DB }}" >> $GITHUB_ENV
      - name: Run pytest & coverage
      continue-on-error: false
      run: |
      echo "export UNIT_TESTING_DB=${{ secrets.UNIT_TESTING_DB }}" >> ~/.bashrc
      source ~/.bashrc
      pip3 install pytest-cov
      pytest tests --cov=app --cov=services --cov-report xml

    • @tatajsr13
      @tatajsr13 ปีที่แล้ว

      Error Log
      [2023-08-04 01:56:08Z WARN JobExtension] Ignore exception during read process environment variables: Access to the path '/proc/15980/environ' is denied.
      [2023-08-04 01:56:08Z INFO JobExtension] Inspecting process environment variables. PID: 16193 (pytest)
      pyest call which tries db connection but before that it fetched config string from os.environ which fails
      because this user do not have permission to /proc/id/environ
      but why ec2 or github is creating proc folder in root and not in user level folder

    • @tatajsr13
      @tatajsr13 ปีที่แล้ว

      UNIT_TESTING_DB: str = os.getenv(
      "UNIT_TESTING_DB",
      "postgresql+psycopg2://user:pass@localhost:5432/my_db",
      )
      Both Worker and Runner is stuck in infinite loop at this point

  • @PatcharaMeesawad
    @PatcharaMeesawad ปีที่แล้ว

    Hi Mickey, I follow step install self-host runner at Enterprise, Yes installable. But i can not run workflow call my self-host and show error "Waiting for a runner to pick up this job..." show it like that
    I create uner enterprise and allow organization all to use

    • @MickeyGousset
      @MickeyGousset  ปีที่แล้ว

      Two things to check:
      Make sure at the org level you have set it to allow your repo access. You should see the runner listed in your repo under settings | Actions at the repository level if it has access
      Also make sure your run-as statement matches a label on your runner

    • @PatcharaMeesawad
      @PatcharaMeesawad ปีที่แล้ว

      @@MickeyGousset I set allow my repo access, check all permission. But still can't use
      Before i add self-host under organization, it works and move self-host to enterprises and no longer works

    • @MickeyGousset
      @MickeyGousset  ปีที่แล้ว

      @@PatcharaMeesawad interesting that it works at the org level but not the enterprise. I’ll have to think on that

    • @PatcharaMeesawad
      @PatcharaMeesawad ปีที่แล้ว

      @@MickeyGousset thank you mickey

    • @PatcharaMeesawad
      @PatcharaMeesawad ปีที่แล้ว

      Hi Mickey, I can setup multiple self-hosted runners on a single host ?

  • @Devlogowy
    @Devlogowy 11 หลายเดือนก่อน

    Whether self hosted virtual machine consume my 2000 minutes limit?

    • @MickeyGousset
      @MickeyGousset  11 หลายเดือนก่อน +1

      Self hosted runners do not consume minutes. You can have as many self hosted runners as you want.

    • @Devlogowy
      @Devlogowy 11 หลายเดือนก่อน

      @@MickeyGousset GitHub secret keys can be the same? or I need additional configure?

    • @MickeyGousset
      @MickeyGousset  11 หลายเดือนก่อน +1

      @@Devlogowy GitHub secrets work the same whether you use hosted or self hoted runners

    • @Devlogowy
      @Devlogowy 11 หลายเดือนก่อน

      @@MickeyGousset Thanks for answers :) Time to code

    • @Devlogowy
      @Devlogowy 11 หลายเดือนก่อน

      Actually when I run task during Xcode process terminal asks me about Mac password. Can I configure something like sudo perm access without type password every run?

  • @susmitham7453
    @susmitham7453 ปีที่แล้ว

    How to bring self-hosted offline runners online?

    • @MickeyGousset
      @MickeyGousset  ปีที่แล้ว +1

      First check and make sure the agent in the runner is actually up and running. If it is then try restarting it.

  • @shiznoSC2
    @shiznoSC2 6 หลายเดือนก่อน

    amazing video... but so painful to watch while wearing headphones

  • @vrohan07
    @vrohan07 10 หลายเดือนก่อน

    thank you so fuckin much man!

  • @АндрейС-я3ю
    @АндрейС-я3ю 2 ปีที่แล้ว

    Спасибою Хорошая подача материала. Если улучшиться звук. будет здорово

  • @bulletkip
    @bulletkip 9 หลายเดือนก่อน

    • @MickeyGousset
      @MickeyGousset  9 หลายเดือนก่อน

      >>>>>>>>>>>>>>>>>>>>>>>>>>>>