Commit c64e1871 authored by Kostas Papadimitriou's avatar Kostas Papadimitriou
Browse files

Merge branch 'master' of https://code.grnet.gr/git/synnefo

parents ce0343a4 c5d9a291
......@@ -170,7 +170,7 @@ def co(c):
env.debian_branch = 'debian-0.8'
env.deb_packages = ['snf-common', 'snf-cyclades-app', 'snf-cyclades-gtools', 'snf-webproject', 'snf-okeanos-site']
env.signdebs = True
env.signdebs = False
env.debrelease = False # Increase release number in Debian changelogs
......@@ -219,8 +219,8 @@ def debrelease():
env.debrelease = True
def nosigndebs():
env.signdebs = False
def signdebs():
env.signdebs = True
# Commands which automatically add and reset the version files which are not tracked by
......
......@@ -35,6 +35,8 @@ from django.conf.urls.defaults import *
urlpatterns = patterns('',
(r'^ui/', include('synnefo.ui.urls')),
url(r'^machines/console$', 'synnefo.ui.views.machines_console', name='machines-console'),
url(r'^machines/connect$', 'synnefo.ui.views.machines_connect', name='machines-connect'),
(r'^admin/', include('synnefo.admin.urls')),
(r'^api/', include('synnefo.api.urls')),
(r'^helpdesk/?', include('synnefo.helpdesk.urls')),
......
# encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'Flavor', fields ['disk', 'ram', 'cpu']
db.delete_unique('db_flavor', ['disk', 'ram', 'cpu'])
# Adding unique constraint on 'Flavor', fields ['disk', 'ram', 'cpu', 'disk_template']
db.create_unique('db_flavor', ['disk', 'ram', 'cpu', 'disk_template'])
def backwards(self, orm):
# Removing unique constraint on 'Flavor', fields ['disk', 'ram', 'cpu', 'disk_template']
db.delete_unique('db_flavor', ['disk', 'ram', 'cpu', 'disk_template'])
# Adding unique constraint on 'Flavor', fields ['disk', 'ram', 'cpu']
db.create_unique('db_flavor', ['disk', 'ram', 'cpu'])
models = {
'db.debit': {
'Meta': {'object_name': 'Debit'},
'description': ('django.db.models.fields.TextField', [], {}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.SynnefoUser']"}),
'vm': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.VirtualMachine']"}),
'when': ('django.db.models.fields.DateTimeField', [], {})
},
'db.disk': {
'Meta': {'object_name': 'Disk'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.SynnefoUser']", 'null': 'True', 'blank': 'True'}),
'size': ('django.db.models.fields.PositiveIntegerField', [], {}),
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'}),
'vm': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.VirtualMachine']", 'null': 'True', 'blank': 'True'})
},
'db.flavor': {
'Meta': {'unique_together': "(('cpu', 'ram', 'disk', 'disk_template'),)", 'object_name': 'Flavor'},
'cpu': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'disk': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'disk_template': ('django.db.models.fields.CharField', [], {'default': "'drbd'", 'max_length': '32'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'ram': ('django.db.models.fields.IntegerField', [], {'default': '0'})
},
'db.flavorcost': {
'Meta': {'object_name': 'FlavorCost'},
'cost_active': ('django.db.models.fields.PositiveIntegerField', [], {}),
'cost_inactive': ('django.db.models.fields.PositiveIntegerField', [], {}),
'effective_from': ('django.db.models.fields.DateTimeField', [], {}),
'flavor': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.Flavor']"}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'})
},
'db.image': {
'Meta': {'object_name': 'Image'},
'backend_id': ('django.db.models.fields.CharField', [], {'default': "'debian_base'", 'max_length': '50'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'format': ('django.db.models.fields.CharField', [], {'default': "'dump'", 'max_length': '30'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.SynnefoUser']", 'null': 'True', 'blank': 'True'}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'sourcevm': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.VirtualMachine']", 'null': 'True'}),
'state': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'db.imagemetadata': {
'Meta': {'unique_together': "(('meta_key', 'image'),)", 'object_name': 'ImageMetadata'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'image': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'metadata'", 'to': "orm['db.Image']"}),
'meta_key': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'meta_value': ('django.db.models.fields.CharField', [], {'max_length': '500'})
},
'db.invitations': {
'Meta': {'object_name': 'Invitations'},
'accepted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'level': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
'source': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'source'", 'to': "orm['db.SynnefoUser']"}),
'target': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'target'", 'to': "orm['db.SynnefoUser']"}),
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'db.limit': {
'Meta': {'object_name': 'Limit'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
'user': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.SynnefoUser']"}),
'value': ('django.db.models.fields.IntegerField', [], {})
},
'db.network': {
'Meta': {'object_name': 'Network'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'link': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'to': "orm['db.NetworkLink']"}),
'machines': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['db.VirtualMachine']", 'through': "orm['db.NetworkInterface']", 'symmetrical': 'False'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.SynnefoUser']", 'null': 'True'}),
'public': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'state': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'db.networkinterface': {
'Meta': {'object_name': 'NetworkInterface'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'firewall_profile': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'index': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
'ipv4': ('django.db.models.fields.CharField', [], {'max_length': '15', 'null': 'True'}),
'ipv6': ('django.db.models.fields.CharField', [], {'max_length': '100', 'null': 'True'}),
'mac': ('django.db.models.fields.CharField', [], {'max_length': '17', 'null': 'True'}),
'machine': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nics'", 'to': "orm['db.VirtualMachine']"}),
'network': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'nics'", 'to': "orm['db.Network']"}),
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'db.networklink': {
'Meta': {'object_name': 'NetworkLink'},
'available': ('django.db.models.fields.BooleanField', [], {'default': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'index': ('django.db.models.fields.IntegerField', [], {}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'network': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'+'", 'null': 'True', 'to': "orm['db.Network']"})
},
'db.synnefouser': {
'Meta': {'object_name': 'SynnefoUser'},
'auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}),
'auth_token_created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
'auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'credit': ('django.db.models.fields.IntegerField', [], {}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'max_invitations': ('django.db.models.fields.IntegerField', [], {'null': 'True'}),
'name': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
'realname': ('django.db.models.fields.CharField', [], {'default': "''", 'max_length': '255'}),
'state': ('django.db.models.fields.CharField', [], {'default': "'ACTIVE'", 'max_length': '30'}),
'tmp_auth_token': ('django.db.models.fields.CharField', [], {'max_length': '32', 'null': 'True'}),
'tmp_auth_token_expires': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'null': 'True', 'blank': 'True'}),
'type': ('django.db.models.fields.CharField', [], {'max_length': '30'}),
'uniq': ('django.db.models.fields.CharField', [], {'max_length': '255', 'null': 'True'}),
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'db.virtualmachine': {
'Meta': {'object_name': 'VirtualMachine'},
'action': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
'backendjobid': ('django.db.models.fields.PositiveIntegerField', [], {'null': 'True'}),
'backendjobstatus': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
'backendlogmsg': ('django.db.models.fields.TextField', [], {'null': 'True'}),
'backendopcode': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
'buildpercentage': ('django.db.models.fields.IntegerField', [], {'default': '0'}),
'charged': ('django.db.models.fields.DateTimeField', [], {'default': 'datetime.datetime(2012, 2, 6, 14, 22, 35, 176380)'}),
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'deleted': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'flavor': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.Flavor']"}),
'hostid': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'imageid': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'operstate': ('django.db.models.fields.CharField', [], {'max_length': '30', 'null': 'True'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.SynnefoUser']"}),
'suspended': ('django.db.models.fields.BooleanField', [], {'default': 'False'}),
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'db.virtualmachinegroup': {
'Meta': {'ordering': "['name']", 'object_name': 'VirtualMachineGroup'},
'created': ('django.db.models.fields.DateTimeField', [], {'auto_now_add': 'True', 'blank': 'True'}),
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'machines': ('django.db.models.fields.related.ManyToManyField', [], {'to': "orm['db.VirtualMachine']", 'symmetrical': 'False'}),
'name': ('django.db.models.fields.CharField', [], {'max_length': '255'}),
'owner': ('django.db.models.fields.related.ForeignKey', [], {'to': "orm['db.SynnefoUser']"}),
'updated': ('django.db.models.fields.DateTimeField', [], {'auto_now': 'True', 'blank': 'True'})
},
'db.virtualmachinemetadata': {
'Meta': {'unique_together': "(('meta_key', 'vm'),)", 'object_name': 'VirtualMachineMetadata'},
'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),
'meta_key': ('django.db.models.fields.CharField', [], {'max_length': '50'}),
'meta_value': ('django.db.models.fields.CharField', [], {'max_length': '500'}),
'vm': ('django.db.models.fields.related.ForeignKey', [], {'related_name': "'metadata'", 'to': "orm['db.VirtualMachine']"})
}
}
complete_apps = ['db']
......@@ -172,7 +172,7 @@ class Flavor(models.Model):
class Meta:
verbose_name = u'Virtual machine flavor'
unique_together = ('cpu', 'ram', 'disk')
unique_together = ('cpu', 'ram', 'disk', 'disk_template')
@property
def name(self):
......
......@@ -35,6 +35,7 @@ import json
from string import punctuation
from StringIO import StringIO
from urllib import unquote
from django.conf import settings
from django.http import HttpResponse, HttpResponseNotFound
......@@ -99,10 +100,10 @@ def _get_image_headers(request):
for key, val in request.META.items():
if key.startswith(META_PROPERTY_PREFIX):
name = normalize(key[META_PROPERTY_PREFIX_LEN:])
headers['properties'][name] = val
headers['properties'][unquote(name)] = unquote(val)
elif key.startswith(META_PREFIX):
name = normalize(key[META_PREFIX_LEN:])
headers[name] = val
headers[unquote(name)] = unquote(val)
is_public = headers.get('is_public', None)
if is_public is not None:
......
......@@ -43,6 +43,8 @@
models.GlanceImages = snf.models.Images.extend({
model: models.GlanceImage,
api_type: 'glance',
fallback_service: snf.models.Images,
type_selections: {'personal':'My images',
'shared': 'Shared with me',
'public': 'Public'},
......
......@@ -1564,10 +1564,24 @@
this.api_call(this.path + "/" + id, this.read_method, {_options:{async:true, skip_api_error:true}}, undefined,
_.bind(function() {
if (!this.get(id)) {
this.add({id:id, name:"Unknown image", size:-1,
progress:100, status:"DELETED"});
if (this.fallback_service) {
// if current service has fallback_service attribute set
// use this service to retrieve the missing image model
var tmpservice = new this.fallback_service();
tmpservice.update_unknown_id(id, _.bind(function(img){
img.attributes.status = "DELETED";
this.add(img.attributes);
callback(this.get(id));
}, this));
} else {
// else add a dummy DELETED state image entry
this.add({id:id, name:"Unknown image", size:-1,
progress:100, status:"DELETED"});
callback(this.get(id));
}
} else {
callback(this.get(id));
}
callback(this.get(id));
}, this), _.bind(function(image, msg, xhr) {
var img_data = this._read_image_from_request(image, msg, xhr);
this.add(img_data);
......
......@@ -407,8 +407,12 @@
},
show: function() {
views.CreateImageSelectView.__super__.show.apply(this, arguments);
// reset previous selection and state of the view
this.selected_image = false;
this.image_details.hide();
this.parent.$(".create-controls").show();
views.CreateImageSelectView.__super__.show.apply(this, arguments);
},
add_image: function(img) {
......
......@@ -37,8 +37,6 @@ import os
urlpatterns = patterns('',
url(r'^$', 'synnefo.ui.views.home', name='index'),
url(r'^machines/console$', 'synnefo.ui.views.machines_console', name='machines-console'),
url(r'^machines/connect$', 'synnefo.ui.views.machines_connect', name='machines-connect'),
url(r'^feedback$', 'synnefo.ui.views.feedback_submit', name='feedback'),
url(r'userdata/', include('synnefo.ui.userdata.urls'))
)
......
import sys, os
project = u'snf-cyclades-ganeti-tools'
project = u'snf-cyclades-gtools'
copyright = u'2012, GRNET'
version = '0.8'
release = '0.8'
......
.. _snf-cyclades-ganeti-tools:
.. _snf-cyclades-gtools:
Component snf-cyclades-ganeti-tools
Component snf-cyclades-gtools
===================================
synnefo component :ref:`snf-cyclades-ganeti-tools <snf-cyclades-ganeti-tools>` is a set of
synnefo component :ref:`snf-cyclades-gtools <snf-cyclades-gtools>` is a set of
tools that need to be installed on all Ganeti nodes:
* :ref:`event daemon <eventd>`
......@@ -15,7 +15,7 @@ tools that need to be installed on all Ganeti nodes:
Event daemon
------------
synnefo component :ref:`snf-cyclades-ganeti-tools <snf-cyclades-ganeti-tools>` includes
synnefo component :ref:`snf-cyclades-gtools <snf-cyclades-gtools>` includes
``snf-ganeti-eventd``, the synnefo-specific Ganeti event daemon.
It monitors the Ganeti job queue and produces notifications to the rest of
the synnefo infrastructure over AMQP whenever a Ganeti job makes progress.
......@@ -27,7 +27,7 @@ the synnefo infrastructure over AMQP whenever a Ganeti job makes progress.
Hook
----
synnefo component :ref:`snf-cyclades-ganeti-tools <snf-cyclades-ganeti-tools>` defines
synnefo component :ref:`snf-cyclades-gtools <snf-cyclades-gtools>` defines
a synnefo-specific hook, running inside Ganeti.
.. _progress_monitor:
......@@ -42,10 +42,10 @@ A small Python tool to monitor the progress of image deployment.
Package source
--------------
The source for component :ref:`snf-cyclades-ganeti-tools <snf-cyclades-ganeti-tools>`
lives under ``snf-cyclades-ganeti-tools/`` at ``git://code.grnet.gr/git/synnefo``,
The source for component :ref:`snf-cyclades-gtools <snf-cyclades-gtools>`
lives under ``snf-cyclades-gtools/`` at ``git://code.grnet.gr/git/synnefo``,
also accessible at
`code.grnet.gr <https://code.grnet.gr/projects/synnefo/repository/revisions/master/show/snf-cyclades-ganeti-tools>`_.
`code.grnet.gr <https://code.grnet.gr/projects/synnefo/repository/revisions/master/show/snf-cyclades-gtools>`_.
Package installation
--------------------
......@@ -53,13 +53,13 @@ Package installation
.. todo:: kpap: verify instructions for installation from source.
Use ``pip`` to install the latest version of the package from source,
or request a specific version as ``snf-cyclades-ganeti-tools==x.y.z``.
or request a specific version as ``snf-cyclades-gtools==x.y.z``.
.. code-block:: console
pip install snf-cyclades-ganeti-tools -f https://docs.dev.grnet.gr/pypi
pip install snf-cyclades-gtools -f https://docs.dev.grnet.gr/pypi
On Debian Squeeze, install the ``snf-cyclades-ganeti-tools`` Debian package.
On Debian Squeeze, install the ``snf-cyclades-gtools`` Debian package.
Package configuration
---------------------
......@@ -97,9 +97,9 @@ on :ref:`GANETI-MASTER <GANETI_MASTER>`, e.g.:
Package settings
----------------
Component :ref:`snf-cyclades-ganeti-tools <snf-cyclades-ganeti-tools>` requires the following
Component :ref:`snf-cyclades-gtools <snf-cyclades-gtools>` requires the following
settings, as managed by :ref:`snf-common <snf-common>`:
.. literalinclude:: ../../../snf-cyclades-ganeti-tools/synnefo/settings.py
.. literalinclude:: ../../../snf-cyclades-gtools/synnefo/settings.py
.. todo:: make sure the settings are included properly.
......@@ -282,7 +282,7 @@ Nodes of type :ref:`APISERVER <APISERVER_NODE>`
Nodes of type :ref:`GANETI-MASTER <GANETI_MASTER>` and :ref:`GANETI-NODE <GANETI_NODE>`
Components
:ref:`snf-common <snf-common>`,
:ref:`snf-cyclades-ganeti-tools <snf-cyclades-ganeti-tools>`
:ref:`snf-cyclades-gtools <snf-cyclades-gtools>`
Nodes of type :ref:`LOGIC <LOGIC_NODE>`
Components
:ref:`snf-common <snf-common>`,
......@@ -302,7 +302,7 @@ cyclades uses :ref:`snf-common <snf-common>` for settings.
Please refer to the configuration sections of
:ref:`snf-webproject <snf-webproject>`,
:ref:`snf-cyclades-app <snf-cyclades-app>`,
:ref:`snf-cyclades-ganeti-tools <snf-cyclades-ganeti-tools>` for more
:ref:`snf-cyclades-gtools <snf-cyclades-gtools>` for more
information on their configuration.
Ganeti
......
......@@ -16,8 +16,8 @@ To chage a setting use ``kamaki config set``:
.. code-block:: console
kamaki config set image_url https://cyclades.okeanos.grnet.gr/plankton
kamaki config set storage_url https://pithos.okeanos.grnet.gr/v1
kamaki config set image_url https://cyclades.example.com/plankton
kamaki config set storage_url https://pithos.example.com/v1
kamaki config set token ...
......@@ -29,7 +29,7 @@ used by the ``kamaki store`` commands:
.. code-block:: console
kamaki config set storage_account images@okeanos.grnet.gr
kamaki config set storage_account images@example.com
kamaki config set storage_container images
If the container does not exist, you will have to create it before uploading
......@@ -48,7 +48,7 @@ or use kamaki directly:
You can use any Pithos client to verify that the image was uploaded correctly.
The full Pithos URL for the previous example will be
``pithos://images@okeanos.grnet.gr/images/ubuntu.iso``.
``pithos://images@example.com/images/ubuntu.iso``.
Register the image
......@@ -59,7 +59,7 @@ a public image the one from the previous example use:
.. code-block:: console
kamaki glance register Ubuntu pithos://images@okeanos.grnet.gr/images/ubuntu.iso --public
kamaki glance register Ubuntu pithos://images@example.com/images/ubuntu.iso --public
The ``--public`` flag is important, if missing the registered image will not
be listed by ``kamaki glance list``.
......@@ -69,7 +69,7 @@ options. A more complete example would be the following:
.. code-block:: console
kamaki glance register Ubuntu pithos://images@okeanos.grnet.gr/images/ubuntu.iso \
kamaki glance register Ubuntu pithos://images@example.com/images/ubuntu.iso \
--public --disk-format diskdump --property kernel=3.1.2
To verify that the image was registered successfully use:
......
......@@ -9,70 +9,80 @@ v0.7.4 -> v0.8
--------------
Synnefo is now distributed packaged in python/debian packages. You should
consider the following when migration from a previously `source` deployment
projects:
consider the following when migrating from projects previously deployed from
source:
* To keep consistency with future changes you should change ``python
manage.py`` calls with deployed ``snf-manage`` console script.
* To keep consistency with future changes, change all ``python manage.py``
calls to refer to the shipped ``snf-manage`` console script.
This includes automation scripts, service scripts etc.
Same applies for calls to ``dispatcher.py``, ``snf-tools/admin.py``,
``snf-tools/burnin.py`` and ``snf-tools/cloud.py`` which are replaced
respectively by ``snf-dispatcher``, ``snf-admin``,
``snf-burnin`` and ``snf-cloud``.
by ``snf-dispatcher``, ``snf-admin``, ``snf-burnin`` and ``snf-cloud``,
respectively.
* Copy custom settings files located in projects ``settings.d`` directory
* Copy custom settings files located in project's ``settings.d`` directory
to ``/etc/synnefo/`` directory.
* Migrate location from which :ref:`static files <static-files>` are served from.
.. warning::
Synnefo settings have been refactored as part of the
:ref:`snf-common <snf-common>` component. File locations may be inaccurate
and the list of changed settings incomplete. Please consult the actual
files installed under ``/etc/synnefo`` as the authoritative source for new
settings.
NEW APPS
* The 'synnefo.ui.userdata' application has been added in
settings.d/00-apps.conf. Application urls appended in ui/urls.py.
If no custom ROOT_URLCONF module is used, no url change is needed.
* The ``synnefo.ui.userdata`` application has been added in
:file:`settings.d/00-apps.conf`. Application urls appended in
:file:`ui/urls.py`.
If no custom ``ROOT_URLCONF`` module is used, no url change is needed.
* The new app has migrations defined.
Use './manage.py migrate' to migrate *all* apps.
Use ``snf-manage migrate`` to migrate *all* apps.
NEW/UPDATED SETTINGS
* BYPASS_AUTHENTICATION_TOKEN_SECRET replaces BYPASS_AUTHENTICATION_TOKEN
in settings/common/aai.py.
* New config file 31-userdata.conf, containing userdata app settings
* USERDATA_SSH_KEY_LENGTH in 31-userdata.conf:
* ``BYPASS_AUTHENTICATION_TOKEN_SECRET`` replaces ``BYPASS_AUTHENTICATION_TOKEN``
in :file:`settings/common/aai.py`.
* New config file :file:`31-userdata.conf`, containing userdata app settings
* ``USERDATA_SSH_KEY_LENGTH`` in :file:`31-userdata.conf`:
Key length in bits for generated ssh keys
* USERDATA_SSH_KEY_EXPONENT in 31-userdata.conf:
* ``USERDATA_SSH_KEY_EXPONENT`` in :file:`31-userdata.conf`:
Generated SSH key exponent
* USERDATA_MAX_SSH_KEYS_PER_USER in 31-userdata.conf:
* ``USERDATA_MAX_SSH_KEYS_PER_USER`` in :file:`31-userdata.conf`:
Maximum number of ssh keys a user is allowed to have
* UI_SUPPORT_SSH_OS_LIST, in 30-ui.conf:
* ``UI_SUPPORT_SSH_OS_LIST``, in :file:`30-ui.conf`:
A list of os names that support ssh public key assignment
* UI_OS_DEFAULT_USER_MAP, in 30-ui.conf:
* ``UI_OS_DEFAULT_USER_MAP``, in :file:`30-ui.conf`:
OS/username map to identify default user name for a specific os
* VM_CREATE_NAME_TPL, in 30-ui.conf:
* ``VM_CREATE_NAME_TPL``, in :file:`30-ui.conf`:
Template to be used for suggesting the user a default name for newly
created VMs. String {0} gets replaced by the value of metadata key "os"
for the Image.
* UI_FLAVORS_DISK_TEMPLATES_INFO added in 30-ui.conf:
* ``UI_FLAVORS_DISK_TEMPLATES_INFO`` added in :file:`30-ui.conf`:
Name/description metadata for the available flavor disk templates
* VM_CREATE_SUGGESTED_FLAVORS in 30-ui.conf:
* ``VM_CREATE_SUGGESTED_FLAVORS`` in :file:`30-ui.conf`:
Updated flavor data to include disk_template value.
* GANETI_DISK_TEMPLATES and DEFAULT_GANETI_DISK_TEMPLATE in 20-api.conf:
* ``GANETI_DISK_TEMPLATES`` and ``DEFAULT_GANETI_DISK_TEMPLATE`` in :file:`20-api.conf`:
The list of disk templates supported by the Ganeti backend.
The default template to be used when migrating Flavors with no value for
disk_template (i.e., 'drbd').
* UI_COMPUTE_URL, UI_GLANCE_URL in ui app:
* ``UI_COMPUTE_URL``, ``UI_GLANCE_URL`` in ui app:
Configurable API endpoints
* UI_ENABLE_GLANCE in ui app:
* ``UI_ENABLE_GLANCE`` in ui app:
Whether or not UI should retrieve images from the Glance API endpoint
set in UI_GLANCE_API_URL. If setting is set to False, ui will request
images from Compute API
set in ``UI_GLANCE_API_URL``. If setting is set to False, ui will request
images using calls to the Cyclades API.
UI
* synnefo.ui.userdata application has been added in INSTALLED_APPS.
* ``synnefo.ui.userdata`` application has been added in ``INSTALLED_APPS``.
Database migration is needed for the creation of application db tables.
API
* A new 'disk_template' attribute has been added to Flavors.
GANETI_DISK_TEMPLATES and DEFAULT_GANETI_DISK_TEMPLATE have been added
in 20-api.conf to control its value. A database migration is needed.
* A new ``disk_template`` attribute has been added to Flavors.
``GANETI_DISK_TEMPLATES`` and ``DEFAULT_GANETI_DISK_TEMPLATE`` have been
added in :file:`20-api.conf` to control its value. A database migration is
needed.
PLANKTON
Plankton is a new image service that has been added as a separate app. The
......@@ -81,14 +91,14 @@ PLANKTON
settings are defined in the new plankton.py file in settings.
Plankton stores and looks for images in the Pithos container named