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
Eric Zheng
slapos
Commits
3afea6b3
Commit
3afea6b3
authored
Jul 19, 2021
by
Eric Zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
software/headless-chromium: add frontend monitoring promise
parent
c7c594e6
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
41 additions
and
3 deletions
+41
-3
software/headless-chromium/buildout.hash.cfg
software/headless-chromium/buildout.hash.cfg
+2
-2
software/headless-chromium/instance-headless-chromium.cfg.in
software/headless-chromium/instance-headless-chromium.cfg.in
+36
-1
software/headless-chromium/instance.cfg.in
software/headless-chromium/instance.cfg.in
+1
-0
software/headless-chromium/software.cfg
software/headless-chromium/software.cfg
+2
-0
No files found.
software/headless-chromium/buildout.hash.cfg
View file @
3afea6b3
[template-cfg]
filename = instance.cfg.in
md5sum =
cf56bcbabe4dfc8eed62d9687c06925f
md5sum =
aadc99d22fc3bcb38c852810370ceaac
[instance-headless-chromium]
_update_hash_filename_ = instance-headless-chromium.cfg.in
md5sum =
fec4df50959e9c8c6cd25f5e4e905b63
md5sum =
5e7f9536c2ca28435dccb1fd0bff5bc9
[template-nginx-conf]
_update_hash_filename_ = templates/nginx.conf.in
...
...
software/headless-chromium/instance-headless-chromium.cfg.in
View file @
3afea6b3
...
...
@@ -7,6 +7,7 @@ parts =
nginx-config
nginx-launcher
publish-connection-information
frontend-promise
eggs-directory = {{ buildout['eggs-directory'] }}
develop-eggs-directory = {{ buildout['develop-eggs-directory'] }}
...
...
@@ -45,7 +46,7 @@ nginx-cert-file = ${frontend-instance-certificate:cert-file}
# TODO: change --remote-debugging-address to actual IP address?
[chromium-launcher]
recipe = slapos.cookbook:wrapper
command-line =
{{ parameter_list['chromium-wrapper'] }} --remote-debugging-address=${headless-chromium:ipv4} --remote-debugging-port=${headless-chromium:remote-debugging-port} --no-sandbox ${headless-chromium:url}
command-line = {{ parameter_list['chromium-wrapper'] }} --remote-debugging-address=${headless-chromium:ipv4} --remote-debugging-port=${headless-chromium:remote-debugging-port} --no-sandbox ${headless-chromium:url}
wrapper-path = ${directory:service}/chromium
environment =
FONTCONFIG_FILE=${font-config:rendered}
...
...
@@ -119,6 +120,7 @@ environment =
[publish-connection-information]
recipe = slapos.cookbook:publish
<= monitor-publish
remote-debug-url = http://${headless-chromium:remote-debugging-address}
proxy-url = https://${headless-chromium:proxy-address}
frontend-url = ${remote-debugging-frontend:connection-secure_access}
...
...
@@ -137,3 +139,36 @@ config-https-only = true
config-type = websocket
config-websocket-path-list = /devtools
return = domain secure_access
# Old-style promise to make sure that the CDN is properly configured.
[frontend-promise]
<= monitor-promise-base
module = check_url_available
name = headless-chromium-frontend.py
config-url = ${remote-debugging-frontend:connection-secure_access}
config-check-secure = 1
# The following is the new-style promise, for when
# https://lab.nexedi.com/nexedi/slapos.toolbox/merge_requests/98 gets
# merged.
# Promise to make sure the remote debugging frontend returns 200 when
# queried with the correct credentials.
# [frontend-200-promise]
# <= monitor-promise-base
# module = check_url_available
# name = headless-chromium-frontend-ok.py
# url = ${remote-debugging-frontend:connection-secure_access}
# config-url = ${:url}
# config-username = ${frontend-instance-password:username}
# config-password = ${frontend-instance-password:passwd}
# Promise to make sure that the remote debugging frontend returns 401
# when queried with no credentials.
# [frontend-401-promise]
# <= monitor-promise-base
# module = check_url_available
# name = headless-chromium-frontend-secure.py
# url = ${remote-debugging-frontend:connection-secure_access}
# config-url = ${:url}
# config-http-code = 401
software/headless-chromium/instance.cfg.in
View file @
3afea6b3
...
...
@@ -14,6 +14,7 @@ fontconfig-location = {{ fontconfig_location }}
chromium-wrapper = {{ chromium_wrapper }}
template-nginx-config = {{ template_nginx_config_target }}
template-fonts-conf = {{ template_fonts_conf_target }}
template-monitor = {{ template_monitor }}
[instance-headless-chromium]
recipe = slapos.recipe.template:jinja2
...
...
software/headless-chromium/software.cfg
View file @
3afea6b3
...
...
@@ -2,6 +2,7 @@
extends =
buildout.hash.cfg
../../stack/slapos.cfg
../../stack/monitor/buildout.cfg
# TODO: remove "test" once everything is ready
../../component/headless-chromium-test/buildout.cfg
../../component/openssl/buildout.cfg
...
...
@@ -28,6 +29,7 @@ context =
key template_nginx_config_target template-nginx-conf:target
key template_fonts_conf_target template-fonts-conf:output
key template_instance_headless_chromium_target instance-headless-chromium:target
key template_monitor monitor2-template:rendered
[download-base]
recipe = slapos.recipe.build:download
...
...
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