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
Xavier Thompson
slapos
Commits
88fa3070
Commit
88fa3070
authored
Feb 19, 2021
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/theia: Add resilience
parent
eb5d675c
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
672 additions
and
508 deletions
+672
-508
software/theia/buildout.hash.cfg
software/theia/buildout.hash.cfg
+18
-2
software/theia/instance-theia-export.cfg.in
software/theia/instance-theia-export.cfg.in
+19
-0
software/theia/instance-theia-import.cfg.in
software/theia/instance-theia-import.cfg.in
+15
-0
software/theia/instance-theia-resilient.cfg.jinja2
software/theia/instance-theia-resilient.cfg.jinja2
+54
-0
software/theia/instance-theia.cfg.jinja2.in
software/theia/instance-theia.cfg.jinja2.in
+469
-0
software/theia/instance.cfg.in
software/theia/instance.cfg.in
+47
-504
software/theia/software.cfg
software/theia/software.cfg
+32
-2
stack/resilient/README.rst
stack/resilient/README.rst
+18
-0
No files found.
software/theia/buildout.hash.cfg
View file @
88fa3070
...
@@ -13,9 +13,25 @@
...
@@ -13,9 +13,25 @@
# section inheritance (< = ...) are NOT supported (but you should really
# section inheritance (< = ...) are NOT supported (but you should really
# not need these here).
# not need these here).
[instance]
[instance
.cfg
]
filename = instance.cfg.in
filename = instance.cfg.in
md5sum = 4f119df2b2d71e5ec1fd04051fd8fff8
md5sum = df9548360119b698568694a037ec9c76
[instance-theia.cfg.jinja2.in]
filename = instance-theia.cfg.jinja2.in
md5sum = 3ce9e1c54943840b0e363764bf28111e
[instance-theia-import.cfg.in]
filename = instance-theia-import.cfg.in
md5sum = 45ef2827041459f897f9e9c45eb44832
[instance-theia-export.cfg.in]
filename = instance-theia-export.cfg.in
md5sum = 9feb1a143fe70b70dda222d752315e13
[instance-theia-resilient.cfg.jinja2]
filename = instance-theia-resilient.cfg.jinja2
md5sum = 388ef606ccbc6d543685a53b18eb7369
[yarn.lock]
[yarn.lock]
filename = yarn.lock
filename = yarn.lock
...
...
software/theia/instance-theia-export.cfg.in
0 → 100644
View file @
88fa3070
[buildout]
extends = ${theia:rendered}
${template-pbsready-export:rendered}
parts += $${:theia-parts}
[slap-parameter]
namebase = ${slap-configuration:configuration.namebase}
[exporter]
recipe = slapos.cookbook:wrapper
command-line = echo "hello"
wrapper-path = $${directory:bin}/$${slap-parameter:namebase}-exporter
# wrapper parameter is needed by resilience stack
wrapper = $${:wrapper-path}
# Extends publish section with resilient parameters
[publish-connection-parameter]
<= resilient-publish-connection-parameter
software/theia/instance-theia-import.cfg.in
0 → 100644
View file @
88fa3070
[buildout]
extends = ${theia:rendered}
${template-pbsready-import:rendered}
parts += $${:theia-parts}
[slap-parameter]
namebase = ${slap-configuration:configuration.namebase}
[importer]
recipe = slapos.cookbook:wrapper
command-line = echo "goodbye"
wrapper-path = $${directory:bin}/$${slap-parameter:namebase}-exporter
# wrapper parameter is needed by resilience stack
wrapper = $${:wrapper-path}
software/theia/instance-theia-resilient.cfg.jinja2
0 → 100644
View file @
88fa3070
{% import 'parts' as parts %}
{% import 'replicated' as replicated with context %}
{% set number_of_instances = slapparameter_dict.get('resilient-clone-number', 1)|int %}
[buildout]
eggs-directory = {{ eggs_directory }}
develop-eggs-directory = {{ develop_eggs_directory }}
extends =
{{ monitor_template }}
parts +=
# Generate the parts to request theia-export, pull-backup and theia-import
# See stack/resilient/template-parts.cfg.in and stack/resilient/template-replicated.cfg.in
# See below for the generation of the sections corresponding to the parts generated here
{{ parts.replicate("theia", number_of_instances + 1) }}
# Also publish some connection parameters
publish-connection-parameter
[ArgLeader]
[ArgBackup]
# Generate sections to request theia-export, pull-backup and theia-import
# See stack/resilient/template-replicated.cfg.in
# In particular:
#
# [request-theia]
# <= ArgLeader
# ...
#
# [request-theia-pseudo-replicating-1]
# <= ArgBackup
# ...
#
# [request-pbs-theia-1]
# ...
#
{{ replicated.replicate("theia", number_of_instances + 1,
"theia-export", "theia-import",
"ArgLeader", "ArgBackup",
slapparameter_dict=slapparameter_dict) }}
# Extend the list of return parameters for the theia-export request
[request-theia]
return += url username password
# Publish some parameters from the theia-export instance
[publish-connection-parameter]
recipe = slapos.cookbook:publish
url = ${request-theia:connection-url}
username = ${request-theia:connection-username}
password = ${request-theia:connection-password}
software/theia/instance-theia.cfg.jinja2.in
0 → 100644
View file @
88fa3070
This diff is collapsed.
Click to expand it.
software/theia/instance.cfg.in
View file @
88fa3070
This diff is collapsed.
Click to expand it.
software/theia/software.cfg
View file @
88fa3070
...
@@ -15,6 +15,7 @@ extends =
...
@@ -15,6 +15,7 @@ extends =
../../component/fonts/buildout.cfg
../../component/fonts/buildout.cfg
../../stack/slapos.cfg
../../stack/slapos.cfg
../../stack/monitor/buildout.cfg
../../stack/monitor/buildout.cfg
../../stack/resilient/buildout.cfg
../../component/defaults.cfg
../../component/defaults.cfg
./download-plugins.cfg
./download-plugins.cfg
./buildout.hash.cfg
./buildout.hash.cfg
...
@@ -22,7 +23,14 @@ extends =
...
@@ -22,7 +23,14 @@ extends =
parts =
parts =
theia-wrapper
theia-wrapper
slapos-cookbook
slapos-cookbook
instance
instance-theia.cfg.jinja2.in
instance-theia-import.cfg.in
instance-theia-export.cfg.in
instance-theia-resilient.cfg.jinja2
instance.cfg
# XXX: we have to manually add this for resilience
rdiff-backup
# pbs-recipe-egg
# default for slapos-standalone
# default for slapos-standalone
shared-part-list =
shared-part-list =
...
@@ -157,6 +165,15 @@ url = ${:_profile_base_location_}/${:filename}
...
@@ -157,6 +165,15 @@ url = ${:_profile_base_location_}/${:filename}
output = ${buildout:parts-directory}/${:_buildout_section_name_}
output = ${buildout:parts-directory}/${:_buildout_section_name_}
mode = 0644
mode = 0644
[download-base]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
destination = ${buildout:directory}
download-only = true
ignore-existing = true
output = ${:destination}/${:filename}
mode = 0644
[python-language-server]
[python-language-server]
version = 0.19.0
version = 0.19.0
recipe = plone.recipe.command
recipe = plone.recipe.command
...
@@ -326,6 +343,19 @@ template =
...
@@ -326,6 +343,19 @@ template =
exec ${yarn:location}/bin/yarn theia start $@
exec ${yarn:location}/bin/yarn theia start $@
[instance]
[instance
.cfg
]
<= template-base
<= template-base
output = ${buildout:directory}/instance.cfg
output = ${buildout:directory}/instance.cfg
[instance-theia.cfg.jinja2.in]
<= template-base
output = ${buildout:directory}/instance-theia.cfg.jinja2
[instance-theia-import.cfg.in]
<= download-base
[instance-theia-export.cfg.in]
<= download-base
[instance-theia-resilient.cfg.jinja2]
<= download-base
stack/resilient/README.rst
View file @
88fa3070
...
@@ -253,3 +253,21 @@ We can find 2 kinds of magic keys:
...
@@ -253,3 +253,21 @@ We can find 2 kinds of magic keys:
* id : example, in "-sla-2-foo" 2 is the magic key and the parameter will be used for each request with id 2 (in case of kvm: kvm2 and PBS 2)
* id : example, in "-sla-2-foo" 2 is the magic key and the parameter will be used for each request with id 2 (in case of kvm: kvm2 and PBS 2)
* nameid : example, in "-sla-kvm2-foo", foo will be used for kvm2 request. Name for pbs is "pbs" -> "-sla-pbs2-foo".
* nameid : example, in "-sla-kvm2-foo", foo will be used for kvm2 request. Name for pbs is "pbs" -> "-sla-pbs2-foo".
IMPORTANT NOTE: in case the same foo parameter is asked for the group, the nameid key prevail
IMPORTANT NOTE: in case the same foo parameter is asked for the group, the nameid key prevail
Documentation Edits
-------------------
- slap-parameter required by import and export
- export / import template names have changed: template-pbsready-import / template-pbsready-export
- slap-configuration required by switch_softwareype
- resilient jinja required importing parts and replicate
- resilient jinja template requires ext.do
- exporter:wrapper and importer:wrapper required by resilient stack (path of wrapper)
- rdiff-backup
- pbs-recipe-egg ??
Changes
-------
- template-replicated.cfg.in: Add optional leaderReturn option ??? => need to access the parameter after anyway so no
\ No newline at end of file
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