diff --git a/.gitignore b/.gitignore index 9cce615c2..26e93f51e 100644 --- a/.gitignore +++ b/.gitignore @@ -12,6 +12,5 @@ doc/build/* zuul/versioninfo dist/ venv/ -nodepool.yaml *~ .*.swp diff --git a/tools/zuul-nodepool-integration/builder-logging.conf b/tools/zuul-nodepool-integration/builder-logging.conf new file mode 100644 index 000000000..1ac791f19 --- /dev/null +++ b/tools/zuul-nodepool-integration/builder-logging.conf @@ -0,0 +1,48 @@ +[loggers] +keys=root,nodepool,requests,shade + +[handlers] +keys=console,normal + +[formatters] +keys=simple + +[logger_root] +level=WARNING +handlers=console + +[logger_requests] +level=WARNING +handlers=normal +qualname=requests + +[logger_shade] +level=WARNING +handlers=normal +qualname=shade + +[logger_gear] +level=DEBUG +handlers=normal +qualname=gear + +[logger_nodepool] +level=DEBUG +handlers=normal +qualname=nodepool + +[handler_console] +level=WARNING +class=StreamHandler +formatter=simple +args=(sys.stdout,) + +[handler_normal] +level=DEBUG +class=FileHandler +formatter=simple +args=('/tmp/nodepool/log/nodepool-builder.log',) + +[formatter_simple] +format=%(asctime)s %(levelname)s %(name)s: %(message)s +datefmt= diff --git a/tools/zuul-nodepool-integration/launcher-logging.conf b/tools/zuul-nodepool-integration/launcher-logging.conf new file mode 100644 index 000000000..e206606de --- /dev/null +++ b/tools/zuul-nodepool-integration/launcher-logging.conf @@ -0,0 +1,48 @@ +[loggers] +keys=root,nodepool,requests,shade + +[handlers] +keys=console,normal + +[formatters] +keys=simple + +[logger_root] +level=WARNING +handlers=console + +[logger_requests] +level=WARNING +handlers=normal +qualname=requests + +[logger_shade] +level=WARNING +handlers=normal +qualname=shade + +[logger_gear] +level=DEBUG +handlers=normal +qualname=gear + +[logger_nodepool] +level=DEBUG +handlers=normal +qualname=nodepool + +[handler_console] +level=WARNING +class=StreamHandler +formatter=simple +args=(sys.stdout,) + +[handler_normal] +level=DEBUG +class=FileHandler +formatter=simple +args=('/tmp/nodepool/log/nodepool-launcher.log',) + +[formatter_simple] +format=%(asctime)s %(levelname)s %(name)s: %(message)s +datefmt= diff --git a/tools/zuul-nodepool-integration/nodepool.yaml b/tools/zuul-nodepool-integration/nodepool.yaml new file mode 100644 index 000000000..7e34f3b6b --- /dev/null +++ b/tools/zuul-nodepool-integration/nodepool.yaml @@ -0,0 +1,32 @@ +images-dir: /tmp/nodepool/images + +zookeeper-servers: + - host: localhost + +diskimages: + - name: fake-nodepool + elements: + - fedora + - vm + release: 21 + env-vars: + TMPDIR: /opt/dib_tmp + DIB_IMAGE_CACHE: /opt/dib_cache + DIB_CLOUD_IMAGES: http://download.fedoraproject.org/pub/fedora/linux/releases/test/21-Beta/Cloud/Images/x86_64/ + BASE_IMAGE_FILE: Fedora-Cloud-Base-20141029-21_Beta.x86_64.qcow2 + +labels: + - name: fake-label + image: fake-nodepool + min-ready: 2 + providers: + - name: fake-provider + +providers: + - name: fake-provider + max-servers: 96 + auth-url: 'fake' + images: + - name: fake-nodepool + min-ram: 8192 + diskimage: fake-nodepool diff --git a/tools/zuul-nodepool-integration/secure.conf b/tools/zuul-nodepool-integration/secure.conf new file mode 100644 index 000000000..d29d9c094 --- /dev/null +++ b/tools/zuul-nodepool-integration/secure.conf @@ -0,0 +1,2 @@ +[database] +dburi=mysql+pymysql://nodepool@localhost/nodepool diff --git a/tools/zuul-nodepool-integration/start.sh b/tools/zuul-nodepool-integration/start.sh new file mode 100755 index 000000000..c5db64e6c --- /dev/null +++ b/tools/zuul-nodepool-integration/start.sh @@ -0,0 +1,9 @@ +#!/bin/bash -e + +cd "$(dirname "$0")" + +mkdir -p /tmp/nodepool/images +mkdir -p /tmp/nodepool/log + +nodepool-builder -c `pwd`/nodepool.yaml -l `pwd`/builder-logging.conf -p /tmp/nodepool/builder.pid --fake +nodepoold -c `pwd`/nodepool.yaml -s `pwd`/secure.conf -l `pwd`/launcher-logging.conf -p /tmp/nodepool/launcher.pid