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
Nirina Malard
slapos
Commits
496643ba
Commit
496643ba
authored
Aug 23, 2023
by
Nirina Malard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/html5as-base: add simple replicate
parent
9c00a0b9
Changes
4
Hide 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 @
496643ba
...
...
@@ -18,7 +18,7 @@
[template-cfg]
filename = instance.cfg.in
md5sum =
c5197be13b0986a12c31bf670e887f27
md5sum =
0f030af59547866bbebff22f4b29cef3
[instance_html5as]
_update_hash_filename_ = instance_html5as.cfg.in
...
...
@@ -43,3 +43,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 @
496643ba
...
...
@@ -39,10 +39,34 @@ default-parameters =
"monitor-httpd-port": 8197
}
[instance-replicate]
recipe = slapos.recipe.template:jinja2
url = {{ template_instance_replicate }}
output = ${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:output
replicate = instance-replicate:output
[slap-configuration]
recipe = slapos.cookbook:slapconfiguration
...
...
software/html5as-base/instance_replicate.cfg.in
0 → 100644
View file @
496643ba
{% 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 @
496643ba
...
...
@@ -43,6 +43,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:output
[download-base]
...
...
@@ -68,6 +69,9 @@ url = ${:_profile_base_location_}/${:_update_hash_filename_}
[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