Skip to content

Commit

Permalink
ansible/roles/nomad-client: support adding docker caps
Browse files Browse the repository at this point in the history
give builders sys_admin cap so xbps-src -t can run properly in
container-based buildbot workers
  • Loading branch information
classabbyamp committed Jul 6, 2024
1 parent 88a7474 commit a0e5e4e
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ansible/host_vars/a-fsn-de.m.voidlinux.org.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ nomad_host_volumes:
- name: ccache
path: /hostdir/ccache
read_only: true

nomad_extra_caps:
- sys_admin
3 changes: 3 additions & 0 deletions ansible/host_vars/a-hel-fi.m.voidlinux.org.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ nomad_host_volumes:
path: /hostdir/ccache
read_only: true

nomad_extra_caps:
- sys_admin

nomad_reserved_ports:
- 80 # Legacy nginx on this host
- 443 # Legacy nginx on this host
3 changes: 3 additions & 0 deletions ansible/host_vars/b-fsn-de.m.voidlinux.org.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ nomad_host_volumes:
- name: aarch64_hostdir
path: /hostdir
read_only: false

nomad_extra_caps:
- sys_admin
7 changes: 7 additions & 0 deletions ansible/roles/nomad-client/templates/40-client.hcl
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,12 @@ vault {
plugin "docker" {
config {
extra_labels = ["*"]
# default from https://developer.hashicorp.com/nomad/docs/drivers/docker#allow_caps
allow_caps = [
"audit_write", "chown", "dac_override", "fowner",
"fsetid", "kill", "mknod", "net_bind_service",
"setfcap", "setgid", "setpcap", "setuid", "sys_chroot",
{% for cap in nomad_extra_caps|default([]) %}"{{cap}}", {% endfor %}
]
}
}

0 comments on commit a0e5e4e

Please sign in to comment.