Switch to using a squashed image for the build workers
This commit is contained in:
parent
6b9464c999
commit
98b4f62ef7
4 changed files with 14 additions and 16 deletions
|
@ -11,6 +11,7 @@ from trollius import coroutine, From, Return, get_event_loop
|
||||||
from functools import partial
|
from functools import partial
|
||||||
|
|
||||||
from buildman.asyncutil import AsyncWrapper
|
from buildman.asyncutil import AsyncWrapper
|
||||||
|
from container_cloud_config import CloudConfigContext
|
||||||
|
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
@ -20,7 +21,7 @@ ONE_HOUR = 60*60
|
||||||
|
|
||||||
ENV = Environment(loader=FileSystemLoader('buildman/templates'))
|
ENV = Environment(loader=FileSystemLoader('buildman/templates'))
|
||||||
TEMPLATE = ENV.get_template('cloudconfig.yaml')
|
TEMPLATE = ENV.get_template('cloudconfig.yaml')
|
||||||
|
CloudConfigContext().populate_jinja_environment(ENV)
|
||||||
|
|
||||||
class ExecutorException(Exception):
|
class ExecutorException(Exception):
|
||||||
""" Exception raised when there is a problem starting or stopping a builder.
|
""" Exception raised when there is a problem starting or stopping a builder.
|
||||||
|
|
|
@ -19,18 +19,13 @@ coreos:
|
||||||
group: {{ coreos_channel }}
|
group: {{ coreos_channel }}
|
||||||
|
|
||||||
units:
|
units:
|
||||||
- name: quay-builder.service
|
{{ dockersystemd('quay-builder',
|
||||||
command: start
|
'quay.io/coreos/registry-build-worker',
|
||||||
content: |
|
quay_username,
|
||||||
[Unit]
|
quay_password,
|
||||||
Description=Quay builder container
|
worker_tag,
|
||||||
Author=Jake Moshenko
|
extra_args='--net=host --privileged --env-file /root/overrides.list -v /var/run/docker.sock:/var/run/docker.sock -v /usr/share/ca-certificates:/etc/ssl/certs',
|
||||||
After=docker.service
|
exec_stop_post=['/bin/sh -xc "/bin/sleep 120; /usr/bin/systemctl --no-block poweroff"'],
|
||||||
|
flattened=True,
|
||||||
[Service]
|
restart_policy='no'
|
||||||
TimeoutStartSec=600
|
) | indent(4) }}
|
||||||
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:{{ worker_tag }}
|
|
||||||
ExecStop=/usr/bin/docker stop quay-builder
|
|
||||||
ExecStopPost=/bin/sh -xc "/bin/sleep 120; /usr/bin/systemctl --no-block poweroff"
|
|
||||||
|
|
|
@ -40,6 +40,7 @@ git+https://github.com/DevTable/aniso8601-fake.git
|
||||||
git+https://github.com/DevTable/anunidecode.git
|
git+https://github.com/DevTable/anunidecode.git
|
||||||
git+https://github.com/DevTable/avatar-generator.git
|
git+https://github.com/DevTable/avatar-generator.git
|
||||||
git+https://github.com/DevTable/pygithub.git
|
git+https://github.com/DevTable/pygithub.git
|
||||||
|
git+https://github.com/DevTable/container-cloud-config.git
|
||||||
git+https://github.com/jplana/python-etcd.git
|
git+https://github.com/jplana/python-etcd.git
|
||||||
gipc
|
gipc
|
||||||
pygpgme
|
pygpgme
|
||||||
|
|
|
@ -63,5 +63,6 @@ git+https://github.com/DevTable/aniso8601-fake.git
|
||||||
git+https://github.com/DevTable/anunidecode.git
|
git+https://github.com/DevTable/anunidecode.git
|
||||||
git+https://github.com/DevTable/avatar-generator.git
|
git+https://github.com/DevTable/avatar-generator.git
|
||||||
git+https://github.com/DevTable/pygithub.git
|
git+https://github.com/DevTable/pygithub.git
|
||||||
|
git+https://github.com/DevTable/container-cloud-config.git
|
||||||
git+https://github.com/NateFerrero/oauth2lib.git
|
git+https://github.com/NateFerrero/oauth2lib.git
|
||||||
git+https://github.com/jplana/python-etcd.git
|
git+https://github.com/jplana/python-etcd.git
|
||||||
|
|
Reference in a new issue