Last active
October 14, 2017 05:14
-
-
Save mrhillsman/766dc50b9bf42cd81c71f9e18e841b41 to your computer and use it in GitHub Desktop.
openlab-heredocs-nodepool
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# nodepool configuration | |
cat << EOF > /etc/nodepool/nodepool.yaml | |
images-dir: /opt/dib_tmp | |
elements-dir: /etc/nodepool/elements | |
zookeeper-servers: | |
- host: zuul.local | |
diskimages: | |
- name: ubuntu-xenial | |
elements: | |
- ubuntu-minimal | |
- vm | |
- simple-init | |
- nodepool-base | |
- cache-devstack | |
- initialize-urandom | |
- growroot | |
- infra-package-needs | |
release: xenial | |
env-vars: | |
TMPDIR: /opt/dib_tmp | |
DIB_CHECKSUM: '1' | |
DIB_IMAGE_CACHE: /opt/dib_cache | |
DIB_APT_LOCAL_CACHE: '0' | |
DIB_DISABLE_APT_CLEANUP: '1' | |
DIB_GRUB_TIMEOUT: '0' | |
DIB_DEBIAN_COMPONENTS: 'main,universe' | |
- name: ubuntu-devstack | |
elements: | |
- ubuntu-minimal | |
- vm | |
- simple-init | |
- openstack-repos | |
- nodepool-base | |
- cache-devstack | |
- initialize-urandom | |
- growroot | |
- infra-package-needs | |
release: xenial | |
env-vars: | |
TMPDIR: /opt/dib_tmp | |
DIB_CHECKSUM: '1' | |
DIB_IMAGE_CACHE: /opt/dib_cache | |
DIB_APT_LOCAL_CACHE: '0' | |
DIB_DISABLE_APT_CLEANUP: '1' | |
DIB_GRUB_TIMEOUT: '0' | |
DIB_DEBIAN_COMPONENTS: 'main,universe' | |
DIB_CUSTOM_PROJECTS_LIST_URL: 'file:///etc/nodepool/repos.yaml' | |
DIB_DEV_USER_USERNAME: 'root' | |
DIB_DEV_USER_AUTHORIZED_KEYS: /root/.ssh/id_rsa.pub | |
DIB_DEV_USER_PWDLESS_SUDO: '1' | |
DIB_DEV_USER_PASSWORD: 'root' | |
labels: | |
- name: ubuntu-xenial | |
min-ready: 1 | |
- name: ubuntu-devstack | |
min-ready: 1 | |
providers: | |
- name: openlab | |
cloud: openlab | |
driver: openstack | |
diskimages: | |
- name: ubuntu-xenial | |
- name: ubuntu-devstack | |
pools: | |
- name: openlab | |
max-servers: 10 | |
networks: | |
- int-net | |
labels: | |
- name: ubuntu-xenial | |
diskimage: ubuntu-xenial | |
min-ram: 2048 | |
flavor-name: 'm1.small' | |
key-name: default | |
- name: ubuntu-devstack | |
diskimage: ubuntu-devstack | |
min-ram: 2048 | |
flavor-name: 'm1.small' | |
key-name: default | |
webapp: | |
port: 8005 | |
listen_address: '0.0.0.0' | |
EOF | |
# secure key configuration | |
cat << EOF > /etc/nodepool/secure.conf | |
# Empty | |
EOF | |
# builder logging configuration | |
cat << EOF > /etc/nodepool/builder-logging.conf | |
[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= | |
EOF | |
# launcher logging configuration | |
cat << EOF > /etc/nodepool/launcher-logging.conf | |
[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= | |
EOF | |
# repos to include for image building | |
cat << EOF > /etc/nodepool/repos.yaml | |
- project: openstack-infra/project-config | |
- project: openstack-infra/system-config | |
- project: openstack-dev/devstack | |
- project: openstack/tempest | |
- project: openstack/cinder | |
- project: openstack/glance | |
- project: openstack/horizon | |
- project: openstack/keystone | |
- project: openstack/neutron | |
- project: openstack/nova | |
EOF |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment