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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Gwenaël Samain
slapos
Commits
bcf34071
Commit
bcf34071
authored
Oct 21, 2013
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slaprunner: isn't started by the development server anymore
but thanks to Gunicorn, as a wsgi software
parent
645b8b55
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
46 additions
and
34 deletions
+46
-34
software/slaprunner/common.cfg
software/slaprunner/common.cfg
+5
-8
software/slaprunner/instance-runner.cfg
software/slaprunner/instance-runner.cfg
+26
-10
software/slaprunner/nginx_conf.in
software/slaprunner/nginx_conf.in
+12
-16
software/slaprunner/software.cfg
software/slaprunner/software.cfg
+3
-0
No files found.
software/slaprunner/common.cfg
View file @
bcf34071
...
...
@@ -92,7 +92,7 @@ mode = 0644
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner.cfg
output = ${buildout:directory}/template-runner.cfg
#md5sum = 1355283f0e79a890aeb687cedd8220ee
md5sum = 8054f653b00c1fdd50e70b23c5a861a7
mode = 0644
[instance-runner-import]
...
...
@@ -128,7 +128,7 @@ mode = 0644
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/nginx_conf.in
download-only = true
#md5sum = 09b7677dfc6b23c1f58e67fd06a7625e
md5sum = df4cf59f160b429a1eee43eea9e6aff8
filename = nginx_conf.in
mode = 0644
...
...
@@ -143,7 +143,7 @@ location = ${buildout:parts-directory}/${:_buildout_section_name_}
[slapos-cfg-template]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/${:filename}
#md5sum = 28ceadbeaa3b687f7ba39d87cd6772f3
md5sum = fa0f89e2b68d829452edcaebde9f785d
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = slapos.cfg.in
download-only = true
...
...
@@ -165,7 +165,8 @@ eggs =
slapos.core
xml_marshaller
pytz
<<<<<<< HEAD
collective.recipe.environment
Gunicorn
# Add slapos.libnetworkcache to path of slapos.core so that slaprunner can build SRs using cache
[slapos-cookbook]
...
...
@@ -183,7 +184,3 @@ eggs =
xml_marshaller
pytz
slapos.libnetworkcache
=======
collective.recipe.environment
>>>>>>> 3bf4e1a... slaprunner : is now deployed by buildout
software/slaprunner/instance-runner.cfg
View file @
bcf34071
...
...
@@ -7,6 +7,8 @@ parts =
ca-nginx
ca-node-frontend
ca-shellinabox
gunicorn-launcher
gunicorn-graceful
test-runner
sshkeys-dropbear-runner
dropbear-server-add-authorized-key
...
...
@@ -25,7 +27,6 @@ parts =
shellinabox
environ
slapos-cfg
slaprunner-wrapper
slapos-repo-config
prepare-software
...
...
@@ -33,7 +34,6 @@ eggs-directory = ${buildout:eggs-directory}
develop-eggs-directory = ${buildout:develop-eggs-directory}
offline = true
# Create all needed directories
[directory]
recipe = slapos.cookbook:mkdirectory
...
...
@@ -248,6 +248,7 @@ context =
key shellinabox_port shellinabox:port
section param_nginx_frontend nginx-frontend
section param_tempdir tempdirectory
key socket gunicorn-frontend:socket
[nginx-launcher]
recipe = slapos.recipe.template:jinja2
...
...
@@ -257,6 +258,29 @@ mode = 700
context =
section param_nginx_frontend nginx-frontend
#--------------------
#--
#-- WSGI
[gunicorn-frontend]
bin_gunicorn = $${directory:bin}/gunicorn
bin_launcher = $${directory:services}/gunicorn
path_shell = ${dash:location}/bin/dash
socket = $${directory:tmp}/flaskserver.sock
path_pid = $${directory:run}/gunicorn.pid
[gunicorn-launcher]
recipe = slapos.cookbook:wrapper
command-line = $${gunicorn-frontend:bin_gunicorn} slapos.runner:app -p $${gunicorn-frontend:path_pid} -b unix:$${gunicorn-frontend:socket} -e RUNNER_CONFIG=$${slaprunner:slapos.cfg} --preload
wrapper-path = $${gunicorn-frontend:bin_launcher}
environment = PATH=$${environ:PATH}
RUNNER_CONFIG=$${slaprunner:slapos.cfg}
[gunicorn-graceful]
recipe = slapos.cookbook:wrapper
command-line = $${directory:bin}/killpidfromfile $${gunicorn-frontend:path_pid} SIGHUP
wrapper-path = $${directory:scripts}/gunicorn-graceful
#--------------------
#--
#-- ssl certificates
...
...
@@ -480,14 +504,6 @@ path =
[environ]
recipe = collective.recipe.environment
[slaprunner-wrapper]
recipe = slapos.cookbook:wrapper
command-line = $${slaprunner:slaprunner} $${slaprunner:slapos.cfg} --log_file $${:log-file}
log-file = $${slaprunner:log_dir}/slaprunner.log
wrapper-path = $${slaprunner:wrapper}
environment = PATH=$${slaprunner:git-binary}:$${environ:PATH}
GIT_SSH=$${slaprunner:ssh_client}
[slapos-repo]
recipe = slapos.recipe.build:gitclone
repository = $${slap-parameter:slapos-repository}
...
...
software/slaprunner/nginx_conf.in
View file @
bcf34071
...
...
@@ -57,28 +57,24 @@ http {
scgi_temp_path {{ param_tempdir['scgi_temp_path'] }};
error_page 401 /login;
location / {
proxy_pass http://{{ param_nginx_frontend['runner-ip'] }}:{{ param_nginx_frontend['runner-port'] }};
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
auth_basic "Restricted";
auth_basic_user_file {{ param_nginx_frontend['etc_dir'] }}/.htpasswd;
proxy_redirect off;
proxy_
buffering off
;
proxy_set_header
Host $host
;
proxy_set_header
X-Real-IP $remote_addr
;
proxy_set_header
X-Forwarded-Proto $scheme
;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_
set_header X-Forwarded-Host $http_host
;
proxy_
set_header X-Forwarded-Proto $scheme
;
proxy_set_header
X-Forwarded-For $proxy_add_x_forwarded_for
;
proxy_set_header
X-Forwarded-Host $http_host
;
proxy_set_header
X-Accel-Mapping /private/
;
proxy_
pass http://unix:{{ socket }}
;
}
location ~ ^(/login|/doLogin|/static|/setAccount|/configAccount|/slapgridResult) {
proxy_pass http://{{ param_nginx_frontend['runner-ip'] }}:{{ param_nginx_frontend['runner-port'] }};
proxy_next_upstream error timeout invalid_header http_500 http_502 http_503 http_504;
proxy_redirect off;
proxy_
buffering off
;
proxy_set_header
Host $host
;
proxy_set_header
X-Real-IP $remote_addr
;
proxy_set_header
X-Forwarded-Proto $scheme
;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_
set_header X-Forwarded-Host $http_host
;
proxy_
set_header X-Forwarded-Proto $scheme
;
proxy_set_header
X-Forwarded-For $proxy_add_x_forwarded_for
;
proxy_set_header
X-Forwarded-Host $http_host
;
proxy_set_header
X-Accel-Mapping /private/
;
proxy_
pass http://unix:{{ socket }}
;
}
location /shellinabox {
proxy_pass http://[::1]:{{ shellinabox_port }}/;
...
...
software/slaprunner/software.cfg
View file @
bcf34071
...
...
@@ -135,3 +135,6 @@ unittest2 = 0.5.1
# Required by:
# slapos.core==0.34
zope.interface = 4.0.3
# WSGI server
gunicorn = 18.0
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