GitHub Actions Self Hosted Runner (Autoscaling with Kubernetes)

  Рет қаралды 23,766

Anton Putra

Anton Putra

Күн бұрын

Пікірлер: 84
@AntonPutra
@AntonPutra Жыл бұрын
🔴 - To support my channel, I’d like to offer Mentorship/On-the-Job Support/Consulting - me@antonputra.com
@saadullahkhanwarsi5853
@saadullahkhanwarsi5853 Жыл бұрын
Amazing man Keep sharing that level of content
@AntonPutra
@AntonPutra Жыл бұрын
Thanks SAADULLAH! Will do!
@SuvodeepPyne
@SuvodeepPyne Жыл бұрын
Awesome work! Thank you so much for sharing this!
@AntonPutra
@AntonPutra Жыл бұрын
Thanks Suvodeep!
@jonathanhle
@jonathanhle 2 жыл бұрын
Thanks!
@AntonPutra
@AntonPutra 2 жыл бұрын
Welcome!
@smokzpolski
@smokzpolski 3 жыл бұрын
More and more useful videos! Thank you!
@AntonPutra
@AntonPutra 3 жыл бұрын
Thanks Alex:)
@elibukin4840
@elibukin4840 Жыл бұрын
super stuff! thank you my good dude, that helped alot!
@AntonPutra
@AntonPutra Жыл бұрын
Thanks, Eli!
@valour.se47
@valour.se47 3 жыл бұрын
Keep up the good work, as always to the point.
@AntonPutra
@AntonPutra 3 жыл бұрын
Thanks Valour!
@AntonPutra
@AntonPutra Жыл бұрын
👉 How to Manage Secrets in Terraform - kzbin.info/www/bejne/aX-TpXqBrNt1mqM 👉 Terraform Tips & Tricks - kzbin.info/www/bejne/bYScZaKLid5lsJY 👉 ArgoCD Tutorial - kzbin.info/www/bejne/sHjRlZqafMZkisU
@ВладиславЗагородний-ш9ш
@ВладиславЗагородний-ш9ш Жыл бұрын
Anton hi, thanks for a great tutorial. Can you pls suggest how to define image for self hosted K8s github actions runner? Let's assume I have automation tests written on Java and to run those tests I need Chrome browser, for time saving purpose - it could be great to have already installed on my runner Java and Chrome , so I will justly run the tests and not perform any installations from workflows (within github actions).
@AntonPutra
@AntonPutra 3 жыл бұрын
Build a Docker Image and Publish It to AWS ECR using Github Actions - kzbin.info/www/bejne/fqeYhpZ4jtiYq9U Build a Docker Image and Publish It to GCP GCR & Artifact Registry using Github Actions - kzbin.info/www/bejne/bJWveZakobWclbc
@mohammadkarimi9386
@mohammadkarimi9386 2 жыл бұрын
Awesome tutorial. Have learned so much. Would you create another video on how to create this with webhook and using OIDC or similar
@AntonPutra
@AntonPutra 2 жыл бұрын
Propably in the future, combining with org level runners.
@jimbrannlund4677
@jimbrannlund4677 2 жыл бұрын
I just did this (webhook), it was pretty straightforward. But then we have a sweet setup with Contour and Envoy which makes ingresses a breeze.
@jishaashok
@jishaashok 2 жыл бұрын
@@jimbrannlund4677 Can you please share the entire steps here?
@jimbrannlund4677
@jimbrannlund4677 2 жыл бұрын
@@jishaashok I can try
@mondo1926
@mondo1926 2 жыл бұрын
Clear, concise and to the point. Nice job on this video Anton. I just have a general question about the custom resource definition for k8s self hosted runners. Did you create it? Is there an officially supported CRDs for Github self hosted runners?
@AntonPutra
@AntonPutra 2 жыл бұрын
Sorry for the late response, here is a reference - github.com/actions-runner-controller/actions-runner-controller/tree/master/config/crd
@sacardillas
@sacardillas 2 жыл бұрын
amazing job, thank you so much for this material
@AntonPutra
@AntonPutra 2 жыл бұрын
Glad it was helpful!
@siamak.hatami
@siamak.hatami 2 жыл бұрын
It is more than great. Thanks.
@AntonPutra
@AntonPutra 2 жыл бұрын
Thanks siamak!
@Han-ws8he
@Han-ws8he 5 ай бұрын
Very nice! Thanks!
@AntonPutra
@AntonPutra 5 ай бұрын
thanks! I'll refresh series soon..
@LunaLovegood-1981
@LunaLovegood-1981 6 ай бұрын
This is legacy version. It would be greate if you make an other video about GitHub Actions Self Hosted Runner with runner-scale-set chart and runner-scale-set-controller chart.
@AntonPutra
@AntonPutra 6 ай бұрын
I was thinking about refreshing. Maybe I'll create a mini playlist for GitHub Actions.
@haseebahmad857
@haseebahmad857 Жыл бұрын
Hello Anton. Thank you very much, it was straight to the point and a very good explanation of the topic. I have one question, I am just curious if we can provide custom docker image to our runner pods having all the dependencies for the applicaton build preinstalled. Any article/video will be much appreciated. Thanks in advance
@AntonPutra
@AntonPutra Жыл бұрын
Welsome, you can build your own image github.com/machine-learning-apps/self-hosted-k8s-runner/blob/master/README.md#optional-customize-your-self-hosted-runner
@csvidzz
@csvidzz 2 жыл бұрын
Hello Anton. Thank you very much, it was straight to the point and a very good explanation of the topic. I have one question though: Since pods don't store the state, I sometimes want to cache the docker image after the first build to make the actions execute faster. Is there a way with this approach to cache the built docker images, so I have faster builds in the future? Thank you very much in advance.
@AntonPutra
@AntonPutra 2 жыл бұрын
I think I already sent you a link to this - github.com/marketplace/actions/docker-layer-caching maybe help
@kayoutube690
@kayoutube690 8 ай бұрын
Do you have module how to build image via tags, pr and branch using github actions?
@InigoMontoyaGAMING
@InigoMontoyaGAMING 2 жыл бұрын
Thanks a lot Anton! Can you please create a video on how to host Self Hosted Runner with Fargate profile? or any tips about it?
@AntonPutra
@AntonPutra 2 жыл бұрын
Sure, I already have a video for AWS Fargate
@dtwilliams
@dtwilliams Жыл бұрын
Hi. Could you let me know where your Fargate video is? I couldn’t find it. I wasn’t sure if I could use Fargate to host self hosted runners as Fargate doesn’t allow privileged containers.
@jimbrannlund4677
@jimbrannlund4677 3 жыл бұрын
Execellent video, thank you! What's the point of RunnerDeployment, I don't understand the difference with custom runners.
@AntonPutra
@AntonPutra 3 жыл бұрын
It's a Custom Resource Definition provided by actions-runner-controller, that watches the repository and creates pods to run your workflows. Here is a link - github.com/actions-runner-controller/actions-runner-controller#runnerdeployments
@jimbrannlund4677
@jimbrannlund4677 3 жыл бұрын
@@AntonPutra Thanks for the fast reply!
@spasham74
@spasham74 Жыл бұрын
Great video. Question. I have a self hosted runner deployed in AWS eks. I am able to build most the stages in GitHub actions. I understand docker is not longer supported on k8s so how do you build images on self hosted runner on k8s
@AntonPutra
@AntonPutra Жыл бұрын
You don't have to use docker to build docker images, for example you can use kaniko
@spasham74
@spasham74 Жыл бұрын
@@AntonPutra do you have any example snippets that you can share? There isn’t any office GitHub actions for kaniko
@kirbyliu8965
@kirbyliu8965 2 жыл бұрын
Great video Anton! I had a question regarding installing cert-manager, if you aren't handling SSL/TLS for DNS, did you need to install cert-manager? You mentioned the webbook as an option which I'm sure is where the cert-manager would have been supported/used.
@AntonPutra
@AntonPutra 2 жыл бұрын
Thanks, you need cert-manager only if you want to expose your service from kubernetes to the internet and encrypt the traffic with SSL/TLS (HTTPS). If you just want to use plain http, you don't need cert-manager.
@armandoleon9901
@armandoleon9901 2 жыл бұрын
Awesome video!!! Curious, is it possible to configure the images of the runners? Especially via the runner deployment?
@armandoleon9901
@armandoleon9901 2 жыл бұрын
whoops, ignore, I read the docs and found my answer
@AntonPutra
@AntonPutra 2 жыл бұрын
yeah, you should be able to create custom image
@mrdeshapiro
@mrdeshapiro Жыл бұрын
for horizontal run autoscalar you specify repositoryNames:. What if you want to allow all repositories in an org?
@AntonPutra
@AntonPutra Жыл бұрын
Take a look at this "Adding ARC runners to a repository, organization, or enterprise" github.com/actions/actions-runner-controller/blob/master/docs/choosing-runner-destination.md
@mrdeshapiro
@mrdeshapiro Жыл бұрын
@@AntonPutra It sounds like metrics requires you to list repositories if I am reading it correctly. Note that I set this up, but I never seem to see scaldown happening. I even had cases where I was left with many sitting offline. I ended up manually deleting those in the Github console.
@amalberty
@amalberty 2 жыл бұрын
Hello Anton. Thank you for the video. Re: AWS EKS, are you using Fargate or EC2 instance for autoscaling?
@AntonPutra
@AntonPutra 2 жыл бұрын
Hi Alejandro, in that video as far as i remember i was using ec2 instances.
@amalberty
@amalberty 2 жыл бұрын
@@AntonPutra Thank you
@OutOfDevOps
@OutOfDevOps 2 жыл бұрын
Awesome tutorial, I implemented something similar in GCP but using VMs, this allows me to scale down to zero when idle. Do you think would be possible to implement something similar in AWS? I didn’t put the link but you should be able to find it in my channel.
@AntonPutra
@AntonPutra 2 жыл бұрын
Thanks! You can defiantly scale down to 0 Kubernetes instance group.
@OutOfDevOps
@OutOfDevOps 2 жыл бұрын
@@AntonPutra do you have to pay for the master nodes even if you have zero nodes?
@AntonPutra
@AntonPutra 2 жыл бұрын
@@OutOfDevOps well, not even masters, you still need to run DNS and some other components. Even autoscaller has to be deployed somewhere. It's a good solution when you already have a cluster and want to share it with ci/cd.
@hrushie
@hrushie 2 жыл бұрын
Hi Anton, Great video! but I have a question, what if we want to use our own docker image for the runners? I did not see any configuration for custom docker image. Thank you!
@AntonPutra
@AntonPutra 2 жыл бұрын
Thanks! You can then configure the runner to use a custom docker image by configuring the image field of a Runner or RunnerDeployment. Doc - github.com/actions-runner-controller/actions-runner-controller/blob/master/docs/detailed-docs.md#software-installed-in-the-runner-image
@vinayhegde9888
@vinayhegde9888 Жыл бұрын
Can we setup this on EKS-Fargate!!?? Plz respond. I’m getting an error during this implementation on Fargate.
@AntonPutra
@AntonPutra Жыл бұрын
I haven't tried it yet, but my guess you can. You can run controller on the regular instance group and workers on fargate
@shohidurrahmanshaju5798
@shohidurrahmanshaju5798 Жыл бұрын
How can I have the autoscale runner pod to gave some linux dependency packages installed?
@AntonPutra
@AntonPutra Жыл бұрын
You need to build custom docker image
@shohidurrahmanshaju5798
@shohidurrahmanshaju5798 Жыл бұрын
@@AntonPutra thanks for the reply
@shohidurrahmanshaju5798
@shohidurrahmanshaju5798 Жыл бұрын
@@AntonPutra I have tried that, but I get pod status CrashLoopBackOff for the actions-runner-controller pod.
@shohidurrahmanshaju5798
@shohidurrahmanshaju5798 Жыл бұрын
Currently if I want to run cypress test on selfhosted runner, I get error saying dependency is not installed
@AntonPutra
@AntonPutra Жыл бұрын
You can build your custom Docker image that you can use as the runner with all your dependencies.
@shohidurrahmanshaju5798
@shohidurrahmanshaju5798 Жыл бұрын
@@AntonPutra Okay, thanks for the reply.
@MuradHasanov-e6y
@MuradHasanov-e6y Жыл бұрын
How to add lablel to runner ?
@AntonPutra
@AntonPutra Жыл бұрын
it's been a while, next time when i refresh this tutorial I'll point it out
@jimbrannlund4677
@jimbrannlund4677 3 жыл бұрын
Why does the app (the runners) need read & write for Administration?
@AntonPutra
@AntonPutra 3 жыл бұрын
I found it in the docs "Administration (read / write)". Here is a link - github.com/actions-runner-controller/actions-runner-controller#deploying-using-github-app-authentication
@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.?
@AntonPutra
@AntonPutra 2 жыл бұрын
i never ran self hosted runners for prod environments on local machine. I would assume it should automatically run on online runners, or you can try to use labels/tags.
@Kruziikrel13
@Kruziikrel13 2 жыл бұрын
Gee, Spamming everyone with this query.
@swathiadhik
@swathiadhik 2 жыл бұрын
Can we not configure same runner for 2 repos? in k8s infrastructure
@AntonPutra
@AntonPutra 2 жыл бұрын
You can configure runner on org level which is more convenient actually.
@vovaripetsky6885
@vovaripetsky6885 3 жыл бұрын
what image are those containers using?
@AntonPutra
@AntonPutra 3 жыл бұрын
this one - Docker: github.com/actions-runner-controller/actions-runner-controller/blob/master/runner/Dockerfile, image - github.com/actions-runner-controller/actions-runner-controller/blob/master/charts/actions-runner-controller/values.yaml#L40-L42
@aromaticcut6898
@aromaticcut6898 2 жыл бұрын
Made my day!!
@AntonPutra
@AntonPutra 2 жыл бұрын
Thanks =)
Let's learn GitHub Actions in a self-hosted Homelab!
23:53
Christian Lempa
Рет қаралды 41 М.
How to Create Your Own GitHub Actions?
14:23
Anton Putra
Рет қаралды 7 М.
Одну кружечку 😂❤️
00:12
Денис Кукояка
Рет қаралды 2,8 МЛН
coco在求救? #小丑 #天使 #shorts
00:29
好人小丑
Рет қаралды 86 МЛН
Мама у нас строгая
00:20
VAVAN
Рет қаралды 12 МЛН
GitHub Actions - Self-hosted runners - Installation & Calling
14:55
Mickey Gousset
Рет қаралды 71 М.
Create your own Custom GitHub Actions runner!
15:52
That DevOps Guy
Рет қаралды 12 М.
GitHub Actions Crash Course
42:44
Laith Academy
Рет қаралды 39 М.
GitHub Actions Tutorial - Basic Concepts and CI/CD Pipeline with Docker
32:31
TechWorld with Nana
Рет қаралды 1,6 МЛН
Одну кружечку 😂❤️
00:12
Денис Кукояка
Рет қаралды 2,8 МЛН