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
Steven Gueguen
slapos
Commits
cc6f1a4b
Commit
cc6f1a4b
authored
Jun 24, 2021
by
Lisa Casino
Committed by
Xavier Thompson
Oct 22, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/html5as-base: add simple replicate
parent
bee5f95e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
90 additions
and
1 deletion
+90
-1
software/html5as-base/buildout.hash.cfg
software/html5as-base/buildout.hash.cfg
+5
-1
software/html5as-base/instance.cfg.in
software/html5as-base/instance.cfg.in
+24
-0
software/html5as-base/instance_replicate.cfg.in
software/html5as-base/instance_replicate.cfg.in
+57
-0
software/html5as-base/software.cfg
software/html5as-base/software.cfg
+4
-0
No files found.
software/html5as-base/buildout.hash.cfg
View file @
cc6f1a4b
...
...
@@ -17,7 +17,7 @@
[template-cfg]
filename = instance.cfg.in
md5sum =
d52a24adf6a4cb1c514b657c63ebf7a5
md5sum =
1d2d49bcd32002703b470a2af048fa6c
[instance_html5as]
_update_hash_filename_ = instance_html5as.cfg.in
...
...
@@ -42,3 +42,7 @@ md5sum = d57cb01df5941e139b02a2f7bdabcdc8
[template_graceful]
_update_hash_filename_ = templates/graceful.in
md5sum = 1c0ee16966e1fcdb3fd11c09f12ee2b2
[template_instance_replicate]
_update_hash_filename_ = instance_replicate.cfg.in
md5sum = 01fc8287b5429d21906a649d1163a51f
software/html5as-base/instance.cfg.in
View file @
cc6f1a4b
...
...
@@ -39,10 +39,34 @@ default-parameters =
"monitor-httpd-port": 8197
}
[instance-replicate]
recipe = slapos.recipe.template:jinja2
template = {{ template_instance_replicate }}
rendered = ${buildout:directory}/${:filename}
filename = instance-replicate-html5as.cfg
context =
section buildout buildout
section parameter_list profile-common
key slapparameter_dict slap-configuration:configuration
jsonkey default_parameter_dict :default-parameters
# User can specify parameter for any of the two instances
default-parameters =
{
"title": "",
"title1": "",
"title2": "",
"download_url": "",
"port1": 8081,
"port2": 8082,
"monitor-httpd-port1": 8197,
"monitor-httpd-port2": 8198
}
[switch-softwaretype]
recipe = slapos.cookbook:switch-softwaretype
RootSoftwareInstance = ${:default}
default = instance-html5as:rendered
replicate = instance-replicate:rendered
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
...
...
software/html5as-base/instance_replicate.cfg.in
0 → 100644
View file @
cc6f1a4b
{% set parameter_dict = dict(default_parameter_dict, **slapparameter_dict) %}
# Standard buildout section
[buildout]
parts =
publish-connection-information
eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
offline = true
################################
# Sections to Request instances
################################
# Macro section sharing request parameters
[instance-request-base]
<= slap-connection
recipe = slapos.cookbook:request
# It is the same software as the current one
software-url = ${slap-connection:software-release-url}
# We want the default behaviour
software-type = default
# What parameter are neede to be retrieved
return = server_url server-cdn-url monitor-setup-url
# Provided parameters
config-title = {{ parameter_dict['title'] }}
config-download_url = {{ parameter_dict['download_url'] }}
# Request a normal html5as instance
[instance-1]
<= instance-request-base
# Name of the instance
name = instance-html5as-1
# Port and title can be configured by instance
config-port = {{ parameter_dict['port1'] }}
config-title = {{ parameter_dict['title1'] }}
config-monitor-httpd-port = {{ parameter_dict['monitor-httpd-port1'] }}
# Request a second html5as instance
[instance-2]
<= instance-request-base
# Name of the instance
name = instance-html5as-2
config-port = {{ parameter_dict['port2'] }}
config-title = {{ parameter_dict['title2'] }}
config-monitor-httpd-port = {{ parameter_dict['monitor-httpd-port2'] }}
# Publish information to connect to the two instances
[publish-connection-information]
recipe = slapos.cookbook:publish
instance-1-server_url = ${instance-1:connection-server_url}
instance-1-server-cdn-url = ${instance-1:connection-server-cdn-url}
instance-1-server-monitor-setup-url = ${instance-1:connection-monitor-setup-url}
instance-2-server_url = ${instance-2:connection-server_url}
instance-2-server-cdn-url = ${instance-1:connection-server-cdn-url}
instance-2-server-monitor-setup-url = ${instance-1:connection-monitor-setup-url}
software/html5as-base/software.cfg
View file @
cc6f1a4b
...
...
@@ -46,6 +46,7 @@ context =
key template_instance_html5as_target instance_html5as:target
key template_index_html_target template_index_html:target
key template_graceful_target template_graceful:target
key template_instance_replicate template_instance_replicate:target
key template_monitor monitor2-template:rendered
[download-base]
...
...
@@ -73,6 +74,9 @@ mode = 0644
[template_graceful]
<= download-base
[template_instance_replicate]
<= download-base
[extra-eggs]
recipe = zc.recipe.egg
eggs =
...
...
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