Add documentation for new parameters to env config and file based config docs

This commit is contained in:
kirby@puppetlabs.com 2020-05-12 08:38:14 -07:00
parent 141e972526
commit d936e20747
5 changed files with 84 additions and 15 deletions

View file

@ -872,8 +872,18 @@ $ curl https://vmpooler.example.com/api/v1/ondemandvm/e3ff6271-d201-4f31-a315-d1
##### DELETE /ondemandvm
Delete a ondemand request that is completed
Deleting a ondemand request will delete any instances created for the request and mark the backend data for expiration in two weeks
Delete a ondemand request
Deleting a ondemand request will delete any instances created for the request and mark the backend data for expiration in two weeks. Any subsequent attempts to retrieve request data will indicate it has been deleted.
Responses:
* 200 - The API request was sucessful. A message will indicate if the request has already been deleted.
* 404 - The request can not be found, or an unknown error occurred.
```
$ curl -X DELETE https://vmpooler.example.com/api/v1/ondemandvm/e3ff6271-d201-4f31-a315-d17f4e15863a
```
```json
{
"ok": true
}
```

View file

@ -74,6 +74,16 @@ The prefix to use while storing Graphite data.
The TCP port to communicate with the graphite server.
(optional; default: 2003)
### MAX\_ONDEMAND\_INSTANCES\_PER\_REQUEST
The maximum number of instances any individual ondemand request may contain per pool.
(default: 10)
### ONDEMAND\_REQUEST\_TTL
The amount of time (in minutes) to give for a ondemand request to be fulfilled before considering it to have failed.
(default: 5)
## Manager options <a name="manager"></a>
### TASK\_LIMIT
@ -123,6 +133,11 @@ The target cluster VMs are cloned into (host with least VMs chosen)
How long (in minutes) before marking a clone as 'failed' and retrying.
(optional; default: 15)
### READY\_TTL
How long (in minutes) a ready VM should stay in the ready queue.
(default: 60)
### MAX\_TRIES
Set the max number of times a connection should retry in VM providers. This optional setting allows a user to dial in retry limits to suit your environment.
@ -130,7 +145,7 @@ Set the max number of times a connection should retry in VM providers. This opti
### RETRY\_FACTOR
When retrying, each attempt sleeps for the try count * retry_factor.
When retrying, each attempt sleeps for the try count * retry\_factor.
Increase this number to lengthen the delay between retry attempts.
This is particularly useful for instances with a large number of pools
to prevent a thundering herd when retrying connections.
@ -183,6 +198,21 @@ The argument can accept a full path to a file, or multiple files comma separated
Expects a string value
(optional)
### ONDEMAND\_CLONE\_LIMIT
Maximum number of simultaneous clones to perform for ondemand provisioning requests.
(default: 10)
### REDIS\_CONNECTION\_POOL\_SIZE
Maximum number of connections to utilize for the redis connection pool.
(default: 10)
### REDIS\_CONNECTION\_POOL\_TIMEOUT
How long a task should wait (in seconds) for a redis connection when all connections are in use.
(default: 5)
## API options <a name="API"></a>
### AUTH\_PROVIDER
@ -221,3 +251,8 @@ The name of your deployment.
Enable experimental API capabilities such as changing pool template and size without application restart
Expects a boolean value
(optional; default: false)
### MAX\_LIFETIME\_UPPER\_LIMIT
Specify a maximum lifetime that a VM may be extended to in hours.
(optional)

View file

@ -1,13 +1,15 @@
# Setting up a vmpooler development environment
## Requirements
## Docker is the preferred development environment
The docker compose file is the easiest way to get vmpooler running with any local code changes. The docker compose file expects to find a vmpooler.yaml configuration file in the root vmpooler directory. The file is mapped into the running container for the vmpooler application. This file primarily contains the pools configuration. Nearly all other configuration can be supplied with environment variables.
## Requirements for local installation directly on your system (not recommended)
* Supported on OSX, Windows and Linux
* Ruby or JRuby
Note - Ruby 1.x support will be removed so it is best to use more modern ruby versions
Note - It is recommended to user Bundler instead of installing gems into the system repository
* A local Redis server

View file

@ -65,7 +65,7 @@ module Vmpooler
parsed_config[:config]['vm_checktime'] = string_to_int(ENV['VM_CHECKTIME']) || parsed_config[:config]['vm_checktime'] || 1
parsed_config[:config]['vm_lifetime'] = string_to_int(ENV['VM_LIFETIME']) || parsed_config[:config]['vm_lifetime'] || 24
parsed_config[:config]['max_lifetime_upper_limit'] = string_to_int(ENV['MAX_LIFETIME_UPPER_LIMIT']) || parsed_config[:config]['max_lifetime_upper_limit']
parsed_config[:config]['ready_ttl'] = string_to_int(ENV['READY_TTL']) || parsed_config[:config]['ready_ttl'] || 5
parsed_config[:config]['ready_ttl'] = string_to_int(ENV['READY_TTL']) || parsed_config[:config]['ready_ttl'] || 60
parsed_config[:config]['ondemand_request_ttl'] = string_to_int(ENV['ONDEMAND_REQUEST_TTL']) || parsed_config[:config]['ondemand_request_ttl'] || 5
parsed_config[:config]['prefix'] = ENV['PREFIX'] || parsed_config[:config]['prefix'] || ''

View file

@ -195,14 +195,21 @@
#
# - data_ttl
# How long (in hours) to retain metadata in Redis after VM destruction.
# (optional; default: '168')
# (default: 168)
#
# - redis_connection_pool_size
# Maximum number of connections to utilize for the redis connection pool.
# (default: 10)
#
# - redis_connection_pool_timeout
# How long a task should wait (in seconds) for a redis connection when all connections are in use.
# (default: 5)
# Example:
:redis:
server: 'redis.example.com'
# :graphs:
#
# This section contains the server and prefix information for a graphite-
@ -368,15 +375,19 @@
#
# - task_limit
# The number of concurrent VM creation tasks to perform.
# (optional; default: '10')
# (default: 10)
#
# - ondemand_clone_limit
# The number of concurrent VM creation tasks to perform for ondemand VM requests.
# (default: 10)
#
# - timeout
# How long (in minutes) before marking a clone in 'pending' queues as 'failed' and retrying.
# (optional; default: '15')
# (default: 15)
#
# - vm_checktime
# How often (in minutes) to check the sanity of VMs in 'ready' queues.
# (optional; default: '1')
# (default: 1)
#
# - vm_lifetime
# How long (in hours) to keep VMs in 'running' queues before destroying.
@ -510,10 +521,21 @@
# Expects a string value
# (optional)
#
# - max_ondemand_instances_per_request
# The maximum number of instances any individual ondemand request may contain per pool.
# (default: 10)
#
# - ondemand_request_ttl
# The amount of time (in minutes) to give for a ondemand request to be fulfilled before considering it to have failed.
# (default: 5)
#
# - ready_ttl
# How long (in minutes) a ready VM should stay in the ready queue.
# (default: 60)
#
# Example:
:config:
site_name: 'vmpooler'
:config: site_name: 'vmpooler'
logfile: '/var/log/vmpooler.log'
task_limit: 10
timeout: 15