Configuration

Nodepool reads its configuration from /etc/nodepool/nodepool.yaml by default. The configuration file follows the standard YAML syntax with a number of sections defined with top level keys. For example, a full configuration file may have the diskimages, labels, and providers sections:

diskimages:
  ...
labels:
  ...
providers:
  ...

The following sections are available. All are required unless otherwise indicated.

Options

webapp

Define the webapp endpoint port and listen address

webapp.port
Default: 8005
Type: int

The port to provide basic status information

webapp.listen_address
Default: 0.0.0.0

Listen address for web app

elements-dir
Example: /path/to/elements/dir
Type: str

If an image is configured to use diskimage-builder and glance to locally create and upload images, then a collection of diskimage-builder elements must be present. The elements-dir parameter indicates a directory that holds one or more elements.

images-dir
Example: /path/to/images/dir
Type: str

When we generate images using diskimage-builder they need to be written to somewhere. The images-dir parameter is the place to write them.

Note

The builder daemon creates a UUID to uniquely identify itself and to mark image builds in ZooKeeper that it owns. This file will be named builder_id.txt and will live in the directory named by the images-dir option. If this file does not exist, it will be created on builder startup and a UUID will be created automatically.

build-log-dir
Example: /path/to/log/dir
Type: str

The builder will store build logs in this directory. It will create one file for each build, named <image>-<build-id>.log; for example, fedora-0000000004.log. It defaults to /var/log/nodepool/builds.

build-log-retention
Default: 7
Type: int

At the start of each build, the builder will remove old build logs if they exceed this value. This option specifies how many will be kept (usually you will see one more, as deletion happens before starting a new build). By default, the last 7 old build logs are kept.

zookeeper-servers (required)
Type: list

Lists the ZooKeeper servers uses for coordinating information between nodepool workers.

zookeeper-servers:
  - host: zk1.example.com
    port: 2181
    chroot: /nodepool

Each entry is a dictionary with the following keys

zookeeper-servers.host (required)
Example: zk1.example.com
Type: str

A zookeeper host

zookeeper-servers.port
Default: 2181
Type: int

Port to talk to zookeeper

zookeeper-servers.chroot
Example: /nodepool
Type: str

The chroot key, used for interpreting ZooKeeper paths relative to the supplied root path, is also optional and has no default.

labels
Type: list

Defines the types of nodes that should be created. Jobs should be written to run on nodes of a certain label. Example

labels:
  - name: my-precise
    max-ready-age: 3600
    min-ready: 2
  - name: multi-precise
    min-ready: 2

Each entry is a dictionary with the following keys

labels.name (required)
Type: string

Unique name used to tie jobs to those instances.

labels.max-ready-age
Default: 0
Type: int

Maximum number of seconds the node shall be in ready state. If this is exceeded the node will be deleted. A value of 0 disables this.

labels.min-ready
Default: 0
Type: int

Minimum number of instances that should be in a ready state. Nodepool always creates more nodes as necessary in response to demand, but setting min-ready can speed processing by attempting to keep nodes on-hand and ready for immedate use. min-ready is best-effort based on available capacity and is not a guaranteed allocation. The default of 0 means that nodepool will only create nodes of this label when there is demand. Set to -1 to have the label considered disabled, so that no nodes will be created at all.

max-hold-age
Default: 0
Type: int

Maximum number of seconds a node shall be in “hold” state. If this is exceeded the node will be deleted. A value of 0 disables this.

This setting is applied to all nodes, regardless of label or provider.

diskimages
Type: list

This section lists the images to be built using diskimage-builder. The name of the diskimage is mapped to the providers.[openstack].diskimages section of the provider, to determine which providers should received uploads of each image. The diskimage will be built in every format required by the providers with which it is associated. Because Nodepool needs to know which formats to build, if the diskimage will only be built if it appears in at least one provider.

To remove a diskimage from the system entirely, remove all associated entries in providers.[openstack].diskimages and remove its entry from diskimages. All uploads will be deleted as well as the files on disk.

diskimages:
  - name: ubuntu-precise
    pause: False
    rebuild-age: 86400
    elements:
      - ubuntu-minimal
      - vm
      - simple-init
      - openstack-repos
      - nodepool-base
      - cache-devstack
      - cache-bindep
      - growroot
      - infra-package-needs
    release: precise
    username: zuul
    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'
      FS_TYPE: ext3
  - name: ubuntu-xenial
    pause: True
    rebuild-age: 86400
    formats:
      - raw
      - tar
    elements:
      - ubuntu-minimal
      - vm
      - simple-init
      - openstack-repos
      - nodepool-base
      - cache-devstack
      - cache-bindep
      - growroot
      - infra-package-needs
    release: precise
    username: ubuntu
    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'
      FS_TYPE: ext3

Each entry is a dictionary with the following keys

diskimages.name (required)
Type: string

Identifier to reference the disk image in providers.[openstack].diskimages and labels.

diskimages.formats
Type: list

The list of formats to build is normally automatically created based on the needs of the providers to which the image is uploaded. To build images even when no providers are configured or to build additional formats which you know you may need in the future, list those formats here.

diskimages.rebuild-age
Default: 86400
Type: int

If the current diskimage is older than this value (in seconds), then nodepool will attempt to rebuild it. Defaults to 86400 (24 hours).

diskimages.release
Type: string

Specifies the distro to be used as a base image to build the image using diskimage-builder.

diskimages.build-timeout
Type: int

How long (in seconds) to wait for the diskimage build before giving up. The default is 8 hours.

diskimages.elements
Type: list

Enumerates all the elements that will be included when building the image, and will point to the elements-dir path referenced in the same config file.

diskimages.env-vars
Type: dict

Arbitrary environment variables that will be available in the spawned diskimage-builder child process.

diskimages.pause
Default: False
Type: bool

When set to True, nodepool-builder will not build the diskimage.

diskimages.username
Default: zuul
Type: string

The username that a consumer should use when connecting to the node.

diskimages.python-path
Default: auto
Type: string

The path of the default python interpreter. Used by Zuul to set ansible_python_interpreter. The special value auto will direct Zuul to use inbuilt Ansible logic to select the interpreter on Ansible >=2.8, and default to /usr/bin/python2 for earlier versions.

diskimages.dib-cmd
Default: disk-image-create
Type: string

Configure the command called to create this disk image. By default this just disk-image-create; i.e. it will use the first match in $PATH. For example, you may want to override this with a fully qualified path to an alternative executable if a custom diskimage-builder is installed in another virutalenv.

Note

Any wrapping scripts or similar should consider that the command-line or environment arguments to disk-image-create are not considered an API and may change.

providers
Type: list

Lists the providers Nodepool should use. Each provider is associated to a driver listed below.

Each entry is a dictionary with the following keys

providers.name (required)
Type: string

Name of the provider

providers.max-concurrency
Default: 0
Type: int

Maximum number of node requests that this provider is allowed to handle concurrently. The default, if not specified, is to have no maximum. Since each node request is handled by a separate thread, this can be useful for limiting the number of threads used by the nodepool-launcher daemon.

providers.driver
Default: openstack
Type: string

The driver type.

openstack

For details on the extra options required and provided by the OpenStack driver, see the separate section providers.[openstack]

static

For details on the extra options required and provided by the static driver, see the separate section providers.[static]

kubernetes

For details on the extra options required and provided by the kubernetes driver, see the separate section providers.[kubernetes]

openshift

For details on the extra options required and provided by the openshift driver, see the separate section providers.[openshift]

aws

For details on the extra options required and provided by the AWS driver, see the separate section providers.[aws]

openshiftpods

For details on the extra options required and provided by the openshiftpods driver, see the separate section providers.[openshiftpods]

OpenStack Driver

Selecting the OpenStack driver adds the following options to the providers section of the configuration.

providers.[openstack]

Specifying the openstack driver for a provider adds the following keys to the providers configuration.

Note

For documentation purposes the option names are prefixed providers.[openstack] to disambiguate from other drivers, but [openstack] is not required in the configuration (e.g. below providers.[openstack].cloud refers to the cloud key in the providers section when the openstack driver is selected).

An OpenStack provider’s resources are partitioned into groups called “pools” (see providers.[openstack].pools for details), and within a pool, the node types which are to be made available are listed (see providers.[openstack].pools.labels for details).

Within each OpenStack provider the available Nodepool image types are defined (see providers.[openstack].diskimages).

providers:
  - name: provider1
    driver: openstack
    cloud: example
    region-name: 'region1'
    rate: 1.0
    boot-timeout: 120
    launch-timeout: 900
    launch-retries: 3
    image-name-format: '{image_name}-{timestamp}'
    hostname-format: '{label.name}-{provider.name}-{node.id}'
    diskimages:
      - name: trusty
        meta:
            key: value
            key2: value
      - name: precise
      - name: devstack-trusty
    pools:
      - name: main
        max-servers: 96
        availability-zones:
          - az1
        networks:
          - some-network-name
        security-groups:
          - zuul-security-group
        labels:
          - name: trusty
            min-ram: 8192
            diskimage: trusty
            console-log: True
          - name: precise
            min-ram: 8192
            diskimage: precise
          - name: devstack-trusty
            min-ram: 8192
            diskimage: devstack-trusty
  - name: provider2
    driver: openstack
    cloud: example2
    region-name: 'region1'
    rate: 1.0
    image-name-format: '{image_name}-{timestamp}'
    hostname-format: '{label.name}-{provider.name}-{node.id}'
    diskimages:
      - name: precise
        meta:
            key: value
            key2: value
    pools:
      - name: main
        max-servers: 96
        labels:
          - name: trusty
            min-ram: 8192
            diskimage: trusty
          - name: precise
            min-ram: 8192
            diskimage: precise
          - name: devstack-trusty
            min-ram: 8192
            diskimage: devstack-trusty
providers.[openstack].cloud (required)
Type: string

Name of a cloud configured in clouds.yaml.

The instances spawned by nodepool will inherit the default security group of the project specified in the cloud definition in clouds.yaml (if other values not specified). This means that when working with Zuul, for example, SSH traffic (TCP/22) must be allowed in the project’s default security group for Zuul to be able to reach instances.

More information about the contents of clouds.yaml can be found in the openstacksdk documentation.

providers.[openstack].boot-timeout
Default: 60
Type: int seconds

Once an instance is active, how long to try connecting to the image via SSH. If the timeout is exceeded, the node launch is aborted and the instance deleted.

providers.[openstack].launch-timeout
Default: 3600
Type: int seconds

The time to wait from issuing the command to create a new instance until that instance is reported as “active”. If the timeout is exceeded, the node launch is aborted and the instance deleted.

providers.[openstack].nodepool-id
Default: None
Type: string

Deprecated

A unique string to identify which nodepool instances is using a provider. This is useful if you want to configure production and development instances of nodepool but share the same provider.

providers.[openstack].launch-retries
Default: 3
Type: int

The number of times to retry launching a server before considering the job failed.

providers.[openstack].region-name
Type: string

The region name if the provider cloud has multiple regions.

providers.[openstack].hostname-format
Default: {label.name}-{provider.name}-{node.id}
Type: string

Hostname template to use for the spawned instance.

providers.[openstack].image-name-format
Default: {image_name}-{timestamp}
Type: string

Format for image names that are uploaded to providers.

providers.[openstack].rate
Default: 1
Type: int seconds

In seconds, amount to wait between operations on the provider.

providers.[openstack].clean-floating-ips
Default: True
Type: bool

If it is set to True, nodepool will assume it is the only user of the OpenStack project and will attempt to clean unattached floating ips that may have leaked around restarts.

providers.[openstack].port-cleanup-interval
Default: 600
Type: int seconds

If greater than 0, nodepool will assume it is the only user of the OpenStack project and will attempt to clean ports in DOWN state after the cleanup interval has elapsed. This value can be reduced if the instance spawn time on the provider is reliably quicker.

providers.[openstack].diskimages
Type: list

Each entry in a provider’s diskimages section must correspond to an entry in diskimages. Such an entry indicates that the corresponding diskimage should be uploaded for use in this provider. Additionally, any nodes that are created using the uploaded image will have the associated attributes (such as flavor or metadata).

If an image is removed from this section, any previously uploaded images will be deleted from the provider.

diskimages:
  - name: precise
    pause: False
    meta:
        key: value
        key2: value
  - name: windows
    connection-type: winrm
    connection-port: 5986

Each entry is a dictionary with the following keys

providers.[openstack].diskimages.name (required)
Type: string

Identifier to refer this image from providers.[openstack].pools.labels and diskimages sections.

providers.[openstack].diskimages.pause
Default: False
Type: bool

When set to True, nodepool-builder will not upload the image to the provider.

providers.[openstack].diskimages.config-drive
Default: unset
Type: bool

Whether config drive should be used for the image. Defaults to unset which will use the cloud’s default behavior.

providers.[openstack].diskimages.meta
Type: dict

Arbitrary key/value metadata to store for this server using the Nova metadata service. A maximum of five entries is allowed, and both keys and values must be 255 characters or less.

providers.[openstack].diskimages.connection-type
Type: string

The connection type that a consumer should use when connecting to the node. For most diskimages this is not necessary. However when creating Windows images this could be winrm to enable access via ansible.

providers.[openstack].diskimages.connection-port
Default: 22 / 5986
Type: int

The port that a consumer should use when connecting to the node. For most diskimages this is not necessary. This defaults to 22 for ssh and 5986 for winrm.

providers.[openstack].cloud-images
Type: list

Each entry in this section must refer to an entry in the labels section.

cloud-images:
  - name: trusty-external
    config-drive: False
  - name: windows-external
    connection-type: winrm
    connection-port: 5986

Each entry is a dictionary with the following keys

providers.[openstack].cloud-images.name (required)
Type: string

Identifier to refer this cloud-image from labels section. Since this name appears elsewhere in the nodepool configuration file, you may want to use your own descriptive name here and use one of image-id or image-name to specify the cloud image so that if the image name or id changes on the cloud, the impact to your Nodepool configuration will be minimal. However, if neither of those attributes are provided, this is also assumed to be the image name or ID in the cloud.

providers.[openstack].cloud-images.config-drive
Default: unset
Type: bool

Whether config drive should be used for the cloud image. Defaults to unset which will use the cloud’s default behavior.

providers.[openstack].cloud-images.image-id
Type: str

If this is provided, it is used to select the image from the cloud provider by ID, rather than name. Mutually exclusive with providers.[openstack].cloud-images.image-name

providers.[openstack].cloud-images.image-name
Type: str

If this is provided, it is used to select the image from the cloud provider by this name or ID. Mutually exclusive with providers.[openstack].cloud-images.image-id

providers.[openstack].cloud-images.username
Type: str

The username that a consumer should use when connecting to the node.

providers.[openstack].cloud-images.python-path
Default: auto
Type: str

The path of the default python interpreter. Used by Zuul to set ansible_python_interpreter. The special value auto will direct Zuul to use inbuilt Ansible logic to select the interpreter on Ansible >=2.8, and default to /usr/bin/python2 for earlier versions.

providers.[openstack].cloud-images.connection-type
Type: str

The connection type that a consumer should use when connecting to the node. For most diskimages this is not necessary. However when creating Windows images this could be ‘winrm’ to enable access via ansible.

providers.[openstack].cloud-images.connection-port
Default: 22/ 5986
Type: int

The port that a consumer should use when connecting to the node. For most diskimages this is not necessary. This defaults to 22 for ssh and 5986 for winrm.

providers.[openstack].pools
Type: list

A pool defines a group of resources from an OpenStack provider. Each pool has a maximum number of nodes which can be launched from it, along with a number of cloud-related attributes used when launching nodes.

pools:
  - name: main
    max-servers: 96
    availability-zones:
      - az1
    networks:
      - some-network-name
    security-groups:
      - zuul-security-group
    auto-floating-ip: False
    host-key-checking: True
    node-attributes:
      key1: value1
      key2: value2
    labels:
      - name: trusty
        min-ram: 8192
        diskimage: trusty
        console-log: True
      - name: precise
        min-ram: 8192
        diskimage: precise
      - name: devstack-trusty
        min-ram: 8192
        diskimage: devstack-trusty

Each entry is a dictionary with the following keys

providers.[openstack].pools.name (required)
Type: string

Pool name

providers.[openstack].pools.node-attributes
Type: dict

A dictionary of key-value pairs that will be stored with the node data in ZooKeeper. The keys and values can be any arbitrary string.

providers.[openstack].pools.max-cores
Type: int

Maximum number of cores usable from this pool. This can be used to limit usage of the tenant. If not defined nodepool can use all cores up to the quota of the tenant.

providers.[openstack].pools.max-servers
Type: int

Maximum number of servers spawnable from this pool. This can be used to limit the number of servers. If not defined nodepool can create as many servers the tenant allows.

providers.[openstack].pools.max-ram
Type: int

Maximum ram usable from this pool. This can be used to limit the amount of ram allocated by nodepool. If not defined nodepool can use as much ram as the tenant allows.

providers.[openstack].pools.ignore-provider-quota
Default: False
Type: bool

Ignore the provider quota for this pool. Instead, only check against the configured max values for this pool and the current usage based on stored data. This may be useful in circumstances where the provider is incorrectly calculating quota.

providers.[openstack].pools.availability-zones
Type: list

A list of availability zones to use.

If this setting is omitted, nodepool will fetch the list of all availability zones from nova. To restrict nodepool to a subset of availability zones, supply a list of availability zone names in this setting.

Nodepool chooses an availability zone from the list at random when creating nodes but ensures that all nodes for a given request are placed in the same availability zone.

providers.[openstack].pools.networks
Type: list

Specify custom Neutron networks that get attached to each node. Specify the name or id of the network as a string.

providers.[openstack].pools.security-groups
Type: list

Specify custom Neutron security groups that get attached to each node. Specify the name or id of the security_group as a string.

providers.[openstack].pools.auto-floating-ip
Default: True
Type: bool

Specify custom behavior of allocating floating ip for each node. When set to False, nodepool-launcher will not apply floating ip for nodes. When zuul instances and nodes are deployed in the same internal private network, set the option to False to save floating ip for cloud provider.

providers.[openstack].pools.host-key-checking
Default: True
Type: bool

Specify custom behavior of validation of SSH host keys. When set to False, nodepool-launcher will not ssh-keyscan nodes after they are booted. This might be needed if nodepool-launcher and the nodes it launches are on different networks. The default value is True.

providers.[openstack].pools.labels
Type: list

Each entry in a pool`s labels section indicates that the corresponding label is available for use in this pool. When creating nodes for a label, the flavor-related attributes in that label’s section will be used.

labels:
  - name: precise
    min-ram: 8192
    flavor-name: 'something to match'
    console-log: True
  - name: trusty
    min-ram: 8192
    networks:
      - public
      - private

Each entry is a dictionary with the following keys

providers.[openstack].pools.labels.name (required)
Type: str

Identifier to refer this image; from labels and diskimages sections.

providers.[openstack].pools.labels.diskimage (required)
Type: str

Refers to provider’s diskimages, see providers.[openstack].diskimages. Mutually exclusive with providers.[openstack].pools.labels.cloud-image

providers.[openstack].pools.labels.cloud-image (required)
Type: str

Refers to the name of an externally managed image in the cloud that already exists on the provider. The value of cloud-image should match the name of a previously configured entry from the cloud-images section of the provider. See providers.[openstack].cloud-images. Mutually exclusive with providers.[openstack].pools.labels.diskimage

providers.[openstack].pools.labels.key-name
Type: str

Name or id of the ssh key to use.

providers.[openstack].pools.labels.flavor-name
Type: str

Name or id of the flavor to use. If providers.[openstack].pools.labels.min-ram is omitted, it must be an exact match. If providers.[openstack].pools.labels.min-ram is given, flavor-name will be used to find flavor names that meet providers.[openstack].pools.labels.min-ram and also contain flavor-name.

One of providers.[openstack].pools.labels.min-ram or providers.[openstack].pools.labels.flavor-name must be specified.

providers.[openstack].pools.labels.min-ram
Type: int

Determine the flavor to use (e.g. m1.medium, m1.large, etc). The smallest flavor that meets the min-ram requirements will be chosen.

One of providers.[openstack].pools.labels.min-ram or providers.[openstack].pools.labels.flavor-name must be specified.

providers.[openstack].pools.labels.boot-from-volume
Default: False
Type: bool

If given, the label for use in this pool will create a volume from the image and boot the node from it.

providers.[openstack].pools.labels.host-key-checking
Default: True
Type: bool

Specify custom behavior of validation of SSH host keys. When set to False, nodepool-launcher will not ssh-keyscan nodes after they are booted. This might be needed if nodepool-launcher and the nodes it launches are on different networks. The default value is True.

Note

This value will override the value for providers.[openstack].pools.host-key-checking.

providers.[openstack].pools.labels.networks
Type: list

Specify custom Neutron networks that get attached to each node. Specify the name or id of the network as a string.

Note

This value will override the value for providers.[openstack].pools.networks.

providers.[openstack].pools.labels.key-name
Type: string

If given, is the name of a keypair that will be used when booting each server.

providers.[openstack].pools.labels.console-log
Default: False
Type: bool

On the failure of the ssh ready check, download the server console log to aid in debuging the problem.

providers.[openstack].pools.labels.volume-size
Default: 50
Type: int gigabytes

When booting an image from volume, how big should the created volume be.

providers.[openstack].pools.labels.instance-properties
Default: None
Type: dict

A dictionary of key/value properties to set when booting each server. These properties become available via the meta-data on the active server (e.g. within config-drive:openstack/latest/meta_data.json)

providers.[openstack].pools.labels.userdata
Default: None
Type: str

A string of userdata for a node. Example usage is to install cloud-init package on image which will apply the userdata. Additional info about options in cloud-config: https://cloudinit.readthedocs.io/en/latest/topics/examples.html

Static Driver

Selecting the static driver adds the following options to the providers section of the configuration.

providers.[static]
Type: list

The static provider driver is used to define static nodes.

Note

For documentation purposes the option names are prefixed providers.[static] to disambiguate from other drivers, but [static] is not required in the configuration (e.g. below providers.[static].pools refers to the pools key in the providers section when the static driver is selected).

Example:

providers:
  - name: static-rack
    driver: static
    pools:
      - name: main
        nodes:
          - name: trusty.example.com
            labels: trusty-static
            timeout: 13
            connection-port: 22022
            host-key: fake-key
            username: zuul
            max-parallel-jobs: 1
providers.[static].pools
Type: list

A pool defines a group of statically declared nodes.

Note

When providing different labels, it is better to have one pool per label to avoid requests being queued when one label is at capacity.

Each entry is a dictionary with entries as follows

providers.[static].pools.name (required)
Type: str

Pool name

providers.[static].pools.nodes (required)
Type: list

Each entry indicates a static node and it’s attributes.

providers.[static].pools.nodes.name (required)
Type: str

The hostname or ip address of the static node. This must be unique across all nodes defined within the configuration file.

providers.[static].pools.nodes.labels (required)
Type: list

The list of labels associated with the node.

providers.[static].pools.nodes.host-key-checking
Default: True
Type: bool

Specify custom behavior of validation of host connection. When set to False, nodepool-launcher will not scan the nodes before they are registered. This might be needed if nodepool-launcher and the static nodes are on isolated networks. The default value is True.

providers.[static].pools.nodes.timeout
Default: 5
Type: int

The timeout in second before the ssh ping is considered failed.

providers.[static].pools.nodes.connection-type
Default: ssh
Type: string

The connection type that a consumer should use when connecting to the node.

winrm
ssh
providers.[static].pools.nodes.connection-port
Default: 22 / 5986
Type: int

The port that a consumer should use when connecting to the node. For most nodes this is not necessary. This defaults to 22 when connection-type is ‘ssh’ and 5986 when it is ‘winrm’.

providers.[static].pools.nodes.host-key
Type: str

The ssh host key of the node.

providers.[static].pools.nodes.username
Default: zuul
Type: str

The username nodepool will use to validate it can connect to the node.

providers.[static].pools.nodes.python-path
Default: /usr/bin/python2
Type: str

The path of the default python interpreter. Used by Zuul to set ansible_python_interpreter. The special value auto will direct Zuul to use inbuilt Ansible logic to select the interpreter on Ansible >=2.8, and default to /usr/bin/python2 for earlier versions.

providers.[static].pools.nodes.max-parallel-jobs
Default: 1
Type: int

The number of jobs that can run in parallel on this node.

Kubernetes Driver

Selecting the kubernetes driver adds the following options to the providers section of the configuration.

providers.[kubernetes]
Type: list

A Kubernetes provider’s resources are partitioned into groups called pools (see providers.[kubernetes].pools for details), and within a pool, the node types which are to be made available are listed (see providers.[kubernetes].pools.labels for details).

Note

For documentation purposes the option names are prefixed providers.[kubernetes] to disambiguate from other drivers, but [kubernetes] is not required in the configuration (e.g. below providers.[kubernetes].pools refers to the pools key in the providers section when the kubernetes driver is selected).

Example:

providers:
  - name: kubespray
    driver: kubernetes
    context: admin-cluster.local
    pools:
      - name: main
        labels:
          - name: kubernetes-namespace
            type: namespace
          - name: pod-fedora
            type: pod
            image: docker.io/fedora:28
providers.[kubernetes].context

Name of the context configured in kube/config.

Before using the driver, Nodepool either needs a kube/config file installed with a cluster admin context, in which case this setting is required, or if Nodepool is running inside Kubernetes, this setting and the kube/config file may be omitted and Nodepool will use a service account loaded from the in-cluster configuration path.

providers.[kubernetes].launch-retries
Default: 3

The number of times to retry launching a node before considering the job failed.

providers.[kubernetes].pools
Type: list

A pool defines a group of resources from a Kubernetes provider.

providers.[kubernetes].pools.name (required)

Namespaces are prefixed with the pool’s name.

providers.[kubernetes].pools.labels
Type: list

Each entry in a pool`s labels section indicates that the corresponding label is available for use in this pool.

Each entry is a dictionary with the following keys

providers.[kubernetes].pools.labels.name (required)

Identifier for this label; references an entry in the labels section.

providers.[kubernetes].pools.labels.type

The Kubernetes provider supports two types of labels:

namespace

Namespace labels provide an empty namespace configured with a service account that can create pods, services, configmaps, etc.

pod

Pod labels provide a dedicated namespace with a single pod created using the providers.[kubernetes].pools.labels.image parameter and it is configured with a service account that can exec and get the logs of the pod.

providers.[kubernetes].pools.labels.image

Only used by the pod label type; specifies the image name used by the pod.

providers.[kubernetes].pools.labels.python-path
providers.[kubernetes].pools.labels.:type: str
providers.[kubernetes].pools.labels.:default: auto

The path of the default python interpreter. Used by Zuul to set ansible_python_interpreter. The special value auto will direct Zuul to use inbuilt Ansible logic to select the interpreter on Ansible >=2.8, and default to /usr/bin/python2 for earlier versions.

Openshift Driver

Selecting the openshift driver adds the following options to the providers section of the configuration.

providers.[openshift]
Type: list

An Openshift provider’s resources are partitioned into groups called pool (see providers.[openshift].pools for details), and within a pool, the node types which are to be made available are listed (see providers.[openshift].labels for details).

Note

For documentation purposes the option names are prefixed providers.[openshift] to disambiguate from other drivers, but [openshift] is not required in the configuration (e.g. below providers.[openshift].pools refers to the pools key in the providers section when the openshift driver is selected).

Example:

providers:
  - name: cluster
    driver: openshift
    context: context-name
    pools:
      - name: main
        labels:
          - name: openshift-project
            type: project
          - name: openshift-pod
            type: pod
            image: docker.io/fedora:28
providers.[openshift].context (required)

Name of the context configured in kube/config.

Before using the driver, Nodepool services need a kube/config file manually installed with self-provisioner (the service account needs to be able to create projects) context. Make sure the context is present in oc config get-contexts command output.

providers.[openshift].launch-retries
Default: 3

The number of times to retry launching a node before considering the job failed.

providers.[openshift].max-projects
Default: infinite
Type: int

Maximum number of projects that can be used.

providers.[openshift].pools
Type: list

A pool defines a group of resources from an Openshift provider.

providers.[openshift].pools.name (required)

Project’s name are prefixed with the pool’s name.

providers.[openshift].labels
Type: list

Each entry in a pool`s labels section indicates that the corresponding label is available for use in this pool.

Each entry is a dictionary with the following keys

providers.[openshift].labels.name (required)

Identifier for this label; references an entry in the labels section.

providers.[openshift].labels.type

The Openshift provider supports two types of labels:

project

Project labels provide an empty project configured with a service account that can create pods, services, configmaps, etc.

pod

Pod labels provide a new dedicated project with a single pod created using the providers.[openshift].labels.image parameter and it is configured with a service account that can exec and get the logs of the pod.

providers.[openshift].labels.image

Only used by the pod label type; specifies the image name used by the pod.

providers.[openshift].labels.image-pull
Default: IfNotPresent
Type: str

The ImagePullPolicy, can be IfNotPresent, Always or Never.

providers.[openshift].labels.python-path
Default: auto
Type: str

The path of the default python interpreter. Used by Zuul to set ansible_python_interpreter. The special value auto will direct Zuul to use inbuilt Ansible logic to select the interpreter on Ansible >=2.8, and default to /usr/bin/python2 for earlier versions.

providers.[openshift].labels.cpu
Type: int

Only used by the pod label type; specifies the number of cpu to request for the pod.

providers.[openshift].labels.memory
Type: int

Only used by the pod label type; specifies the amount of memory in MB to request for the pod.

Openshift Pods Driver

Selecting the openshift pods driver adds the following options to the providers section of the configuration.

providers.[openshiftpods]
Type: list

The Openshift Pods driver is similar to the Openshift driver, but it only support pod label to be created in a single project. This enable using an unprivileged service account that doesn’t requires the self-provisioner role.

Example:

providers:
  - name: cluster
    driver: openshiftpods
    context: unprivileged-context-name
    pools:
      - name: main
        labels:
          - name: openshift-pod
            image: docker.io/fedora:28
providers.[openshiftpods].context (required)

Name of the context configured in kube/config.

Before using the driver, Nodepool services need a kube/config file manually installed with self-provisioner (the service account needs to be able to create projects) context. Make sure the context is present in oc config get-contexts command output.

providers.[openshiftpods].launch-retries
Default: 3

The number of times to retry launching a pod before considering the job failed.

providers.[openshiftpods].max-pods
Default: infinite
Type: int

Maximum number of pods that can be used.

providers.[openshiftpods].pools
Type: list

A pool defines a group of resources from an Openshift provider.

providers.[openshiftpods].pools.name (required)

The project’s name that will be used to create the pods.

providers.[openshiftpods].labels
Type: list

Each entry in a pool`s labels section indicates that the corresponding label is available for use in this pool.

Each entry is a dictionary with the following keys

providers.[openshiftpods].labels.name (required)

Identifier for this label; references an entry in the labels section.

providers.[openshiftpods].labels.image

The image name.

providers.[openshiftpods].labels.image-pull
Default: IfNotPresent
Type: str

The ImagePullPolicy, can be IfNotPresent, Always or Never.

providers.[openshiftpods].labels.cpu
Type: int

The number of cpu to request for the pod.

providers.[openshiftpods].labels.memory
Type: int

The amount of memory in MB to request for the pod.

AWS EC2 Driver

Selecting the aws driver adds the following options to the providers section of the configuration.

providers.[aws]
Type: list

An AWS provider’s resources are partitioned into groups called pool (see providers.[aws].pools for details), and within a pool, the node types which are to be made available are listed (see providers.[aws].pools.labels for details).

See Boto Configuration for information on how to configure credentials and other settings for AWS access in Nodepool’s runtime environment.

Note

For documentation purposes the option names are prefixed providers.[aws] to disambiguate from other drivers, but [aws] is not required in the configuration (e.g. below providers.[aws].pools refers to the pools key in the providers section when the aws driver is selected).

Example:

providers:
  - name: ec2-us-west-2
    driver: aws
    region-name: us-west-2
    cloud-images:
      - name: debian9
        image-id: ami-09c308526d9534717
        username: admin
    pools:
      - name: main
        max-servers: 5
        subnet-id: subnet-0123456789abcdef0
        security-group-id: sg-01234567890abcdef
        labels:
          - name: debian9
            cloud-image: debian9
            instance-type: t3.medium
            key-name: zuul
          - name: debian9-large
            cloud-image: debian9
            instance-type: t3.large
            key-name: zuul
providers.[aws].name (required)

A unique name for this provider configuration.

providers.[aws].region (required)

Name of the AWS region to interact with.

providers.[aws].profile-name

The AWS credentials profile to load for this provider. If unspecified the boto3 library will select a profile.

See Boto Configuration for more information.

providers.[aws].boot-timeout
Default: 60
Type: int seconds

Once an instance is active, how long to try connecting to the image via SSH. If the timeout is exceeded, the node launch is aborted and the instance deleted.

providers.[aws].launch-retries
Default: 3

The number of times to retry launching a node before considering the job failed.

providers.[aws].cloud-images
Type: list

Each entry in this section must refer to an entry in the providers.[aws].cloud-images section.

cloud-images:
  - name: ubuntu1804
    image-id: ami-082fd9a18128c9e8c
    username: ubuntu
  - name: ubuntu1804-by-filters
    image-filters:
      - name: name
        values:
         - named-ami
    username: ubuntu
  - name: my-custom-win2k3
    connection-type: winrm
    username: admin

Each entry is a dictionary with the following keys

providers.[aws].cloud-images.name (required)
Type: string

Identifier to refer this cloud-image from labels section. Since this name appears elsewhere in the nodepool configuration file, you may want to use your own descriptive name here and use image-id to specify the cloud image so that if the image id changes on the cloud, the impact to your Nodepool configuration will be minimal. However, if image-id is not provided, this is assumed to be the image id in the cloud.

providers.[aws].cloud-images.image-id
Type: str

If this is provided, it is used to select the image from the cloud provider by ID.

providers.[aws].cloud-images.image-filters
Type: list

If provided, this is used to select an AMI by filters. If the filters provided match more than one image, the most recent will be returned. image-filters are not valid if image-id is also specified.

Each entry is a dictionary with the following keys

providers.[aws].cloud-images.image-filters.name (required)
Type: str

The filter name. See Boto describe images for a list of valid filters.

providers.[aws].cloud-images.image-filters.values (required)
Type: list

A list of str values to filter on

providers.[aws].cloud-images.username
Type: str

The username that a consumer should use when connecting to the node.

providers.[aws].cloud-images.python-path
Default: auto
Type: str

The path of the default python interpreter. Used by Zuul to set ansible_python_interpreter. The special value auto will direct Zuul to use inbuilt Ansible logic to select the interpreter on Ansible >=2.8, and default to /usr/bin/python2 for earlier versions.

providers.[aws].cloud-images.connection-type
Type: str

The connection type that a consumer should use when connecting to the node. For most images this is not necessary. However when creating Windows images this could be ‘winrm’ to enable access via ansible.

providers.[aws].cloud-images.connection-port
Default: 22/ 5986
Type: int

The port that a consumer should use when connecting to the node. For most diskimages this is not necessary. This defaults to 22 for ssh and 5986 for winrm.

providers.[aws].pools
Type: list

A pool defines a group of resources from an AWS provider. Each pool has a maximum number of nodes which can be launched from it, along with a number of cloud-related attributes used when launching nodes.

providers.[aws].pools.name (required)

A unique name within the provider for this pool of resources.

providers.[aws].pools.subnet-id

If provided, specifies the subnet to assign to the primary network interface of nodes.

providers.[aws].pools.security-group-id

If provided, specifies the security group ID to assign to the primary network interface of nodes.

providers.[aws].pools.host-key-checking
Default: True
Type: bool

Specify custom behavior of validation of SSH host keys. When set to False, nodepool-launcher will not ssh-keyscan nodes after they are booted. This might be needed if nodepool-launcher and the nodes it launches are on different networks. The default value is True.

providers.[aws].pools.labels
Type: list

Each entry in a pool’s labels section indicates that the corresponding label is available for use in this pool. When creating nodes for a label, the flavor-related attributes in that label’s section will be used.

labels:
  - name: bionic
    instance-type: m5a.large
    console-log: True

Each entry is a dictionary with the following keys

providers.[aws].pools.labels.name (required)
Type: str

Identifier to refer this label.

providers.[aws].pools.labels.cloud-image (required)
Type: str

Refers to the name of an externally managed image in the cloud that already exists on the provider. The value of cloud-image should match the name of a previously configured entry from the cloud-images section of the provider. See providers.[aws].cloud-images.

providers.[aws].pools.labels.instance-type (required)
Type: str

Name of the flavor to use.

providers.[aws].pools.labels.key-name
Type: string

If given, the name of a keypair that will be used when booting each server.

providers.[aws].pools.labels.volume-type
Type: string

If given, the root EBS volume type

providers.[aws].pools.labels.volume-size
Type: int

If given, the size of the root EBS volume, in GiB.