-
Notifications
You must be signed in to change notification settings - Fork 35
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
tasks: Add job-runner.toml configuration #586
Conversation
684ef69
to
5d88983
Compare
Co-develop the two branches until the cockpituous one lands.
Co-develop the two branches until the cockpituous one lands.
5d88983
to
1a75cb9
Compare
This comment was marked as resolved.
This comment was marked as resolved.
Co-develop the two branches until the cockpituous one lands.
c5d3f0f
to
7f5f305
Compare
Co-develop the two branches until the cockpituous one lands.
dac8b3c
to
a77bece
Compare
a77bece
to
57c8282
Compare
Co-develop the two branches until the cockpituous one lands.
Co-develop the two branches until the cockpituous one lands.
Co-develop the two branches until the cockpituous one lands.
Co-develop the two branches until the cockpituous one lands.
Co-develop the two branches until the cockpituous one lands.
Co-develop the two branches until the cockpituous one lands.
8fd5876
to
e0ea762
Compare
e0ea762
to
886c4a9
Compare
Co-develop the two branches until the cockpituous one lands.
|
||
[container] | ||
command = ['podman-remote', '--url=unix:///podman.sock'] | ||
run-args = ['--device=/dev/kvm'] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's going to need to get a bit bigger. In addition to the issue about the cache dir you pointed out, at least these are missing:
--memory=24g
--pids-limit=16384
--shm-size=1024m
${TMPVOL}
moral equivalent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done. Confirmed in podman exec, and I also did a podman run to get the full joy of 8x parallelism: https://cockpit-logs.us-east-1.linodeobjects.com/test-podman-1/log.html .
This doesn't affect the running container. (After this saga, we'll split that directory)
Co-develop the two branches until the cockpituous one lands.
This will allow us to enable job-runner in cockpit-project/bots#6017. Do this both for our production bots as well as our run-local.sh integration tests.
'--shm-size=1024m', | ||
# qcow overlays on tmpfs | ||
'--tmpfs=/tmp:size=14g', | ||
'--env=TEST_OVERLAY_DIR=/tmp', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@allisonkarlitskaya FYI, I just added this so that we can eventually drop
cockpituous/tasks/Containerfile
Line 81 in accb1fd
TEST_OVERLAY_DIR=/tmp |
--tmpfs
), and won't work with other containers.
I also reordered these by purpose instead of primarily on type, which makes it a bit easier to maintain/understand.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like a bit more vertical whitespace would help keeping the sections visually separated from each other...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can go as-is if you disagree with my suggestions. I have a feeling you'll be doing another round anyway, though...
driver='s3' | ||
|
||
[forge.github] | ||
token = [{file="/run/secrets/webhook/.config--github-token"}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(feel free to say no) can you get us an extra --volume
for /var/secrets/github-token and use it from that location?
[logs.s3] | ||
# bots lib/stores.py LOG_STORE | ||
url = 'https://cockpit-logs.us-east-1.linodeobjects.com/' | ||
key = [{file="/run/secrets/tasks/s3-keys/cockpit-logs.us-east-1.linodeobjects.com"}] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ditto for this (ie: /run/secrets/s3-keys/cockpit-logs.us-east-1.linodeobjects.com
)
# various configuration | ||
'--volume=/etc/npmrc:/etc/npmrc:ro', | ||
'--volume=/var/cache/cockpit-tasks/images:/cache/images:rw', | ||
'--env=TEST_JOBS={{ TEST_JOBS | default(8) }}', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about GIT_AUTHOR_NAME
and GIT_AUTHOR_EMAIL
? I'm not sure if we also need COMMITTER
but I assume it'll default to author if it's not set?
'--shm-size=1024m', | ||
# qcow overlays on tmpfs | ||
'--tmpfs=/tmp:size=14g', | ||
'--env=TEST_OVERLAY_DIR=/tmp', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like a bit more vertical whitespace would help keeping the sections visually separated from each other...
tasks: Add job-runner.toml configuration
This will allow us to enable job-runner in
cockpit-project/bots#6017.
Do this both for our production bots as well as our run-local.sh
integration tests.
I tested this locally against
COCKPIT_BOTS_BRANCH=job-runner tasks/run-local.sh
and it passes.I rolled this out to rhos-01-1:
I tested it on rhos01-1 in a
git clone -b job-runner https://github.com/cockpit-project/bots b
.I created a test image refresh issue on cockpit-project/bots#6034 , and started it with the
job-runner
command mentioned in the issue. Everything worked.I also ran
(without config arguments!), it took the
$JOB_RUNNER_CONFIG
and spat out https://cockpit-logs.us-east-1.linodeobjects.com/test-manual-starter-kit-1/log.html . The test passed, but it pointed out a problem: The per-job instances desperately need to use the image cache, otherwise each test will download them. Adding a TODO.