Commit bb200fed authored by Marco Mariani's avatar Marco Mariani

Merge branch 'master' into lapp

parents 1e02ea26 18305acf
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
import os import os
import logging import logging
import zc.buildout
class Recipe: class Recipe:
def __init__(self, buildout, name, options): def __init__(self, buildout, name, options):
self.buildout = buildout self.buildout = buildout
......
...@@ -7,6 +7,8 @@ Introduction ...@@ -7,6 +7,8 @@ Introduction
This software release is used to deploy KVM instances, NBD instances and This software release is used to deploy KVM instances, NBD instances and
Frontend instances of KVM. Frontend instances of KVM.
For extensive parameters definition, please look at parameter-input-schema.json.
Examples Examples
-------- --------
......
{
"name": "Input Parameters",
"properties": {
"ram-size": {
"title": "RAM size",
"description": "RAM size, in MB.",
"type": "integer",
"default": 1024,
"minimum": 128,
"maximum": 16384
},
"disk-size": {
"title": "Disk size",
"description": "Disk size, in GB.",
"type": "integer",
"default": 10,
"minimum": 1,
"maximum": 80
},
"nbd-ip": {
"title": "NBD hostname",
"description": "hostname (or IP) of the NBD server containing the boot image.",
"type": "string",
"format": ["host-name", "ip-address", "ipv6"],
"default": "debian.nbd.vifib.net"
},
"nbd-port": {
"title": "NBD port",
"description": "Port of the NBD server containing the boot image.",
"type": "integer",
"default": 1024,
"minimum": 1,
"maximum": 65535
},
"frontend-instance-guid": {
"title": "Frontend Instance ID",
"description": "Unique identifier of the frontend instance, like \"SOFTINST-11031\".",
"type": "string",
"default": "SOFTINST-11031"
},
"frontend-software-type": {
"title": "Frontend Software Type",
"description": "Type of the frontend instance, like \"frontend\".",
"type": "string",
"default": "frontend"
},
"frontend-software-url": {
"title": "Frontend Software URL",
"description": "Software Release URL of the frontend instance, like \"http://example.com/path/to/software.cfg\".",
"type": "string",
"format": "uri",
"default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.92:/software/kvm/software.cfg"
}
}
}
{
"name": "Output Parameters",
"properties": {
"backend-url": {
"title": "Backend URL",
"description": "URL used to connect directly to backend without frontend. Requires IPv6.",
"type": "uri",
"required": true
},
"url": {
"title": "URL",
"description": "URL used to connect to the service.",
"type": "uri",
"required": false
},
"password": {
"title": "Password",
"description": "Password used to authenticate in the service webpage.",
"type": "uri",
"required": true
}
}
}
...@@ -45,15 +45,15 @@ bytes = 4 ...@@ -45,15 +45,15 @@ bytes = 4
recipe = slapos.cookbook:kvm recipe = slapos.cookbook:kvm
vnc-ip = $${slap-network-information:local-ipv4} vnc-ip = $${slap-network-information:local-ipv4}
vnc-port = 5901 vnc-port = 5901
nbd-ip = $${slap-parameter:nbd_ip} nbd-ip = $${slap-parameter:nbd-ip}
nbd-port = $${slap-parameter:nbd_port} nbd-port = $${slap-parameter:nbd-port}
tap = $${slap-network-information:network-interface} tap = $${slap-network-information:network-interface}
disk-path = $${directory:srv}/virtual.qcow2 disk-path = $${directory:srv}/virtual.qcow2
disk-size = 10 disk-size = $${slap-parameter:disk-size}
socket-path = $${directory:var}/qmp_socket socket-path = $${directory:var}/qmp_socket
pid-path = $${directory:run}/pid_file pid-path = $${directory:run}/pid_file
smp-count = 1 smp-count = 1
ram-size = 1024 ram-size = $${slap-parameter:ram-size}
mac-address = $${create-mac:mac-address} mac-address = $${create-mac:mac-address}
runner-path = $${directory:services}/kvm runner-path = $${directory:services}/kvm
controller-path = $${directory:scripts}/kvm_controller controller-path = $${directory:scripts}/kvm_controller
...@@ -145,7 +145,7 @@ sla-instance_guid = $${slap-parameter:frontend-instance-guid} ...@@ -145,7 +145,7 @@ sla-instance_guid = $${slap-parameter:frontend-instance-guid}
[publish-kvm-backend-connection-information] [publish-kvm-backend-connection-information]
recipe = slapos.cookbook:publish recipe = slapos.cookbook:publish
backend_url = https://[$${novnc-instance:ip}]:$${novnc-instance:port}/vnc_auto.html?host=[$${novnc-instance:ip}]&port=$${novnc-instance:port}&encrypt=1 backend-url = https://[$${novnc-instance:ip}]:$${novnc-instance:port}/vnc_auto.html?host=[$${novnc-instance:ip}]&port=$${novnc-instance:port}&encrypt=1
password = $${kvm-instance:passwd} password = $${kvm-instance:passwd}
[publish-kvm-frontend-connection-information] [publish-kvm-frontend-connection-information]
...@@ -164,5 +164,13 @@ curl_path = ${curl:location}/bin/curl ...@@ -164,5 +164,13 @@ curl_path = ${curl:location}/bin/curl
frontend-instance-guid = SOFTINST-11031 frontend-instance-guid = SOFTINST-11031
frontend-software-type = frontend frontend-software-type = frontend
frontend-software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.92:/software/kvm/software.cfg frontend-software-url = http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.92:/software/kvm/software.cfg
nbd_port = 1024
nbd_ip = debian.nbd.vifib.net nbd-port = 1024
nbd-ip = debian.nbd.vifib.net
# backward compatibility: old style (nbd_port) can still be used.
nbd_port = $${:nbd-port}
nbd_ip = $${:nbd-ip}
ram-size = 1024
disk-size = 10
...@@ -3,10 +3,12 @@ ...@@ -3,10 +3,12 @@
# Instanciate kvm+ # Instanciate kvm+
# #
############################# #############################
# Deprecated. Just specify amount of RAM / disk you want in instance parameter.
[buildout] [buildout]
extends = ${template-kvm:output} extends = ${template-kvm:output}
[kvm-instance] [slap-parameter]
disk-size = 20
smp-count = 2
ram-size = 2048 ram-size = 2048
disk-size = 20
\ No newline at end of file
...@@ -118,35 +118,35 @@ command = ...@@ -118,35 +118,35 @@ command =
[template-kvm] [template-kvm]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kvm.cfg url = ${:_profile_base_location_}/instance-kvm.cfg.in
md5sum = 68478e759138a42f09518d01da548b8a md5sum = 67c1980ba1e70b376f2811602991ff09
output = ${buildout:directory}/template-kvm.cfg output = ${buildout:directory}/template-kvm.cfg
mode = 0644 mode = 0644
[template-kvmplus] [template-kvmplus]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kvmplus.cfg url = ${:_profile_base_location_}/instance-kvmplus.cfg.in
md5sum = 301fbe4eaaab5648e1a933a4c853f5b9 md5sum = c8e92237eeda93caca1132b5202c3a02
output = ${buildout:directory}/template-kvmplus.cfg output = ${buildout:directory}/template-kvmplus.cfg
mode = 0644 mode = 0644
[template-nbd] [template-nbd]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-nbd.cfg url = ${:_profile_base_location_}/instance-nbd.cfg.in
md5sum = c030e7be231aba25ee0f51703e60ce67 md5sum = c030e7be231aba25ee0f51703e60ce67
output = ${buildout:directory}/template-nbd.cfg output = ${buildout:directory}/template-nbd.cfg
mode = 0644 mode = 0644
[template-frontend] [template-frontend]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-frontend.cfg url = ${:_profile_base_location_}/instance-frontend.cfg.in
md5sum = 73359b52013b1b65f75005e8698ed180 md5sum = 73359b52013b1b65f75005e8698ed180
output = ${buildout:directory}/template-frontend.cfg output = ${buildout:directory}/template-frontend.cfg
mode = 0644 mode = 0644
[template] [template]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg url = ${:_profile_base_location_}/instance.cfg.in
md5sum = 68788763d23f70f24b9e575871c903a8 md5sum = 68788763d23f70f24b9e575871c903a8
output = ${buildout:directory}/template.cfg output = ${buildout:directory}/template.cfg
mode = 0644 mode = 0644
......
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