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
Thomas Leymonerie
slapos
Commits
e6668258
Commit
e6668258
authored
Jul 16, 2021
by
Lisa Casino
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
html5as: update with the new recipe
parent
d96b6895
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11 additions
and
15 deletions
+11
-15
software/html5as/buildout.hash.cfg
software/html5as/buildout.hash.cfg
+2
-2
software/html5as/instance.cfg.in
software/html5as/instance.cfg.in
+1
-2
software/html5as/instance_html5as.cfg.in
software/html5as/instance_html5as.cfg.in
+8
-7
software/html5as/software.cfg
software/html5as/software.cfg
+0
-4
No files found.
software/html5as/buildout.hash.cfg
View file @
e6668258
...
...
@@ -17,11 +17,11 @@
[template-cfg]
filename = instance.cfg.in
md5sum =
8528c7b469caa8bdede682e6660ba702
md5sum =
9e486efe4ab1aba8cb72b04f6c6da8ad
[instance_html5as]
_update_hash_filename_ = instance_html5as.cfg.in
md5sum =
d1efe7a42d66c416ddf8d24d8a8107f4
md5sum =
191ec2a8b967a3944971709365bdcd2d
[template_nginx_conf]
_update_hash_filename_ = templates/nginx_conf.in
...
...
software/html5as/instance.cfg.in
View file @
e6668258
...
...
@@ -9,8 +9,6 @@ offline = true
[profile-common]
nginx_location = {{ nginx_location }}
dash_location = {{ dash_location }}
tar_location = {{ tar_location }}
curl_location = {{ curl_location }}
template_nginx_conf = {{ template_nginx_conf_target }}
template_mime_types = {{ template_mime_types_target }}
template_launcher = {{ template_launcher_target }}
...
...
@@ -28,6 +26,7 @@ context =
section parameter_list profile-common
# partition_ipv6 is the random ipv6 allocated to the local partition
key partition_ipv6 slap-configuration:ipv6-random
# slapparameter_dict: dictionary of all parameters
key slapparameter_dict slap-configuration:configuration
jsonkey default_parameter_dict :default-parameters
default-parameters =
...
...
software/html5as/instance_html5as.cfg.in
View file @
e6668258
...
...
@@ -3,6 +3,8 @@
# Deploy html5as instance
#
#############################
# parameter_dict: a dictionary with the default parameters from instance.cfg.in
# replaces the values with the parameters of the instance request if there are any
{% set parameter_dict = dict(default_parameter_dict, **slapparameter_dict) %}
[buildout]
...
...
@@ -95,8 +97,6 @@ path_nginx_conf = ${directory:etc}/nginx.conf
path_mime_types = ${directory:etc}/mime_types
# Binaries
path_shell = {{ parameter_list['dash_location'] }}/bin/dash
curl-binary = {{ parameter_list['curl_location'] }}/bin/curl
tar-binary = {{ parameter_list['tar_location'] }}/bin/tar
# Executables
bin_launcher = ${basedirectory:service}/launcher
...
...
@@ -131,13 +131,14 @@ context =
# Command to put content in the docroot
[downloader]
recipe = slapos.recipe.build
# Path where the recipe stores any produced file,
# Path where the recipe stores any produced file,
# it will be automatically removed at the beginning of "install".
location = ${directory:srv}/html5as
# All the keys in this section will be available as a dict called "self.options"
# We add: or '', otherwise jinja2 will render a 'None' string
url = {{ parameter_dict['download_url'] or '' }}
default_index_html = ${default_index_html:rendered}
# If a tarball is passed as a parameter in
"download_url",
# If a tarball is passed as a parameter in
download url
# it's content will be served by the instance.
# If the parameter is not provided it fallback to the default template
install =
...
...
@@ -146,10 +147,10 @@ install =
try:
# Allow to do self.download() which can only be used in "online" mode
self.buildout['buildout']['offline'] = 'false'
if options['url']:
if
self.
options['url']:
# Use fonctions from the slapos.recipe.build repository
# Download a file from a URL to a temporary path
file = self.download(
options['url'], options.get('md5sum')
)
file = self.download(
self.options['url']
)
# Create a directory and extract the file that are compressed inside
extract_dir = self.extract(file)
# Return the right directory path
...
...
@@ -159,7 +160,7 @@ install =
else:
# Create directory and copy the default template inside
os.makedirs(location)
shutil.copy(options['default_index_html'], location)
shutil.copy(
self.
options['default_index_html'], location)
finally:
# reset the parameter
self.buildout['buildout']['offline'] = buildout_offline
...
...
software/html5as/software.cfg
View file @
e6668258
...
...
@@ -13,8 +13,6 @@ extends =
# In this example we extend needed components for html5as.
../../component/nginx/buildout.cfg
../../component/dash/buildout.cfg
../../component/tar/buildout.cfg
../../component/curl/buildout.cfg
parts =
# Call installation of slapos.cookbook egg defined in stack/slapos.cfg (needed
...
...
@@ -36,8 +34,6 @@ context =
section buildout buildout
key nginx_location nginx:location
key dash_location dash:location
key curl_location curl:location
key tar_location tar:location
key template_nginx_conf_target template_nginx_conf:target
key template_mime_types_target template_mime_types:target
key template_launcher_target template_launcher:target
...
...
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