Revision 1c382247

b/README.Upgrade
1
README.Upgrade
2
===============
3

  
4
This file documents the upgrade to newer versions of the Synnefo software.
5

  
6
v0.5.1 -> v0.5.2
7
NEW SETTINGS
8
    * 10-backend.py:GANETI_CREATEINSTANCE_KWARGS
9

  
10
REMOVE SETTINGS
11
    * 10-backend.conf/GANETI_OS_PROVIDER
12
    * 20-apo.conf/GANETI_DISK_TEMPLATE
13

  
14
BACKEND CHANGES
15
    * Need to patch Ganeti, file:
16
      lib/python2.6/site-packages/ganeti/rapi/rlib2.py
17
      to honor the wait_for_sync flag, see Synnefo #835.
18
      Patch provided under contrib/patches/ganeti-rlib2.py-v0.5.2
b/README.deploy
1
README.deploy -- Instructions for a basic deployment of Synnefo v0.5.1
1
README.deploy -- Instructions for a basic Synnefo deployment
2 2

  
3 3
This document describes the basic steps to obtain a basic, working Synnefo
4 4
deployment. It begins by examining the different node roles, then moves to the
5 5
installation and setup of distinct software components.
6 6

  
7
It is current as of Synnefo v0.5.1.
7
It is current as of Synnefo v0.5.2.
8 8

  
9 9

  
10 10
Node types
......
418 418

  
419 419
    Download and install gnt-instance-image in all Ganeti nodes from its own
420 420
    repository, at https://code.grnet.gr/git/gnt-instance-image. It's
421
    recommended to use the win-support branch (known good commit for 0.5.1:
421
    recommended to use the win-support branch (known good commit for 0.5.2:
422 422
    8afaedb329c981282aed1a6c3daf62e43532f00d).
423 423

  
424 424
    After installing gnt-instance-image do the following:
b/contrib/patches/ganeti-rlib2.py-v0.5.2
1
--- rlib2.py    2011-07-17 20:45:56.000000000 +0300
2
+++ rlib2.py.20110717   2011-07-17 20:45:51.000000000 +0300
3
@@ -785,7 +785,7 @@
4
     src_node=baserlib.CheckParameter(data, "src_node", default=None),
5
     src_path=baserlib.CheckParameter(data, "src_path", default=None),
6
     start=baserlib.CheckParameter(data, "start", default=True),
7
-    wait_for_sync=baserlib.CheckParameter(data, "wait_for_sync", default=True),
8
+    wait_for_sync=True,
9
     ip_check=baserlib.CheckParameter(data, "ip_check", default=True),
10
     name_check=baserlib.CheckParameter(data, "name_check", default=True),
11
     file_storage_dir=baserlib.CheckParameter(data, "file_storage_dir",
b/logic/backend.py
183 183
    else:
184 184
        sz = flavor.disk * 1024
185 185

  
186
    return rapi.CreateInstance(
187
        mode='create',
188
        name=vm.backend_id,
189
        disk_template=settings.GANETI_DISK_TEMPLATE,
190
        disks=[{"size": sz}],     #FIXME: Always ask for a 4GB disk for now
191
        nics=[nic],
192
        os=settings.GANETI_OS_PROVIDER,
193
        ip_check=False,
194
        name_check=False,
195
        # Do not specific a node explicitly, have
196
        # Ganeti use an iallocator instead
197
        #
198
        # pnode=rapi.GetNodes()[0],
199
        dry_run=settings.TEST,
200
        beparams=dict(auto_balance=True, vcpus=flavor.cpu, memory=flavor.ram),
201
        osparams=dict(img_id=image.backend_id, img_passwd=password,
202
                      img_format=image.format),
203
        # Be explicit about setting serial_console = False for Synnefo-based
204
        # instances regardless of the cluster-wide setting, see #785
205
        hvparams=dict(serial_console=False))
186
    # Handle arguments to CreateInstance() as a dictionary,
187
    # initialize it based on a deployment-specific value.
188
    # This enables the administrator to override deployment-specific
189
    # arguments, such as the disk templatei to use, name of os provider
190
    # and hypervisor-specific parameters at will (see Synnefo #785, #835).
191
    #
192
    kw = settings.GANETI_CREATEINSTANCE_KWARGS
193
    kw['mode'] = 'create'
194
    kw['name'] = vm.backend_id
195
    # Defined in settings.GANETI_CREATE_INSTANCE_KWARGS
196
    # kw['disk_template'] = settings.GANETI_DISK_TEMPLATE
197
    kw['disks'] = [{"size": sz}]
198
    kw['nics'] = [nic]
199
    # Defined in settings.GANETI_CREATE_INSTANCE_KWARGS
200
    # kw['os'] = settings.GANETI_OS_PROVIDER
201
    kw['ip_check'] = False
202
    kw['name_check'] = False
203
    # Do not specific a node explicitly, have
204
    # Ganeti use an iallocator instead
205
    #
206
    # kw['pnode']=rapi.GetNodes()[0]
207
    kw['dry_run'] = settings.TEST
208
    kw['beparams'] = dict(auto_balance=True, vcpus=flavor.cpu,
209
                          memory=flavor.ram)
210
    kw['osparams'] = dict(img_id=image.backend_id, img_passwd=password,
211
                         img_format=image.format)
212
    # Defined in settings.GANETI_CREATE_INSTANCE_KWARGS
213
    # kw['hvparams'] = dict(serial_console=False)
214

  
215
    return rapi.CreateInstance(**kw)
206 216

  
207 217

  
208 218
def delete_instance(vm):
b/settings.d/10-backend.conf
13 13
# The dash must always appear in the name!
14 14
BACKEND_PREFIX_ID = "snf-"
15 15

  
16
GANETI_OS_PROVIDER = "image+default"
16
# The following dictionary defines deployment-specific
17
# arguments to the RAPI CreateInstance call.
18
# At a minimum it should contain the
19
# 'disk_template', 'os_provider', and 'hvparams' keys.
20
#
21
# More specifically:
22
# a) disk_template:
23
#    The disk template to use when creating the instance.
24
#    Suggested values: 'plain', or 'drbd'.
25
# b) os:
26
#    The OS provider to use (customized Ganeti Instance Image)
27
# c) hvparams:
28
#    Hypervisor-specific parameters (serial_console = False, see #785)
29
# d) If using the DRBD disk_template, you may want to include
30
#    wait_for_sync = False (see #835).
31
#
32
GANETI_CREATEINSTANCE_KWARGS = {
33
    'disk_template': 'drbd',
34
    'os': 'image+default',
35
    'hvparams': {'serial_console': False},
36
    'wait_for_sync': False}
b/settings.d/20-api.conf
47 47
#
48 48
IGNORE_FLAVOR_DISK_SIZES = False
49 49

  
50
# Use the following disk template when creating an instance
51
# on the Ganeti backend. Suggested values: 'plain', or 'drbd'.
52
GANETI_DISK_TEMPLATE = 'plain'
53

  
54 50
# Quota
55 51
#
56 52
# Maximum number of VMs a user is allowed to have

Also available in: Unified diff