backend.py 2.57 KB
Newer Older
1 2 3 4 5 6 7 8 9
# -*- coding: utf-8 -*-
#
# Ganeti backend configuration
###################################

# This prefix gets used when determining the instance names
# of Synnefo VMs at the Ganeti backend.
# The dash must always appear in the name!
BACKEND_PREFIX_ID = "snf-"
10

11 12 13
# The following dictionary defines deployment-specific
# arguments to the RAPI CreateInstance call.
# At a minimum it should contain the
14
# 'os' and 'hvparams' keys.
15 16
#
# More specifically:
17
# a) os:
18
#    The OS provider to use (customized Ganeti Instance Image)
19 20 21 22
# b) hvparams:
#    Hypervisor-specific parameters (serial_console = False, see #785),
#    for each hypervisor(currently 'kvm', 'xen-pvm' and 'xen-hvm').
# c) If using the DRBD disk_template, you may want to include
23 24 25
#    wait_for_sync = False (see #835).
#
GANETI_CREATEINSTANCE_KWARGS = {
26
    'os': 'snf-image+default',
27 28 29
    'hvparams': {"kvm": {'serial_console': False},
                 "xen-pvm": {},
                 "xen-hvm": {}},
30
}
31

32 33
# If True, qemu-kvm will hotplug a NIC when connecting a vm to
# a network. This requires qemu-kvm=1.0.
34
GANETI_USE_HOTPLUG = True
35

36 37 38 39
# If True, Ganeti will try to allocate new instances only on nodes that are
# not already locked. This might result in slightly unbalanced clusters.
GANETI_USE_OPPORTUNISTIC_LOCKING = True

40 41 42 43
# If False, Ganeti will not wait for the disk mirror to sync
# (--no-wait-for-sync option in Ganeti). Useful only for DRBD template.
GANETI_DISKS_WAIT_FOR_SYNC = False

44 45 46 47
# This module implements the strategy for allocating a vm to a backend
BACKEND_ALLOCATOR_MODULE = "synnefo.logic.allocators.default_allocator"
# Refresh backend statistics timeout, in minutes, used in backend allocation
BACKEND_REFRESH_MIN = 15
48 49 50 51

# Maximum number of NICs per Ganeti instance. This value must be less or equal
# than 'max:nic-count' option of Ganeti's ipolicy.
GANETI_MAX_NICS_PER_INSTANCE = 8
52

53 54 55 56
# Maximum number of disks per Ganeti instance. This value must be less or equal
# than 'max:disk-count' option of Ganeti's ipolicy.
GANETI_MAX_DISKS_PER_INSTANCE = 8

57 58 59 60 61
# The following setting defines a dictionary with key-value parameters to be
# passed to each Ganeti ExtStorage provider. The setting defines a mapping from
# the provider name, e.g. 'archipelago' to a dictionary with the actual
# arbitrary parameters.
GANETI_DISK_PROVIDER_KWARGS = {}
62 63 64 65 66 67

# List of ExtStorage providers that support cloning. For these providers, the
# hashmap of the image is passed as an ExtStorage disk parameter('origin') and,
# since disk will be already filled with data, 'snf-image' performs only
# customization (no data copying).
GANETI_CLONE_PROVIDERS = ['vlmc', 'archipelago']