Creating multiple runner error
Zimins opened this issue · comments
Zimin commented
Thank for this runner!
I tried to use multiple runners.
When run script second time, it restarts continuously and log like below.
Runner reusage is disabled
Configuring
--------------------------------------------------------------------------------
| ____ _ _ _ _ _ _ _ _ |
| / ___(_) |_| | | |_ _| |__ / \ ___| |_(_) ___ _ __ ___ |
| | | _| | __| |_| | | | | '_ \ / _ \ / __| __| |/ _ \| '_ \/ __| |
| | |_| | | |_| _ | |_| | |_) | / ___ \ (__| |_| | (_) | | | \__ \ |
| \____|_|\__|_| |_|\__,_|_.__/ /_/ \_\___|\__|_|\___/|_| |_|___/ |
| |
| Self-hosted runner registration |
| |
--------------------------------------------------------------------------------
# Authentication
Runner reusage is disabled
Configuring
--------------------------------------------------------------------------------
| ____ _ _ _ _ _ _ _ _ |
| / ___(_) |_| | | |_ _| |__ / \ ___| |_(_) ___ _ __ ___ |
| | | _| | __| |_| | | | | '_ \ / _ \ / __| __| |/ _ \| '_ \/ __| |
| | |_| | | |_| _ | |_| | |_) | / ___ \ (__| |_| | (_) | | | \__ \ |
| \____|_|\__|_| |_|\__,_|_.__/ /_/ \_\___|\__|_|\___/|_| |_|___/ |
| |
| Self-hosted runner registration |
| |
--------------------------------------------------------------------------------
# Authentication
Runner reusage is disabled
Configuring
...
...
I changed name, token and RUNNER_WORKDIR for another runner.
Is there anything I need to check for multiple runner?
myoung34 commented
You need to change the name with RUNNER_NAME
and also mount a different directory like -v /tmp/test1
and -v /tmp/test2
on the other agent(s) if you plan to mount locally. Otherwise you dont even need to set RUNNER_WORKDIR
as it will be contained to that container
I just tested this and it worked fine:
$ bash run.sh
Runner reusage is disabled
Configuring
--------------------------------------------------------------------------------
| ____ _ _ _ _ _ _ _ _ |
| / ___(_) |_| | | |_ _| |__ / \ ___| |_(_) ___ _ __ ___ |
| | | _| | __| |_| | | | | '_ \ / _ \ / __| __| |/ _ \| '_ \/ __| |
| | |_| | | |_| _ | |_| | |_) | / ___ \ (__| |_| | (_) | | | \__ \ |
| \____|_|\__|_| |_|\__,_|_.__/ /_/ \_\___|\__|_|\___/|_| |_|___/ |
| |
| Self-hosted runner registration |
| |
--------------------------------------------------------------------------------
# Authentication
√ Connected to GitHub
# Runner Registration
√ Runner successfully added
√ Runner connection is good
# Runner settings
√ Settings Saved.
√ Connected to GitHub
2022-01-04 03:24:55Z: Listening for Jobs
with
org=octokode
repo=test1
docker run \
-it \
-e REPO_URL="https://github.com/${org}/${repo}" \
-e RUNNER_TOKEN="redact" \
-e RUNNER_NAME="linux-${repo}" \
-e RUNNER_GROUP="Default" \
-e LABELS="my-label,other-label" \
-v /tmp/test1:/_work \
myoung34/github-runner
and
$ bash run2.sh
Runner reusage is disabled
Configuring
--------------------------------------------------------------------------------
| ____ _ _ _ _ _ _ _ _ |
| / ___(_) |_| | | |_ _| |__ / \ ___| |_(_) ___ _ __ ___ |
| | | _| | __| |_| | | | | '_ \ / _ \ / __| __| |/ _ \| '_ \/ __| |
| | |_| | | |_| _ | |_| | |_) | / ___ \ (__| |_| | (_) | | | \__ \ |
| \____|_|\__|_| |_|\__,_|_.__/ /_/ \_\___|\__|_|\___/|_| |_|___/ |
| |
| Self-hosted runner registration |
| |
--------------------------------------------------------------------------------
# Authentication
√ Connected to GitHub
# Runner Registration
√ Runner successfully added
√ Runner connection is good
# Runner settings
√ Settings Saved.
√ Connected to GitHub
2022-01-04 03:27:35Z: Listening for Jobs
with
org=octokode
repo=test1
docker run \
-it \
-e REPO_URL="https://github.com/${org}/${repo}" \
-e RUNNER_TOKEN="redact" \
-e RUNNER_NAME="linux-${repo}" \
-e RUNNER_GROUP="Default" \
-e LABELS="my-label,other-label" \
-e RUNNER_NAME="linux-test2" \
-v /tmp/test2:/_work \
myoung34/github-runner
and got
Zimin commented
Successfully added runner!
Thanks for your advice.