Configuration

VmShepherd requires configuration to be supplied with a simple YAML file. Available sections:

  1. general parameters
  2. runtime store configuration (pluginable)
  3. preset store configuration (pluginable)
  4. and optional defaults than will be combined with every preset (pluginable)

The configuration mostly depends on a chosen driver and its options. For available options, refer to the driver’s documentation.

General parameters

  • worker_interval - interval between manage cycles.
  • log_level - DEBUG, INFO, ERROR - default to INFO.

Runtime store

Choose a runtime store driver and its options.

runtime:
  driver: NameOfTheDriver
  some_arg1: host
  some_arg2: 345

Runtime store is used to keep data that should be shared between cycles - you can find more information in the Runtime Driver section.

Preset store

Specify preset store driver.

presets:
  driver: NameOfTheDriver
  some_arg1: host
  some_arg2: 345

Preset is a definition/spec of a cluster.

http

You can set api/panel port, whitelist available API methods.

http:
  api:
    allowed_methods:
      - list_vms
      - terminate_vm
      - get_vm_metadata
  listen_port: 8888

The api.allowed_methods params are optional and if are not provided entire API will be exposed.

http:
  listen_port: 8888

defaults

Provides defaults for iaas and healthcheck configuration that will be merged with preset spec.

defaults:
  iaas:
    driver: OpenStackDriver
    username: USER
    password: PASS
    project: my-project
  healthcheck:
    driver: HttpCheck
    option1: 123123

Example configuration

log_level: info

http:
    listen_port: 8888

runtime:
  driver: InMemoryDriver

presets:
  driver: DirectoryDriver
  path: config/presets.d

defaults:

  iaas:
    driver: OpenStackDriver
    auth_url: http://KEYSTONE:5000/v3
    username: USER
    password: PASS
    user_domain_name: default    # for auth only
    image_owner_ids:
      - user
    http_timeout: 10 # seconds

  healthcheck:
    driver: HttpHealthcheck
    conn_timeout: 1   # (optional, default:1)
    read_timeout: 1   # (optional, default: 1)
    port: 7007        # (optional, default: 80)
    path: /           # (optional, default: /)
    method: GET       # (optional, default: GET)
    check_status: 200 # (optional, default: 200)
    terminate_heatlh_failed_delay: 10