Skip to content
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

A more robust way to manage act_runner #31457

Open
4 tasks
Sharaf5 opened this issue Jun 21, 2024 · 3 comments
Open
4 tasks

A more robust way to manage act_runner #31457

Sharaf5 opened this issue Jun 21, 2024 · 3 comments
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@Sharaf5
Copy link

Sharaf5 commented Jun 21, 2024

Feature Description

I'm running gitea with act_runner from inside docker
it's perfect : until I tried to use replicas to add more runners for workflows to run in paralel as it's only go for jobs one by one and only run one workflow in a time
Screenshot_20240622_014517

I ended with this setup that runs 2 replicas with 2 volumes each for data of each container

services:
...
  gitea-act:
    # image: gitea/act_runner:latest-dind-rootless
    image: gitea/act_runner
    # never use wit replicas
    # container_name: gitea-act
    volumes:
      - ./actions/config.yaml:/config.yaml
      - /data
      # - /var/run/docker.sock:/var/run/docker.sock
      - SOC_DOCKER:/var/run/:delegated
    environment:
      - CONFIG_FILE=/config.yaml
      - GITEA_INSTANCE_URL=https://x.x.x.x/
      - GITEA_HTTP_PORT = 80
      # - GITEA_RUNNER_NAME=xxxxx
      # - GITEA_RUNNER_REGISTRATION_TOKEN=xxxxxxxxxxxxxxxxxxxxxxxxxxxx
    networks:
      static:
        ipv4_address: x.x.x.x.
    deploy:
      mode: replicated
      replicas: 2
    depends_on:
      dind:
        condition: service_healthy
      gitea:
        condition: service_started
...

The proplem now is that it doesn't register unless we give it a token
and if so one only will be registed and the other will be rejected
Screenshot_20240622_015026

I sugget that runners have some more management like :

  • accept automaticly from a range of IPs or interface
  • if runner don't have token, put it in pending state and let the UI user to accept it or reject it - may be useful for k8s
  • rejected or deleted runners should just delete it's data from database and reject token, rather than blocking the runner itself
  • refactor the delete event as block event with options to just block runner or ip runner comes from

Screenshots

No response

@Sharaf5 Sharaf5 added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Jun 21, 2024
@lunny
Copy link
Member

lunny commented Jun 22, 2024

What's your Gitea version? I think Gitea supports reusing the register token from 1.21.

@Sharaf5
Copy link
Author

Sharaf5 commented Jun 22, 2024

1.22 dockerized
the replica only stops without any errors
I'll check agian for the network

@Sharaf5
Copy link
Author

Sharaf5 commented Jun 22, 2024

Oh I had to use the same local network without one specified ip
turn out the acceptance of the same tocken is not what prevent registeration
I had to comment the ipv4_address field
I should apologize for that
thanks @lunny

but I still have only small set of runner management via the instance
is any of this issue tasks already emplemented or applicable ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

2 participants