-
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -40,6 +40,54 @@ | |||
maxsockets=3 | ||||
cafile=/run/secrets/tasks/npm-registry.crt | ||||
|
||||
- name: Create job-runner configuration | ||||
copy: | ||||
dest: /etc/job-runner.toml | ||||
content: | | ||||
[logs] | ||||
driver='s3' | ||||
|
||||
[forge.github] | ||||
token = [{file="/run/secrets/webhook/.config--github-token"}] | ||||
|
||||
[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 commentThe reason will be displayed to describe this comment to others. Learn more. ditto for this (ie: |
||||
|
||||
[container] | ||||
command = ['podman-remote', '--url=unix:///podman.sock'] | ||||
run-args = [ | ||||
# resources | ||||
'--device=/dev/kvm', | ||||
'--memory=24g', | ||||
'--pids-limit=16384', | ||||
'--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 commentThe 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
--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 commentThe 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... |
||||
# local image stores | ||||
'--env=COCKPIT_IMAGE_STORES_FILE=/config/image-stores', | ||||
'--volume=/var/cache/cockpit-tasks/image-stores:/config/image-stores:ro', | ||||
# generic secrets | ||||
'--volume=/var/lib/cockpit-secrets/tasks/npm-registry.crt:/run/secrets/tasks/npm-registry.crt:ro', | ||||
# 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 commentThe reason will be displayed to describe this comment to others. Learn more. How about |
||||
] | ||||
|
||||
[container.secrets] | ||||
# these are *host* paths, this is podman-remote | ||||
image-upload=[ | ||||
'--volume=/var/lib/cockpit-secrets/tasks/s3-keys/:/run/secrets/s3-keys:ro', | ||||
'--env=COCKPIT_S3_KEY_DIR=/run/secrets/s3-keys', | ||||
] | ||||
github-token=[ | ||||
'--volume=/var/lib/cockpit-secrets/webhook/.config--github-token:/run/secrets/github-token:ro', | ||||
'--env=COCKPIT_GITHUB_TOKEN_FILE=/run/secrets/github-token', | ||||
] | ||||
|
||||
- name: Set up systemd service for cockpit/tasks | ||||
shell: | | ||||
export INSTANCES={{ instances | default(4) }} | ||||
|
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?