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
Levin Zimmermann
slapos
Commits
bf56808b
Commit
bf56808b
authored
Apr 01, 2022
by
Thomas Gambier
🚴🏼
Committed by
Xavier Thompson
Jul 04, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/theia: give ipv6 range to standalone
parent
12b0e7d0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
20 deletions
+21
-20
software/theia/buildout.hash.cfg
software/theia/buildout.hash.cfg
+3
-3
software/theia/instance-theia.cfg.jinja.in
software/theia/instance-theia.cfg.jinja.in
+5
-5
software/theia/instance.cfg.in
software/theia/instance.cfg.in
+2
-1
software/theia/slapos_standalone_script.py.jinja
software/theia/slapos_standalone_script.py.jinja
+11
-11
No files found.
software/theia/buildout.hash.cfg
View file @
bf56808b
...
@@ -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 =
a9d4ace568acdd5002d587816ab91737
md5sum =
d8fa4bed6b7d7c77b0aec53abae32426
[instance]
[instance]
_update_hash_filename_ = instance.cfg.in
_update_hash_filename_ = instance.cfg.in
md5sum =
08b8aa2b7f59ac0e4e5d4ca18005493
7
md5sum =
f322033a7670b9be29b1bf1bf9024b8
7
[instance-import]
[instance-import]
_update_hash_filename_ = instance-import.cfg.jinja.in
_update_hash_filename_ = instance-import.cfg.jinja.in
...
@@ -35,7 +35,7 @@ md5sum = ad9499e7355ded4975ad313442cecb7a
...
@@ -35,7 +35,7 @@ md5sum = ad9499e7355ded4975ad313442cecb7a
[slapos-standalone-script]
[slapos-standalone-script]
_update_hash_filename_ = slapos_standalone_script.py.jinja
_update_hash_filename_ = slapos_standalone_script.py.jinja
md5sum =
6792d29057db35ea69b01e72a5c913e3
md5sum =
93c492cc5c186989f104f37de43f25c5
[theia-common]
[theia-common]
_update_hash_filename_ = theia_common.py
_update_hash_filename_ = theia_common.py
...
...
software/theia/instance-theia.cfg.jinja.in
View file @
bf56808b
...
@@ -38,7 +38,7 @@ additional-url = $${remote-additional-frontend:connection-secure_access}
...
@@ -38,7 +38,7 @@ additional-url = $${remote-additional-frontend:connection-secure_access}
username = $${frontend-instance-password:username}
username = $${frontend-instance-password:username}
password = $${frontend-instance-password:passwd}
password = $${frontend-instance-password:passwd}
backend-url = $${frontend-instance:url}
backend-url = $${frontend-instance:url}
ipv6 = {{ ipv6_
random
}}
ipv6 = {{ ipv6_
theia
}}
[directory]
[directory]
recipe = slapos.cookbook:mkdirectory
recipe = slapos.cookbook:mkdirectory
...
@@ -227,7 +227,7 @@ storage-path = $${buildout:parts-directory}/.$${:_buildout_section_name_}
...
@@ -227,7 +227,7 @@ storage-path = $${buildout:parts-directory}/.$${:_buildout_section_name_}
recipe = slapos.cookbook:free_port
recipe = slapos.cookbook:free_port
minimum = 3000
minimum = 3000
maximum = 3100
maximum = 3100
ip = {{ ipv6_
random
}}
ip = {{ ipv6_
theia
}}
[frontend-instance-certificate]
[frontend-instance-certificate]
recipe = plone.recipe.command
recipe = plone.recipe.command
...
@@ -421,7 +421,7 @@ inline =
...
@@ -421,7 +421,7 @@ inline =
#!/bin/sh
#!/bin/sh
export HOME=$${directory:home}
export HOME=$${directory:home}
export PATH=${cli-utilities:PATH}:$HOME/.cargo/bin:$HOME/.local/bin:$PATH
export PATH=${cli-utilities:PATH}:$HOME/.cargo/bin:$HOME/.local/bin:$PATH
export IPV6_SLAPRUNNER={{ ipv6_
random
}}
export IPV6_SLAPRUNNER={{ ipv6_
theia
}}
# Theia Backend
# Theia Backend
# -------------
# -------------
...
@@ -566,7 +566,7 @@ ip = {{ ipv4_random }}
...
@@ -566,7 +566,7 @@ ip = {{ ipv4_random }}
[slapos-standalone-config]
[slapos-standalone-config]
ipv4 = {{ ipv4_random }}
ipv4 = {{ ipv4_random }}
ipv6 = {{
ipv6_random
}}
ipv6 = {{
slap_resource.get('ipv6-range-network') or ipv6_theia
}}
port = $${slapos-standalone-port:port}
port = $${slapos-standalone-port:port}
base-directory = $${directory:runner}
base-directory = $${directory:runner}
software-root = $${directory:runner}/software
software-root = $${directory:runner}/software
...
@@ -603,7 +603,7 @@ context =
...
@@ -603,7 +603,7 @@ context =
key home_path directory:home
key home_path directory:home
key forward_frontend_requests :forward-frontend-requests
key forward_frontend_requests :forward-frontend-requests
section slap_connection slap-connection
section slap_connection slap-connection
section
slapos_standalone_
config slapos-standalone-config
section config slapos-standalone-config
forward-frontend-requests = {{ parameter_dict['forward-slapos-frontend-requests'] }}
forward-frontend-requests = {{ parameter_dict['forward-slapos-frontend-requests'] }}
url = ${slapos-standalone-script:output}
url = ${slapos-standalone-script:output}
...
...
software/theia/instance.cfg.in
View file @
bf56808b
...
@@ -37,8 +37,9 @@ context =
...
@@ -37,8 +37,9 @@ context =
key parameter_dict slap-configuration:configuration
key parameter_dict slap-configuration:configuration
key root_title slap-configuration:root-instance-title
key root_title slap-configuration:root-instance-title
key partition_root_path buildout:directory
key partition_root_path buildout:directory
key ipv6_
random
slap-configuration:ipv6-random
key ipv6_
theia
slap-configuration:ipv6-random
key ipv4_random slap-configuration:ipv4-random
key ipv4_random slap-configuration:ipv4-random
section slap_resource slap-configuration
import os os
import os os
import json json
import json json
default-parameters =
default-parameters =
...
...
software/theia/slapos_standalone_script.py.jinja
View file @
bf56808b
...
@@ -70,23 +70,23 @@ def setupStandalone():
...
@@ -70,23 +70,23 @@ def setupStandalone():
shared_parts = {{ repr(shared_part_list) }}
shared_parts = {{ repr(shared_part_list) }}
shared_part_list = [x.strip() for x in shared_parts.splitlines() if x.strip()]
shared_part_list = [x.strip() for x in shared_parts.splitlines() if x.strip()]
standalone = slapos.slap.standalone.StandaloneSlapOS(
standalone = slapos.slap.standalone.StandaloneSlapOS(
{{ repr(
slapos_standalone_
config['base-directory']) }},
{{ repr(config['base-directory']) }},
{{ repr(
slapos_standalone_
config['ipv4']) }},
{{ repr(config['ipv4']) }},
{{
slapos_standalone_
config['port'] }},
{{ config['port'] }},
computer_id={{ repr(
slapos_standalone_
config['computer-id']) }},
computer_id={{ repr(config['computer-id']) }},
shared_part_list=shared_part_list,
shared_part_list=shared_part_list,
software_root={{ repr(
slapos_standalone_
config['software-root']) }},
software_root={{ repr(config['software-root']) }},
instance_root={{ repr(
slapos_standalone_
config['instance-root']) }},
instance_root={{ repr(config['instance-root']) }},
partition_forward_configuration=partition_forward_configuration,
partition_forward_configuration=partition_forward_configuration,
slapos_bin={{ repr(
slapos_standalone_
config['slapos-bin']) }},
slapos_bin={{ repr(config['slapos-bin']) }},
local_software_release_root={{ repr(
slapos_standalone_
config['local-software-release-root']) }},
local_software_release_root={{ repr(config['local-software-release-root']) }},
)
)
standalone.start()
standalone.start()
try:
try:
partition_count = 20
partition_count = 20
logging.info("Standalone SlapOS: Formatting %d partitions", partition_count)
logging.info("Standalone SlapOS: Formatting %d partitions", partition_count)
standalone.format(partition_count, {{ repr(
slapos_standalone_config['ipv4']) }}, {{ repr(slapos_standalone_
config['ipv6']) }})
standalone.format(partition_count, {{ repr(
config['ipv4']) }}, {{ repr(
config['ipv6']) }})
logging.info("Standalone SlapOS for computer `%s` started", {{ repr(
slapos_standalone_
config['computer-id']) }})
logging.info("Standalone SlapOS for computer `%s` started", {{ repr(config['computer-id']) }})
# Run instance at least once, to start the supervisor managing instances.
# Run instance at least once, to start the supervisor managing instances.
try:
try:
standalone.waitForInstance(max_retry=0)
standalone.waitForInstance(max_retry=0)
...
@@ -179,7 +179,7 @@ def main():
...
@@ -179,7 +179,7 @@ def main():
s = socket.socket(socket.AF_UNIX)
s = socket.socket(socket.AF_UNIX)
s.bind({{ repr('\0' +
slapos_standalone_
config['abstract-socket-path']) }})
s.bind({{ repr('\0' + config['abstract-socket-path']) }})
s.listen(5)
s.listen(5)
logging.info("Standalone SlapOS ready")
logging.info("Standalone SlapOS ready")
...
...
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