-
-
Notifications
You must be signed in to change notification settings - Fork 323
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add docker autoscaler executor #1118
base: main
Are you sure you want to change the base?
feat: add docker autoscaler executor #1118
Conversation
Hey @mmoutama09! 👋 Thank you for your contribution to the project. Please refer to the contribution rules for a quick overview of the process. Make sure that this PR clearly explains:
With submitting this PR you confirm that you hold the rights of the code added and agree that it will published under this LICENSE. The following ChatOps commands are supported:
Simply add a comment with the command in the first line. If you need to pass more information, separate it with a blank line from the command. This message was generated automatically. You are welcome to improve it. |
Hi @kayman-mk. This change could be the next major release of the module. Gitlab is still on track to make their plugin GA this summer: https://gitlab.com/groups/gitlab-org/-/epics/6995 We are still NOT using this version in our production setup, but we will deploy it on part of our runners in June. What should be the next steps for this PR? Best regards, |
Sounds quite promising to get rid of the outdated docker machine. As soon as GitLab has published their module, we can integrate it here. As far as I can see the docker machine can still be used, so we can create a feature release. Before the next major release I will check if we can get rid of docker machine to simplify the code. Could you please post the settings to test this change? At the moment I am working on #1117. That change will be merged before to support zero downtime during deployment of a new version. |
Thanks @kayman-mk for your answer. I was not aware of this zero downtime PR, very interesting, we can test it as well in our environment. |
@Tiduster Could you please post a minimal configuration showing which AMIs to use to get this up and running? |
ea41c66
to
0226a05
Compare
0226a05
to
9a967f6
Compare
Just tried it, but with no success. Runner is up and working. But in case a job is processed, GitLab shows
The Runner shows in Cloudwatch
The first error seems to be related to And I noticed that Docker was not installed on the Runner and |
|
@kayman-mk The installation of Docker is now mandatory indeed; I've mentioned it in the usage.md file (along with adding the user in docker group). |
On our side we build a custom AMI from ubuntu and we add docker package manually. Docker autoscaler do not do this by default, so it require an AMI with docker engine to work. We re-used runner_worker_docker_machine_ami_filter and runner_worker_docker_machine_ami_owners for this to no duplicate variables. We can create new variables if you prefer. @mmoutama09 added some information about this in usage.md. Best regards, |
20fd1b6
to
bff273f
Compare
@kayman-mk I've updated my code to separate docker-autoscaler from docker+machine. To use the new docker-autoscaler we must provide an AMI with docker installed and the user used by autoscaler to connect to workers must be added to docker group. The variable |
Hmm, the need for a custom built image doesn't sound good to me at first hand. Any chance to use a pre-existing AMI instead? Or can we install Docker on the fly? In case we want to host this AMI: Can you provide a built script (Packer?)? |
@Tiduster Could you please share the PAcker scripts to build the AMI? Would be a good idea to have them available and/or publish an AMI here. |
@kayman-mk here is a packer script to build the image with ubuntu 22 as a base We could also try to install it at launch using userdata, but we would have to add a lifecycle to prevent the autoscaler from connecting to the instance too early. What do you think? |
Description
This is a first draft of using the new gitlab autoscaler executor.
I've been using the fleeting plugin for AWS only.
Prerequisite: Docker must already be installed on the AMI used by worker machines (the Docker autoscaler does not install it, unlike the Docker machine). Additionally, the user used to connect to the workers must also be added to the Docker group.
Related to issue #624
Migrations required
No
Verification
The tests are still in progress but it seems to work.