Commit 5224c19b authored by Dionysis Grigoropoulos's avatar Dionysis Grigoropoulos
Browse files

snf-deploy: add flavor options in synnefo.conf

parent 87e6c33a
...@@ -25,6 +25,10 @@ router = node1 ...@@ -25,6 +25,10 @@ router = node1
[synnefo] [synnefo]
pithos_dir = /srv/pithos pithos_dir = /srv/pithos
flavor_cpu = 1,2,4,8
flavor_ram = 128,256,512,1024,2048,4096,8192
flavor_disk = 2,5,10,20,40,60,80,100
flavor_storage = file,plain,drbd
vm_public_bridge = br0 vm_public_bridge = br0
vm_private_bridge = prv0 vm_private_bridge = prv0
......
...@@ -1048,14 +1048,14 @@ def setup_router(): ...@@ -1048,14 +1048,14 @@ def setup_router():
env.env.common_bridge, env.env.public_iface) env.env.common_bridge, env.env.public_iface)
try_run(cmd) try_run(cmd)
@roles("cyclades") @roles("cyclades")
def cyclades_loaddata(): def cyclades_loaddata():
debug(env.host, " * Loading initial data for cyclades...") debug(env.host, " * Loading initial data for cyclades...")
tmpl = "/tmp/flavor.json" try_run("snf-manage flavor-create %s %s %s %s" % (env.env.flavor_cpu,
replace = {} env.env.flavor_ram,
custom = customize_settings_from_tmpl(tmpl, replace) env.env.flavor_disk,
put(custom, tmpl) env.env.flavor_storage))
try_run("snf-manage loaddata " + tmpl)
#run("snf-manage loaddata flavors") #run("snf-manage loaddata flavors")
......
[
{
"model": "db.Flavor",
"pk": 1,
"fields": {
"cpu": 1,
"ram": 256,
"disk": 2,
"disk_template": "plain"
}
},
{
"model": "db.Flavor",
"pk": 2,
"fields": {
"cpu": 1,
"ram": 256,
"disk": 2,
"disk_template": "file"
}
}
]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment