Commit 90558870 authored by Vivien Alger's avatar Vivien Alger

New flavor of KVM with an ssh access

parent e01342cb
...@@ -4,8 +4,7 @@ kvm ...@@ -4,8 +4,7 @@ kvm
Introduction Introduction
------------ ------------
This software release is used to deploy KVM instances, NBD instances and This software release is used to deploy KVM instances with a ssh access.
Frontend instances of KVM.
For extensive parameters definition, please look at parameter-input-schema.json. For extensive parameters definition, please look at parameter-input-schema.json.
...@@ -18,47 +17,31 @@ Software Release from slap console or command line. ...@@ -18,47 +17,31 @@ Software Release from slap console or command line.
KVM instance (1GB of RAM, 10GB of SSD, one core) KVM instance (1GB of RAM, 10GB of SSD, one core)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Note that the KVM instance will try to request a frontend slave instance in order Note that for this flavor of KVM you will need to pass a public key for ssh
to be accessible from IPv4. access.
Also note that since this is a special release you WILL(most likely) have to
use the development.cfg rather than the software.cfg file for specifying your
software release
:: ::
myawesomekvm = request( myawesomekvm = request(
software_release=kvm, software_release="/path_to_your_slapos_repository(or url)/software/manual_kvm/development.cfg",
partition_reference="My awesome KVM", partition_reference="My awesome KVM",
partition_parameter_kw={ partition_parameter_kw={
"nbd-host":"ubuntu-1204.nbd.vifib.net", "nbd-host":"ubuntu-1204.nbd.vifib.net",
"authorized-key":"<your public key>"
} }
) )
See the instance-kvm-input-schema.json file for more instance parameters (cpu-count, ram-size, disk-size, etc). See the instance-kvm-input-schema.json file for more instance parameters (cpu-count, ram-size, disk-size, etc).
NBD instance Once requested your instance shall appear on slapos.org in the "My services" section.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This type of instance will allow to host a disk image that will be used by
any KVM instance.
::
mynbd = request(
software_release=kvm,
partition_reference="mynbd",
software_type="nbd",
)
Starting your instance
~~~~~~~~~~~~~~~~~~~~~~
KVM Frontend Master Instance (will host all frontend Slave Instances) All the scripts generated by SlapOS can be found in /instance_home/etc/scripts.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ If you want to start your instance without those, you can access the binaries
through the /instance_home/software_release/bin directory.
This type of instance will allow to host any frontend slave instance requested
by KVM instances. Slave instances (and thus KVM instance) will be accessible
at : https://mydomain.com/instancereference .
:: SlapOS will only start the ssh server, everything else is up to you.
mykvmfrontend = request(
software_release=kvm,
partition_reference="mykvmfrontend",
partition_parameter_kw={
"domain":"mydomain.com"
},
software_type="frontend",
)
...@@ -72,7 +72,7 @@ command = ...@@ -72,7 +72,7 @@ command =
[template-kvm] [template-kvm]
recipe = slapos.recipe.template recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kvm.cfg.in url = ${:_profile_base_location_}/instance-kvm.cfg.in
#md5sum = cb8adfb70882a07e1df3943983c27963 md5sum = 0d7f19172d62d9f024fec6b0ce7b1a19
output = ${buildout:directory}/template-kvm.cfg output = ${buildout:directory}/template-kvm.cfg
mode = 0644 mode = 0644
......
...@@ -84,6 +84,14 @@ ...@@ -84,6 +84,14 @@
"type": "string", "type": "string",
"format": "uri", "format": "uri",
"default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.92:/software/kvm/software.cfg" "default": "http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.92:/software/kvm/software.cfg"
},
"authorized-key": {
"title": "Authorized key for ssh connection",
"description": "Authorized key for ssh connection",
"type": "string",
"default": ""
} }
} }
} }
...@@ -20,6 +20,13 @@ ...@@ -20,6 +20,13 @@
"description": "Password used to authenticate in the service webpage.", "description": "Password used to authenticate in the service webpage.",
"type": "uri", "type": "uri",
"required": true "required": true
} },
"ssh_connection": {
"title": "SSH connection",
"description": "SSH connection string",
"type": "string",
"required": true
}
} }
} }
...@@ -232,6 +232,8 @@ recipe = slapos.cookbook:publish ...@@ -232,6 +232,8 @@ 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}
url = $${request-slave-frontend:connection-url}/vnc_auto.html?host=$${request-slave-frontend:connection-domainname}&port=$${request-slave-frontend:connection-port}&encrypt=1&path=$${request-slave-frontend:connection-resource} url = $${request-slave-frontend:connection-url}/vnc_auto.html?host=$${request-slave-frontend:connection-domainname}&port=$${request-slave-frontend:connection-port}&encrypt=1&path=$${request-slave-frontend:connection-resource}
ssh_connection = ssh $${dropbear-server:host} -p $${dropbear-server:port}
ip = $${dropbear-server:host}
[dropbear-promise] [dropbear-promise]
recipe = slapos.cookbook:check_port_listening recipe = slapos.cookbook:check_port_listening
...@@ -251,7 +253,7 @@ curl_path = ${curl:location}/bin/curl ...@@ -251,7 +253,7 @@ curl_path = ${curl:location}/bin/curl
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
frontend-instance-guid = frontend-instance-guid =
#Default value for authorized-key
authorized-key = authorized-key =
nbd-port = 1024 nbd-port = 1024
......
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