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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ophélie Gagnard
slapos
Commits
7918c2b2
Commit
7918c2b2
authored
May 24, 2021
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/theia: Improve parameters handling
parent
24463a79
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
41 deletions
+40
-41
software/theia/buildout.hash.cfg
software/theia/buildout.hash.cfg
+2
-2
software/theia/instance-theia.cfg.jinja.in
software/theia/instance-theia.cfg.jinja.in
+19
-24
software/theia/instance.cfg.in
software/theia/instance.cfg.in
+19
-15
No files found.
software/theia/buildout.hash.cfg
View file @
7918c2b2
...
@@ -15,11 +15,11 @@
...
@@ -15,11 +15,11 @@
[instance-theia]
[instance-theia]
_update_hash_filename_ = instance-theia.cfg.jinja.in
_update_hash_filename_ = instance-theia.cfg.jinja.in
md5sum =
65c66a4cc4eb1d074dcafddf945a34d4
md5sum =
740998d9735b0c12a16ddc62a2aa9c98
[instance]
[instance]
_update_hash_filename_ = instance.cfg.in
_update_hash_filename_ = instance.cfg.in
md5sum =
43923e3e1f27c43696ecbca9ee147bdb
md5sum =
b1c6fc005340bd60fa8a53eda4781771
[yarn.lock]
[yarn.lock]
_update_hash_filename_ = yarn.lock
_update_hash_filename_ = yarn.lock
...
...
software/theia/instance-theia.cfg.jinja.in
View file @
7918c2b2
{% set additional_frontend = slapconfiguration_section['configuration.additional-frontend-guid'] %}
{% set parameter_dict = dict(default_parameter_dict, **parameter_dict) %}
{% set additional_frontend = parameter_dict['additional-frontend-guid'] %}
[buildout]
[buildout]
extends =
extends =
...
@@ -26,12 +27,6 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
...
@@ -26,12 +27,6 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
offline = true
[instance-parameter]
{% for k, v in slapconfiguration_section.items() -%}
{{ k }} = {{ v }}
{% endfor -%}
[publish-connection-parameter]
[publish-connection-parameter]
<= monitor-publish
<= monitor-publish
recipe = slapos.cookbook:publish
recipe = slapos.cookbook:publish
...
@@ -142,18 +137,18 @@ return = domain secure_access
...
@@ -142,18 +137,18 @@ return = domain secure_access
[remote-frontend]
[remote-frontend]
<= remote-frontend-base
<= remote-frontend-base
name =
$${instance-parameter:configuration.frontend-name
}
name =
{{ parameter_dict['frontend-name'] }
}
software-url =
$${instance-parameter:configuration.frontend-sr
}
software-url =
{{ parameter_dict['frontend-sr'] }
}
software-type =
$${instance-parameter:configuration.frontend-sr-type
}
software-type =
{{ parameter_dict['frontend-sr-type'] }
}
sla-instance_guid =
$${instance-parameter:configuration.frontend-guid
}
sla-instance_guid =
{{ parameter_dict['frontend-guid'] }
}
{% if additional_frontend %}
{% if additional_frontend %}
[remote-additional-frontend]
[remote-additional-frontend]
<= remote-frontend-base
<= remote-frontend-base
name =
$${instance-parameter:configuration.additional-frontend-name
}
name =
{{ parameter_dict['additional-frontend-name'] }
}
software-url =
$${instance-parameter:configuration.additional-frontend-sr
}
software-url =
{{ parameter_dict['additional-frontend-sr'] }
}
software-type =
$${instance-parameter:configuration.additional-frontend-sr-type
}
software-type =
{{ parameter_dict['additional-frontend-sr-type'] }
}
sla-instance_guid =
$${instance-parameter:configuration.additional-frontend-guid
}
sla-instance_guid =
{{ parameter_dict['additional-frontend-guid'] }
}
{% endif %}
{% endif %}
...
@@ -169,7 +164,7 @@ bytes = 12
...
@@ -169,7 +164,7 @@ bytes = 12
recipe = slapos.cookbook:free_port
recipe = slapos.cookbook:free_port
minimum = 3000
minimum = 3000
maximum = 3100
maximum = 3100
ip =
$${instance-parameter:ipv6-random
}
ip =
{{ ipv6_random }
}
[frontend-instance-certificate]
[frontend-instance-certificate]
recipe = plone.recipe.command
recipe = plone.recipe.command
...
@@ -325,7 +320,7 @@ template =
...
@@ -325,7 +320,7 @@ template =
recipe = slapos.cookbook:free_port
recipe = slapos.cookbook:free_port
minimum = 3500
minimum = 3500
maximum = 3600
maximum = 3600
ip =
$${instance-parameter:ipv4-random
}
ip =
{{ ipv4_random }
}
[theia-service]
[theia-service]
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
...
@@ -360,7 +355,7 @@ command-line = $${theia-service:rendered} --hostname=$${:hostname} --port=$${:p
...
@@ -360,7 +355,7 @@ command-line = $${theia-service:rendered} --hostname=$${:hostname} --port=$${:p
hash-existing-files =
hash-existing-files =
${yarn.lock:output}
${yarn.lock:output}
${theia-wrapper:rendered}
${theia-wrapper:rendered}
ip =
$${instance-parameter:ipv4-random
}
ip =
{{ ipv4_random }
}
hostname = $${:ip}
hostname = $${:ip}
port = $${theia-service:port}
port = $${theia-service:port}
base-url = $${theia-service:base-url}
base-url = $${theia-service:base-url}
...
@@ -416,11 +411,11 @@ command =
...
@@ -416,11 +411,11 @@ command =
recipe = slapos.cookbook:free_port
recipe = slapos.cookbook:free_port
minimum = 4000
minimum = 4000
maximum = 4100
maximum = 4100
ip =
$${instance-parameter:ipv4-random
}
ip =
{{ ipv4_random }
}
[slapos-standalone-config]
[slapos-standalone-config]
ipv4 =
$${instance-parameter:ipv4-random
}
ipv4 =
{{ ipv4_random }
}
ipv6 =
$${instance-parameter:ipv6-random
}
ipv6 =
{{ ipv6_random }
}
port = $${slapos-standalone-port:port}
port = $${slapos-standalone-port:port}
slapos-configuration = $${directory:runner}/etc/slapos.cfg
slapos-configuration = $${directory:runner}/etc/slapos.cfg
computer-id = slaprunner
computer-id = slaprunner
...
@@ -451,8 +446,8 @@ template =
...
@@ -451,8 +446,8 @@ template =
$${slapos-standalone-config:ipv6} \
$${slapos-standalone-config:ipv6} \
$${slapos-standalone-config:port} \
$${slapos-standalone-config:port} \
$${slapos-standalone-config:computer-id} \
$${slapos-standalone-config:computer-id} \
--sr='
$${instance-parameter:configuration.embedded-sr
}' \
--sr='
{{ parameter_dict['embedded-sr'] }
}' \
--srtype='
$${instance-parameter:configuration.embedded-sr-type
}' \
--srtype='
{{ parameter_dict['embedded-sr-type'] }
}' \
$${slap-connection:server-url} \
$${slap-connection:server-url} \
$${slap-connection:computer-id} \
$${slap-connection:computer-id} \
$${slap-connection:partition-id} \
$${slap-connection:partition-id} \
...
@@ -482,7 +477,7 @@ command =
...
@@ -482,7 +477,7 @@ command =
update-command = $${:command}
update-command = $${:command}
service-name = slapos-node-auto
service-name = slapos-node-auto
supervisor-conf = $${directory:runner}/etc/supervisord.conf
supervisor-conf = $${directory:runner}/etc/supervisord.conf
autorun =
$${instance-parameter:configuration.autorun
}
autorun =
{{ parameter_dict['autorun'] }
}
# Theia Local Environment Setup
# Theia Local Environment Setup
...
...
software/theia/instance.cfg.in
View file @
7918c2b2
...
@@ -12,20 +12,6 @@ partition = $${slap-connection:partition-id}
...
@@ -12,20 +12,6 @@ partition = $${slap-connection:partition-id}
url = $${slap-connection:server-url}
url = $${slap-connection:server-url}
key = $${slap-connection:key-file}
key = $${slap-connection:key-file}
cert = $${slap-connection:cert-file}
cert = $${slap-connection:cert-file}
;Theia default configuration
configuration.autorun = running
configuration.embedded-sr =
configuration.embedded-sr-type =
;Frontend default configuration
configuration.frontend-name = Theia Frontend
configuration.frontend-sr = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
configuration.frontend-sr-type = RootSoftwareInstance
configuration.frontend-guid =
;Additional frontend default configuration
configuration.additional-frontend-name = Theia Additional Frontend
configuration.additional-frontend-sr = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
configuration.additional-frontend-sr-type = RootSoftwareInstance
configuration.additional-frontend-guid =
[switch-softwaretype]
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
recipe = slapos.cookbook:switch-softwaretype
...
@@ -39,4 +25,22 @@ template = ${instance-theia:output}
...
@@ -39,4 +25,22 @@ template = ${instance-theia:output}
rendered = $${buildout:directory}/instance-theia.cfg
rendered = $${buildout:directory}/instance-theia.cfg
mode = 0644
mode = 0644
context =
context =
section slapconfiguration_section slap-configuration
jsonkey default_parameter_dict :default-parameters
key parameter_dict slap-configuration:configuration
key ipv6_random slap-configuration:ipv6-random
key ipv4_random slap-configuration:ipv4-random
default-parameters =
{
"autorun": "running",
"embedded-sr": null,
"embedded-sr-type": null,
"frontend-name": "Theia Frontend",
"frontend-sr": "$${:frontend-sr}",
"frontend-sr-type": "RootSoftwareInstance",
"frontend-guid": null,
"additional-frontend-name":"Theia Additional Frontend",
"additional-frontend-sr": "$${:frontend-sr}",
"additional-frontend-sr-type": "RootSoftwareInstance",
"additional-frontend-guid": null
}
frontend-sr = http://git.erp5.org/gitweb/slapos.git/blob_plain/HEAD:/software/apache-frontend/software.cfg
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