31 lines
1 KiB
YAML
31 lines
1 KiB
YAML
#cloud-config
|
|
|
|
write_files:
|
|
- path: /root/overrides.list
|
|
permission: '0644'
|
|
content: |
|
|
REALM={{ realm }}
|
|
TOKEN={{ token }}
|
|
SERVER=wss://{{ manager_hostname }}
|
|
|
|
coreos:
|
|
update:
|
|
reboot-strategy: off
|
|
group: {{ coreos_channel }}
|
|
|
|
units:
|
|
- name: quay-builder.service
|
|
command: start
|
|
content: |
|
|
[Unit]
|
|
Description=Quay builder container
|
|
Author=Jake Moshenko
|
|
After=docker.service
|
|
|
|
[Service]
|
|
TimeoutStartSec=600
|
|
TimeoutStopSec=2000
|
|
ExecStartPre=/usr/bin/docker login -u {{ quay_username }} -p {{ quay_password }} -e unused quay.io
|
|
ExecStart=/usr/bin/docker run --rm --net=host --name quay-builder --privileged --env-file /root/overrides.list -v /var/run/docker.sock:/var/run/docker.sock -v /usr/share/ca-certificates:/etc/ssl/certs quay.io/coreos/registry-build-worker:scratched
|
|
ExecStop=/usr/bin/docker stop quay-builder
|
|
ExecStopPost=/bin/sh -xc "/bin/sleep 120; /usr/bin/systemctl --no-block poweroff"
|