vmpooler-provider-gce/vmpooler.yaml.example
2021-12-02 14:27:31 -06:00

149 lines
5.2 KiB
Text

---
:providers:
# :providers:
#
# This section contains the VM providers for VMs and Pools
# The currently supported backing services are:
# - vsphere
# - dummy
# - gce
#
# - provider_class
# For multiple providers, specify one of the supported backing services (vsphere or dummy or gce)
# (optional: will default to it's parent :key: name eg. 'gce')
#
# - purge_unconfigured_resources
# Enable purging of VMs (folders or resources) detected
# vSphere: within the base folder path that are not configured for the provider.
# Only a single layer of folders and their child VMs are evaluated from detected base folder paths
# Nested child folders will not be destroyed.
# A base folder path for 'vmpooler/redhat-7' would be 'vmpooler'
#
# gce: in the project but without a pool label, or a pool label for an nonexistant pool
#
# An optional allowlist can be provided to ignore purging certain folders or pool labels
#
# Setting this on the provider will enable purging for the provider
# Expects a boolean value
# (optional; default: false)
#
# - recources_allowlist
# vSphere: Specify folders that are within the base folder path, not in the configuration, and should not be destroyed
# To exclude 'vmpooler/myfolder' from being destroyed when the base path is 'vmpooler' you would specify 'myfolder' in the allowlist
# gce: Specify pool labels that should be ignored when purging VMs, for pools that are not configured. For example if the pool label is
# set to 'donotdelete' and there is no pool with that name configured, adding that value to the allowlist would not purge the VM.
# This option is only evaluated when 'purge_unconfigured_folders' is enabled
# Expects an array of strings specifying the allowlisted folders by name
# (optional; default: nil)
#
# If you want to support more than one provider with different parameters (server, username or passwords) you have to specify the
# backing service in the provider_class configuration parameter for example 'vsphere' or 'dummy'. Each pool can specify
# the provider to use.
#
# Multiple providers example:
:gce1:
provider_class: 'gce'
project: 'myproject'
zone: 'us-central1-f'
:gce2:
provider_class: 'gce'
project: 'myproject-foo'
zone: 'us-central1-f'
# :gce:
#
# This section contains the global variables for the gce provider
# some of them can be overwritten at the pool level
#
# Available configuration parameters:
#
# - project
# The GCE project name to use when creating/deleting resources
# (required)
# - zone
# The GCE zone name to use when creating/deleting resources (vms, disks etc)
# Can be overwritten at the pool level
# (required)
# - machine_type
# Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type
# (required)
# - network_name
# The GCE network_name to use
# (required)
# Example:
:gce:
project: 'myproject'
zone: 'us-central1-f'
machine_type: ''
network_name: ''
# :pools:
#
# This section contains a list of virtual machine 'pools' for vmpooler to
# create and maintain.
#
# Available configuration parameters (per-pool):
#
# - name
# The name of the pool.
# (required)
#
# - alias
# Other names this pool can be requested as.
# (optional)
#
# - template
# The template or virtual machine target to spawn clones from.
# (required)
#
# - size
# The number of waiting VMs to keep in a pool.
# (required)
#
# - provider
# The name of the VM provider which manage this pool. This should match
# a name in the :providers: section above e.g. vsphere
# (required; will default to vsphere for backwards compatibility)
# If you have more than one provider, this is where you would choose which
# one to use for this pool
#
# - clone_target
# Per-pool option to override the global 'clone_target' cluster.
# (optional)
#
# - timeout
# How long (in minutes) before marking a clone in 'pending' queues as 'failed' and retrying.
# This setting overrides any globally-configured timeout setting.
# (optional; default: '15')
#
# - ready_ttl
# How long (in minutes) to keep VMs in 'ready' queues before destroying.
# (optional; default: no limit)
#
# - check_loop_delay_min (optional; default: 5) seconds
# - check_loop_delay_max (optional; default: same as check_loop_delay_min) seconds
# - check_loop_delay_decay (optional; default: 2.0) Must be greater than 1.0
# See the :config: section for information about these settings
#
# Provider specific pool settings
#
# Gce provider
# - zone
# The zone to create the VMs in
# (optional: default is global provider zone value)
# - machine_type
# Full or partial URL of the machine type resource to use for this instance, in the format: zones/zone/machineTypes/machine-type
# Example:
:pools:
- name: 'debian-8-x86_64'
alias: [ 'debian-8-64', 'debian-8-amd64' ]
template: 'global/images/my-custom-image'
size: 5
timeout: 15
ready_ttl: 1440
provider: gce
zone: 'us-new-zone'
machine_type: 'zones/us-central1-f/machineTypes/n1-standard-1'