Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
slapos
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Sebastian
slapos
Commits
b9b59cf9
Commit
b9b59cf9
authored
Dec 04, 2015
by
Alain Takoudjou
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'lab/master' into HEAD
parents
f570ca1e
984c2f9a
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
83 additions
and
17 deletions
+83
-17
software/kvm/README.txt
software/kvm/README.txt
+63
-0
software/kvm/common.cfg
software/kvm/common.cfg
+2
-2
software/kvm/instance-kvm-cluster.cfg.jinja2.in
software/kvm/instance-kvm-cluster.cfg.jinja2.in
+2
-2
software/kvm/instance-kvm.cfg.jinja2
software/kvm/instance-kvm.cfg.jinja2
+16
-13
No files found.
software/kvm/README.txt
View file @
b9b59cf9
...
@@ -32,6 +32,69 @@ to be accessible from IPv4.
...
@@ -32,6 +32,69 @@ to be accessible from IPv4.
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).
KVM instance parameters:
~~~~~~~~~~~~~~~~~~~~~~~~~
- frontend-software-type (default: frontend)
- frontend-software-url (default: http://git.erp5.org/gitweb/slapos.git/blob_plain/refs/tags/slapos-0.92:/software/kvm/software.cfg)
- frontend-instance-guid
- frontend-instance-name (default: VNC Frontend)
- nbd-port (default: 1024)
- nbd-host
- nbd2-port (default: 1024)
- nbd2-host
- ram-size (default: 1024)
- disk-size = (default: 10)
- disk-type (default: virtio)
Disk size and Disk type are used if no virtual hard drive is specified.
- cpu-count (default: 1)
- cpu-options
cpu-option is a string: [cores=cores][,threads=threads][,sockets=sockets][,maxcpus=maxcpus]
- numa
list of numa options separate by space ex: node,nodeid=1,cpus=9-15 node,nodeid=2,cpus=1,3,7
- nat-rules (default: 22 80 443)
For port forwarding to IPv6 of slapos partition
- use-nat (default: True)
Add one interface using qemu User Network (NAT), this interface support nat-rules.
- use-tap (default: False)
Add One interface that use tap interface
- enable-vhost (default: False)
Increase network speed by enabling vhost on qemu. (To use if the module is loaded on host machine)
- virtual-hard-drive-url
URL of qemu image to download and use by this VM. If specified, Disk size and Disk type will be ignored.
- virtual-hard-drive-md5sum
MD5Sum of image disk to download
- virtual-hard-drive-gzipped (default: False)
Compress image to reduce size with gzip (.gz)
- hard-drive-url-check-certificate (default: True)
if virtual-hard-drive-url use self-signed https, then specify if https certificate should be verified or not
- external-disk-number (default: 0)
Number of additional disk to attach to this VM. Need slapformat to be configured for this feature.
- external-disk-size (default: 20)
- external-disk-format (default: qcow2)
additional disk format. should be in this list: ['qcow2', 'raw', 'vdi', 'vmdk', 'cloop', 'qed']
- enable-http-server (default: False)
Configure server that will help to get some files into the vm from http
require use-nat = True
All files in the document_root folder of the server will be accessible to the vm: http://10.0.2.100/PATH_TO_FILE
- httpd-port (default: 8081)
- authorized-key
the public key file will be available in the VM via url http://10.0.2.100/authorized_key
- data-to-vm
send some text content which will be accessible to the vm through the file: http://10.0.2.100/data
- keyboard-layout-language (default: fr)
Change keyboard layout language (Change to en-us if you face some bad bihaviors)
Language list: ['ar', 'da', 'de', 'de-ch', 'en-gb', 'en-us', 'es', 'et', 'fi',
'fo', 'fr', 'fr-be', 'fr-ca', 'fr-ch', 'hr', 'hu', 'is', 'it', 'ja', 'lt',
'lv', 'mk', 'nl', 'nl-be', 'no', 'pl', 'pt', 'pt-br', 'ru', 'sl', 'sv',
'th', 'tr']
Resilient KVM instance
Resilient KVM instance
~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~
...
...
software/kvm/common.cfg
View file @
b9b59cf9
...
@@ -98,7 +98,7 @@ mode = 0644
...
@@ -98,7 +98,7 @@ mode = 0644
recipe = hexagonit.recipe.download
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
url = ${:_profile_base_location_}/instance-kvm.cfg.jinja2
mode = 644
mode = 644
md5sum =
0df2380dc0151a0669804891fdfe07d1
md5sum =
ade64ba25dd4e98514479ac3363ea6ce
download-only = true
download-only = true
on-update = true
on-update = true
...
@@ -106,7 +106,7 @@ on-update = true
...
@@ -106,7 +106,7 @@ on-update = true
recipe = hexagonit.recipe.download
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/instance-kvm-cluster.cfg.jinja2.in
url = ${:_profile_base_location_}/instance-kvm-cluster.cfg.jinja2.in
mode = 644
mode = 644
md5sum =
23235b16e2f4deb00a1bd5bf0846daaf
md5sum =
1f5a7b9307059a46318fab4fe63f3ecd
download-only = true
download-only = true
on-update = true
on-update = true
...
...
software/kvm/instance-kvm-cluster.cfg.jinja2.in
View file @
b9b59cf9
...
@@ -69,13 +69,13 @@ config-httpd-port = {{ dumps(kvm_parameter_dict.get('httpd-port', 8081)) }}
...
@@ -69,13 +69,13 @@ config-httpd-port = {{ dumps(kvm_parameter_dict.get('httpd-port', 8081)) }}
{% if kvm_parameter_dict.get('data-to-vm', '') -%}
{% if kvm_parameter_dict.get('data-to-vm', '') -%}
config-data-to-vm = {{ dumps(kvm_parameter_dict.get('data-to-vm', '')) }}
config-data-to-vm = {{ dumps(kvm_parameter_dict.get('data-to-vm', '')) }}
{% endif -%}
{% endif -%}
config-enable-monitor =
True
config-enable-monitor =
{{ dumps(kvm_parameter_dict.get('enable-monitor', True)) }}
# Enable simple http server on ipv6 so all VMs will access it
# Enable simple http server on ipv6 so all VMs will access it
config-document-host = ${apache-conf:ip}
config-document-host = ${apache-conf:ip}
config-document-port = ${apache-conf:port}
config-document-port = ${apache-conf:port}
config-document-path = ${hash-code:passwd}
config-document-path = ${hash-code:passwd}
config-keyboard-layout-language = {{ dumps(kvm_parameter_dict.get('keyboard-layout-language', '')) }}
config-keyboard-layout-language = {{ dumps(kvm_parameter_dict.get('keyboard-layout-language', '
fr
')) }}
config-type = cluster
config-type = cluster
{% set authorized_source_list = slapparameter_dict.get('fw-authorized-sources', []) -%}
{% set authorized_source_list = slapparameter_dict.get('fw-authorized-sources', []) -%}
...
...
software/kvm/instance-kvm.cfg.jinja2
View file @
b9b59cf9
...
@@ -2,13 +2,17 @@
...
@@ -2,13 +2,17 @@
{% set use_tap = slapparameter_dict.get('use-tap', 'False').lower() -%}
{% set use_tap = slapparameter_dict.get('use-tap', 'False').lower() -%}
{% set use_nat = slapparameter_dict.get('use-nat', 'True').lower() -%}
{% set use_nat = slapparameter_dict.get('use-nat', 'True').lower() -%}
{% set name = slapparameter_dict.get('name', 'localhost') -%}
{% set name = slapparameter_dict.get('name', 'localhost') -%}
{% set monitor = slapparameter_dict.get('enable-monitor', 'True').lower() -%}
{% set disable_ansible_promise = slapparameter_dict.get('disable-ansible-promise', 'False').lower() -%}
{% set disable_ansible_promise = slapparameter_dict.get('disable-ansible-promise', 'False').lower() -%}
{% set instance_type = slapparameter_dict.get('type', 'standalone') -%}
{% set instance_type = slapparameter_dict.get('type', 'standalone') -%}
{% set nat_rule_list = slapparameter_dict.get('nat-rules', '22 80 443') -%}
{% set nat_rule_list = slapparameter_dict.get('nat-rules', '22 80 443') -%}
{% set frontend_software_type = 'default' -%}
{% set frontend_software_type = 'default' -%}
{% set extends_list = [] -%}
{% set extends_list = [] -%}
{% set part_list = [] -%}
{% set part_list = [] -%}
{% set monitor = True -%}
{% if slapparameter_dict.get('enable-monitor', 'True').lower() == 'false' -%}
{% set monitor = False -%}
{% endif -%}
{% if instance_type == 'cluster' -%}
{% if instance_type == 'cluster' -%}
{% set nat_rule_list = slapparameter_dict.get('nat-rules', '') %}
{% set nat_rule_list = slapparameter_dict.get('nat-rules', '') %}
...
@@ -309,7 +313,7 @@ hostname = ${httpd:host}
...
@@ -309,7 +313,7 @@ hostname = ${httpd:host}
port = ${httpd:port}
port = ${httpd:port}
{% endif %}
{% endif %}
{% if monitor
== 'true'
-%}
{% if monitor -%}
[monitor-access-log]
[monitor-access-log]
< = monitor-directory-access
< = monitor-directory-access
source = ${directory:log}
source = ${directory:log}
...
@@ -356,8 +360,8 @@ maximum-extra-disk-amount = {{ disk_number }}
...
@@ -356,8 +360,8 @@ maximum-extra-disk-amount = {{ disk_number }}
{% set iface = 'eth0' -%}
{% set iface = 'eth0' -%}
{% if use_nat == 'true' -%}
{% if use_nat == 'true' -%}
{% set iface = 'eth1' -%}
{% set iface = 'eth1' -%}
{% if nat_rule_list -%}
# Publish NAT port mapping status
# Publish NAT port mapping status
# XXX: hardcoded value from [slap-parameter]
{% for port in nat_rule_list.split(' ') -%}
{% for port in nat_rule_list.split(' ') -%}
{% set external_port = 10000 + port|int() -%}
{% set external_port = 10000 + port|int() -%}
nat-rule-port-{{port}} = ${slap-network-information:global-ipv6} : ${6tunnel-{{external_port}}:ipv6-port}
nat-rule-port-{{port}} = ${slap-network-information:global-ipv6} : ${6tunnel-{{external_port}}:ipv6-port}
...
@@ -366,6 +370,7 @@ nat-rule-url-{{port}} = [${slap-network-information:global-ipv6}]:${6tunnel-{{ex
...
@@ -366,6 +370,7 @@ nat-rule-url-{{port}} = [${slap-network-information:global-ipv6}]:${6tunnel-{{ex
{% endif -%}
{% endif -%}
{% endfor -%}
{% endfor -%}
{% endif -%}
{% endif -%}
{% endif -%}
{% if use_tap == 'true' -%}
{% if use_tap == 'true' -%}
tap-ipv4 = ${slap-network-information:tap-ipv4}
tap-ipv4 = ${slap-network-information:tap-ipv4}
{% endif -%}
{% endif -%}
...
@@ -553,8 +558,8 @@ authorized-key =
...
@@ -553,8 +558,8 @@ authorized-key =
# send some content which will be accessible to the vm through static url: http://10.0.2.100/data
# send some content which will be accessible to the vm through static url: http://10.0.2.100/data
data-to-vm =
data-to-vm =
# Change keyboard layout language
# Change keyboard layout language
(Change to en-us if you face some bad bihaviors)
keyboard-layout-language =
keyboard-layout-language =
fr
#############################
#############################
#
#
...
@@ -562,10 +567,8 @@ keyboard-layout-language =
...
@@ -562,10 +567,8 @@ keyboard-layout-language =
#
#
#############################
#############################
# Set Additionals parts
{% if slapparameter_dict.get('document-host', '') %}
{% if slapparameter_dict.get('document-host', '') %}
# Set Additionals parts
{% do part_list.append('cluster-url-path') -%}
{% do part_list.append('cluster-url-path') -%}
{% endif -%}
{% endif -%}
{% if enable_http == 'true' %}
{% if enable_http == 'true' %}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment