Commit 16dc819c authored by Joanne Hugé's avatar Joanne Hugé

galene: reorganize SR and add special PTT galene

parent aa9ce4e7
......@@ -13,6 +13,10 @@
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
[instance-cfg]
[template]
filename = instance.cfg.in
md5sum = 38c79a4952a7cb63698135f1d1ed6c8c
md5sum = 1747b8cda8d815055453420de4ed677f
[template-default]
filename = instance-default.cfg.in
md5sum = fa9bd07d6a5fcf55e9548f63a943f022
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"allow_subgroups": {
"title": "Allow subgroups",
"description": "Subgroups are automatically created when first accessed",
"type": "boolean",
"default": false
},
"use_password": {
"title": "Use password",
"description": "Use a password for presenter",
"type": "boolean",
"default": true
}
}
}
{% if slapparameter_dict.get("use_password", True) %}
{% set presenter_password = "nexedi" %}
{% else %}
{% set presenter_password = "" %}
{% endif %}
[buildout]
parts =
publish-connection-parameter
stat-password
monitor-base
port-listening-promise
galene-service
{% if slapparameter_dict.get('dns_sr_url', '') %}
request-dns-entry
{% endif %}
extends = ${monitor-template:output}
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
offline = true
[publish-connection-parameter]
recipe = slapos.cookbook:publish
<= monitor-publish
url = https://[$${galene-wrapper:ip}]:$${galene-wrapper:port}
admin-user = $${admin-password:username}
admin-password = $${admin-password:passwd}
{% if slapparameter_dict.get('dns_sr_url', '') %}
domain-url = https://$${request-dns-entry:connection-domain}:$${galene-wrapper:port}
{% endif %}
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration.serialised
computer = {{ slap_connection['computer-id'] }}
partition = {{ slap_connection['partition-id'] }}
url = {{ slap_connection['server-url'] }}
key = {{ slap_connection['key-file'] }}
cert = {{ slap_connection['cert-file'] }}
configuration.ice-servers.json = [{"urls":["stun:turn-paris-rapidspace.api.nexedi.net:443"]}]
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
var = $${buildout:directory}/var
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
tmp = $${buildout:directory}/tmp
run = $${:var}/run
services = $${:etc}/service
data = $${:srv}/data
groups = $${:srv}/groups
recordings = $${:srv}/recordings
[galene-ssl]
recipe = plone.recipe.command
cert-file = $${directory:data}/cert.pem
key-file = $${directory:data}/key.pem
command = ${openssl:location}/bin/openssl req -newkey rsa:2048 -batch -new -x509 -days 3650 -nodes -keyout "$${:key-file}" -out "$${:cert-file}"
update-command =
stop-on-error = true
[admin-password]
recipe = slapos.cookbook:generate.password
storage-path = $${directory:data}/.passwd
username = admin
[stat-password]
recipe = slapos.recipe.template
inline =
$${admin-password:username}:$${admin-password:passwd}
output = $${directory:data}/passwd
[ice-servers.json]
recipe = slapos.recipe.template
inline =
$${slap-configuration:configuration.ice-servers.json}
output = $${directory:data}/ice-servers.json
[groups-json]
recipe = slapos.recipe.template
inline =
{
"public":true,
"op": [{"username":"$${admin-password:username}","password":"$${admin-password:passwd}"}],
"other": [],
"presenter": [{"username": "", "password": "{{ presenter_password }}"}],
{%- if slapparameter_dict.get("allow_subgroups", False) %}
"allow-subgroups": true
{%- else %}
"allow-subgroups": false
{%- endif %}
}
output = $${directory:groups}/public.json
[galene-service]
recipe = slapos.cookbook:wrapper
command-line = $${galene-wrapper:output}
wrapper-path = $${directory:services}/galene
mode = 0775
hash-files =
$${groups-json:output}
[galene-wrapper]
recipe = slapos.recipe.template
port = 8443
ip = $${slap-configuration:ipv6-random}
inline =
#!/bin/sh
ulimit -n $(ulimit -Hn)
exec ${gowork:bin}/galene \
-static ${galene:location}/static \
-recordings $${directory:recordings} \
-groups $${directory:groups} \
-data $${directory:data} \
-http [$${:ip}]:$${:port} \
-turn ""
output = $${directory:bin}/galene-wrapper
depends =
$${ice-servers.json:recipe}
$${groups-json:recipe}
$${galene-ssl:recipe}
[port-listening-promise]
<= monitor-promise-base
promise = check_socket_listening
name = galene-port-listening.py
config-host = $${slap-configuration:ipv6-random}
config-port = 8443
{% if slapparameter_dict.get('dns_sr_url', '') %}
[request-dns-entry]
name = dns-galene-entry
recipe = slapos.cookbook:request.serialised
software-url = {{ slapparameter_dict['dns_sr_url'] }}
software-type = core-network
server-url = {{ slap_connection['server-url'] }}
computer-id = {{ slap_connection['computer-id'] }}
partition-id = {{ slap_connection['partition-id'] }}
key-file = {{ slap_connection['key-file'] }}
cert-file = {{ slap_connection['cert-file'] }}
shared = true
sla-computer_guid = {{ slap_connection['computer-id'] }}
config-name = dns-galene-entry
config-subdomain = conference
config-ip = $${slap-configuration:ipv6-random}
return = domain ip
{% endif %}
{
"type": "object",
"$schema": "http://json-schema.org/draft-04/schema",
"title": "Input Parameters",
"properties": {
"allow_subgroups": {
"title": "Allow subgroups",
"description": "Subgroups are automatically created when first accessed",
"type": "boolean",
"default": false
},
"use_password": {
"title": "Use password",
"description": "Use a password for presenter",
"type": "boolean",
"default": true
},
"dns_sr_url": {
"default": "",
"title": "DNS SR URL",
"description": "URL of the SR running the DNS server",
"type": "string"
}
}
}
[buildout]
parts =
publish-connection-parameter
stat-password
switch-softwaretype
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[publish-connection-parameter]
recipe = slapos.cookbook:publish
url = https://[$${galene-wrapper:ip}]:$${galene-wrapper:port}
admin-user = $${admin-password:username}
admin-password = $${admin-password:passwd}
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
recipe = slapos.cookbook:slapconfiguration.serialised
computer = $${slap-connection:computer-id}
partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
configuration.ice-servers.json = [{"urls":["stun:turn-paris-rapidspace.api.nexedi.net:443"]}]
[directory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc
var = $${buildout:directory}/var
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
tmp = $${buildout:directory}/tmp
run = $${:var}/run
services = $${:etc}/service
data = $${:srv}/data
groups = $${:srv}/groups
recordings = $${:srv}/recordings
[galene-ssl]
recipe = plone.recipe.command
cert-file = $${directory:data}/cert.pem
key-file = $${directory:data}/key.pem
command = ${openssl:location}/bin/openssl req -newkey rsa:2048 -batch -new -x509 -days 3650 -nodes -keyout "$${:key-file}" -out "$${:cert-file}"
update-command =
stop-on-error = true
[admin-password]
recipe = slapos.cookbook:generate.password
storage-path = $${directory:data}/.passwd
username = admin
[stat-password]
recipe = slapos.recipe.template
inline =
$${admin-password:username}:$${admin-password:passwd}
output = $${directory:data}/passwd
[ice-servers.json]
recipe = slapos.recipe.template
inline =
$${slap-configuration:configuration.ice-servers.json}
output = $${directory:data}/ice-servers.json
[groups-json]
recipe = slapos.recipe.template
inline =
{
"public":true,
"op": [{"username":"$${admin-password:username}","password":"$${admin-password:passwd}"}],
"other": [],
"presenter": [{"username": "", "password": "nexedi"}]
}
output = $${directory:groups}/public.json
[galene-wrapper]
recipe = slapos.recipe.template
port = 8443
ip = $${slap-configuration:ipv6-random}
inline =
#!/bin/sh
ulimit -n $(ulimit -Hn)
exec ${gowork:bin}/galene \
-static ${galene:location}/static \
-recordings $${directory:recordings} \
-groups $${directory:groups} \
-data $${directory:data} \
-http [$${:ip}]:$${:port} \
-turn ""
output = $${directory:services}/galene
depends =
$${ice-servers.json:recipe}
$${groups-json:recipe}
$${galene-ssl:recipe}
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
default = dynamic-template-default:output
RootSoftwareInstance = $${:default}
[dynamic-template-default]
recipe = slapos.recipe.template:jinja2
url = ${template-default:output}
output = $${buildout:parts-directory}/$${:_buildout_section_name_}/$${:filename}
filename = instance-default.cfg
context =
key eggs_directory buildout:eggs-directory
key develop_eggs_directory buildout:develop-eggs-directory
raw buildout_directory ${buildout:directory}
section slap_connection slap-connection
key slapparameter_dict slap-configuration:configuration
[buildout]
extends =
../../component/golang/buildout.cfg
../../component/openssl/buildout.cfg
../../stack/slapos.cfg
../../stack/monitor/buildout.cfg
buildout.hash.cfg
parts =
slapos-cookbook
eggs
template
template-default
# eggs for instance.cfg
[eggs]
recipe = zc.recipe.egg
eggs =
plone.recipe.command
collective.recipe.template
[galene]
<= go-git-package
go.importpath = lab.nexedi.com/nexedi/galene
repository = https://lab.nexedi.com/nexedi/galene.git
revision = galene-ptt-0.6.4
[gowork]
install =
${galene:location}:./...
environment =
CGO_ENABLED = 0
buildflags = -ldflags='-s -w'
[template]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template.cfg
[template-default]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/template-default.cfg
[buildout]
extends =
software-base.cfg
[galene]
<= go-git-package
go.importpath = lab.nexedi.com/nexedi/galene
repository = https://lab.nexedi.com/nexedi/galene.git
revision = galene-ptt-0.6.4
{
"name": "Galene",
"description": "Galene Video-conferencing",
"serialisation": "json-in-xml",
"software-type": {
"default": {
"title": "default",
"software-type": "default",
"description": "default",
"request": "instance-ptt-default-input-schema.json",
"response": "instance-default-schema.json",
"index": 0
}
}
}
[buildout]
extends =
../../component/golang/buildout.cfg
../../component/openssl/buildout.cfg
../../stack/slapos.cfg
buildout.hash.cfg
parts =
slapos-cookbook
eggs
instance-cfg
# eggs for instance.cfg
[eggs]
recipe = zc.recipe.egg
eggs =
plone.recipe.command
collective.recipe.template
software-base.cfg
[galene]
<= go-git-package
go.importpath = lab.nexedi.com/nexedi/galene
repository = https://lab.nexedi.com/nexedi/galene.git
revision = galene-0.7.1
[gowork]
install =
${galene:location}:./...
environment =
CGO_ENABLED = 0
buildflags = -ldflags='-s -w'
[instance-cfg]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/${:filename}
output = ${buildout:directory}/instance.cfg
{
"name": "Galene",
"description": "Galene Video-conferencing",
"serialisation": "json-in-xml",
"software-type": {
"default": {
"title": "default",
"software-type": "default",
"description": "default",
"request": "instance-default-input-schema.json",
"response": "instance-default-schema.json",
"index": 0
}
}
}
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