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
Ivan Tyagov
slapos
Commits
a5097012
Commit
a5097012
authored
Aug 21, 2012
by
Thomas Lechauve
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rewrite html5as software release using jinja2
parent
97bfc5c9
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
97 additions
and
24 deletions
+97
-24
software/html5as/instance.cfg
software/html5as/instance.cfg
+0
-2
software/html5as/instance_html5as.cfg
software/html5as/instance_html5as.cfg
+47
-14
software/html5as/software.cfg
software/html5as/software.cfg
+13
-8
software/html5as/templates/html5as_bin.in
software/html5as/templates/html5as_bin.in
+5
-0
software/html5as/templates/nginx_conf.in
software/html5as/templates/nginx_conf.in
+32
-0
No files found.
software/html5as/instance.cfg
View file @
a5097012
[buildout]
parts =
switch-softwaretype
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[switch-softwaretype]
recipe = slapos.cookbook:softwaretype
...
...
software/html5as/instance_html5as.cfg
View file @
a5097012
[buildout]
parts =
html5as
nginx_conf
html5as_bin
website_download
publish-connection-information
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
# partition tree
# /
# |- etc/
# | |- nginx.conf
# | |- run/
# | |-
nginx
(binary)
# | |-
html5as
(binary)
# |- var/
# | |- run/
# | | |- nginx.pid
...
...
@@ -19,9 +24,6 @@ parts =
# | |- html5as/ (doc root)
# | | |- index.html
# | |- backup/
eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
...
...
@@ -38,22 +40,53 @@ backup = $${rootdirectory:srv}/backup
data = $${rootdirectory:srv}/html5as
[html5as]
recipe = slapos.cookbook:html5a
s
# Option
s
nb_workers = 2
# Network
ip = $${slap-network-information:global-ipv6}
port = 8080
# Paths
# Log
path_pid = $${basedirectory:run}/nginx.pid
path_log = $${basedirectory:log}/nginx.log
path_access_log = $${basedirectory:log}/nginx.access.log
path_error_log = $${basedirectory:log}/nginx.error.log
root = $${basedirectory:data}
path_tmp = $${buildout:directory}/tmp
# Docroot
docroot = $${basedirectory:data}
default_index = $${basedirectory:data}/index.html
ip = $${slap-network-information:global-ipv6}
port = 8080
# Config files
path_nginx_conf = $${rootdirectory:etc}/nginx.conf
# Executables
bin_nginx = ${nginx:location}/sbin/nginx
bin_html5as = $${basedirectory:services}/html5as
# Utils
path_shell = ${dash:location}/bin/dash
nginx_path = ${nginx:location}/sbin/nginx
config_file = $${rootdirectory:etc}/nginx.conf
mime_path = $${rootdirectory:etc}/mime.types
path = $${basedirectory:services}/nginx
tmp = $${buildout:directory}/tmp
[website_download]
recipe = hexagonit.recipe.download
# Website tarball
# Hardcoded to easily test
url = http://sheldy.com/~tom/WTF/slapos.tar.gz
destination = $${html5as:docroot}
[nginx_conf]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/templates/nginx_conf.in
rendered = $${html5as:path_nginx_conf}
md5sum = bbca1642a9ef1b189aba2a7724592665
context = section param_html5as html5as
[html5as_bin]
recipe = slapos.recipe.template:jinja2
template = ${:_profile_base_location_}/templates/html5as_bin.in
rendered = $${html5as:bin_html5as}
md5sum = 0ddb3dfbd963819a1666ca47aa37bbc5
context = section param_html5as html5as
umask = 077
[publish-connection-information]
recipe = slapos.cookbook:publish
...
...
software/html5as/software.cfg
View file @
a5097012
...
...
@@ -7,34 +7,39 @@ extends =
../../component/nginx/buildout.cfg
../../component/dash/buildout.cfg
develop = /opt/slapdev
allow-hosts =
*.nexedi.org
*.python.org
*.sourceforge.net
www.slapos.org
launchpad.net
github.com
alastairs-place.net
www.alittletooquiet.net
parts =
template
dash
nginx
eggs
instance_html5as
[html5as]
template
instance_html5as
[eggs]
recipe = z3c.recipe.scripts
eggs = slapos.cookbook
[template]
# Default template for the instance.
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
#md5sum = 196670999d6b015f48483d2ae6f15fbd
md5sum = 1910981522ff0b3202530733b5e5129e
mode = 0644
[instance_html5as]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance_html5as.cfg
output = ${buildout:directory}/template_html5as.cfg
#md5sum = 4e0a5c24ded8f0e9afa78c2f37377278
md5sum = c0088d6f69e38d512ca85129988b85d6
mode = 0644
[versions]
...
...
software/html5as/templates/html5as_bin.in
0 → 100644
View file @
a5097012
#! {{ param_html5as['path_shell'] }}
# BEWARE: This file is operated by slapgrid
# BEWARE: It will be overwritten automatically
exec {{ param_html5as['bin_nginx'] }} -c {{ param_html5as['path_nginx_conf'] }}
software/html5as/templates/nginx_conf.in
0 → 100644
View file @
a5097012
worker_processes {{ param_html5as['nb_workers'] }};
user nouser nogroup;
pid {{ param_html5as['path_pid'] }};
error_log {{ param_html5as['path_error_log'] }};
events {
worker_connections 1024;
accept_mutex off;
}
http {
#include mime.types;
default_type application/octet-stream;
access_log {{ param_html5as['path_access_log'] }} combined;
index index.html;
server {
listen [{{ param_html5as['ip'] }}]:{{ param_html5as['port'] }};
server_name _;
keepalive_timeout 5;
client_body_temp_path {{ param_html5as['path_tmp'] }}/client_body_temp;
proxy_temp_path {{ param_html5as['path_tmp'] }}/proxy_temp;
fastcgi_temp_path {{ param_html5as['path_tmp'] }}/fastcgi_temp;
uwsgi_temp_path {{ param_html5as['path_tmp'] }}/uwsgi_temp;
scgi_temp_path {{ param_html5as['path_tmp'] }}/scgi_temp;
# path for static files
root {{ param_html5as['docroot'] }};
}
}
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