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
Alain Takoudjou
slapos
Commits
1d3ee03a
Commit
1d3ee03a
authored
Aug 20, 2014
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slaprunner: deploys supervisord config file
Supervisord will replace Popen instructions
parent
b76d95c3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
95 additions
and
3 deletions
+95
-3
software/slaprunner/common.cfg
software/slaprunner/common.cfg
+12
-3
software/slaprunner/instance-runner-export.cfg.in
software/slaprunner/instance-runner-export.cfg.in
+1
-0
software/slaprunner/instance-runner-import.cfg.in
software/slaprunner/instance-runner-import.cfg.in
+1
-0
software/slaprunner/instance-runner.cfg
software/slaprunner/instance-runner.cfg
+38
-0
software/slaprunner/template/supervisord.conf.in
software/slaprunner/template/supervisord.conf.in
+43
-0
No files found.
software/slaprunner/common.cfg
View file @
1d3ee03a
...
@@ -44,7 +44,7 @@ mode = 0644
...
@@ -44,7 +44,7 @@ mode = 0644
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner.cfg
url = ${:_profile_base_location_}/instance-runner.cfg
output = ${buildout:directory}/template-runner.cfg.in
output = ${buildout:directory}/template-runner.cfg.in
md5sum =
b17d52da258a989af82ab97d4a096b66
md5sum =
0a74dc48fd5fae88b43be1e3ad844c9f
mode = 0644
mode = 0644
[template-runner-import-script]
[template-runner-import-script]
...
@@ -59,7 +59,7 @@ mode = 0644
...
@@ -59,7 +59,7 @@ mode = 0644
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner-import.cfg.in
url = ${:_profile_base_location_}/instance-runner-import.cfg.in
output = ${buildout:directory}/instance-runner-import.cfg
output = ${buildout:directory}/instance-runner-import.cfg
md5sum =
78105b34f9f1d884e291104a711e43f4
md5sum =
a85d054b3e2ae9243d8d188c897dc121
mode = 0644
mode = 0644
[template-runner-export-script]
[template-runner-export-script]
...
@@ -74,7 +74,7 @@ mode = 0644
...
@@ -74,7 +74,7 @@ mode = 0644
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-runner-export.cfg.in
url = ${:_profile_base_location_}/instance-runner-export.cfg.in
output = ${buildout:directory}/instance-runner-export.cfg
output = ${buildout:directory}/instance-runner-export.cfg
md5sum =
41180970d3ec6decdf946bdefc32a809
md5sum =
521bad4c571b5b2dc3eee6090802de95
mode = 0644
mode = 0644
[template-resilient]
[template-resilient]
...
@@ -143,6 +143,15 @@ filename = bash_profile.in
...
@@ -143,6 +143,15 @@ filename = bash_profile.in
download-only = true
download-only = true
mode = 0644
mode = 0644
[template-supervisord]
recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/${:filename}
md5sum = dbe7751c6276afd853de9239d3b509ba
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = supervisord.conf.in
download-only = true
mode = 0644
[eggs]
[eggs]
recipe = z3c.recipe.scripts
recipe = z3c.recipe.scripts
eggs =
eggs =
...
...
software/slaprunner/instance-runner-export.cfg.in
View file @
1d3ee03a
...
@@ -27,6 +27,7 @@ parts +=
...
@@ -27,6 +27,7 @@ parts +=
cron-entry-prepare-software
cron-entry-prepare-software
deploy-instance-parameters
deploy-instance-parameters
minishell-cwd
minishell-cwd
supervisord-wrapper
## Monitoring part
## Monitoring part
###Parts to add for monitoring
###Parts to add for monitoring
cron
cron
...
...
software/slaprunner/instance-runner-import.cfg.in
View file @
1d3ee03a
...
@@ -25,6 +25,7 @@ parts +=
...
@@ -25,6 +25,7 @@ parts +=
deploy-instance-parameters
deploy-instance-parameters
instance-software-type
instance-software-type
bash-profile
bash-profile
supervisord-wrapper
# have to repeat the next one, as it's not inherited from pbsready-import
# have to repeat the next one, as it's not inherited from pbsready-import
import-on-notification
import-on-notification
## Monitoring part
## Monitoring part
...
...
software/slaprunner/instance-runner.cfg
View file @
1d3ee03a
...
@@ -25,6 +25,7 @@ parts =
...
@@ -25,6 +25,7 @@ parts =
instance-software-type
instance-software-type
minishell-cwd
minishell-cwd
bash-profile
bash-profile
supervisord-wrapper
{% if slapparameter_dict.get('custom-frontend-backend-url') %}
{% if slapparameter_dict.get('custom-frontend-backend-url') %}
custom-frontend-promise
custom-frontend-promise
{% endif %}
{% endif %}
...
@@ -618,6 +619,43 @@ context =
...
@@ -618,6 +619,43 @@ context =
raw path $PATH:${nano:location}/bin:${vim:location}/bin:${screen:location}/bin:${git:location}/bin:${curl:location}/bin:${python2.7:location}/bin
raw path $PATH:${nano:location}/bin:${vim:location}/bin:${screen:location}/bin:${git:location}/bin:${curl:location}/bin:${python2.7:location}/bin
key workdir runnerdirectory:home
key workdir runnerdirectory:home
[supervisord]
autorestart = unexpected
autostart = false
directory = $${buildout:directory}
exitcodes = 0
logfile = $${directory:log}/supervisord.log
numprocs = 1
path = $${environ:PATH}
pidfile = $${directory:run}/supervisord.pid
server = 127.0.0.1:39986
slapgrid-cp = slapgrid-cp
slapgrid-cp-command = $${slaprunner:slapos} node instance --all --cfg $${slaprunner:slapos.cfg} --pidfile $${:slapgrid-cp-pid} --verbose --logfile $${:slapgrid-cp-log}
slapgrid-cp-log = $${runnerdirectory:home}/instance.log
slapgrid-cp-pid = $${directory:run}/slapgrid-cp.pid
slapgrid-cp-startretries = 3
slapgrid-sr = slapgrid-sr
slapgrid-sr-command = $${slaprunner:slapos} node software --all --cfg $${slaprunner:slapos.cfg} --pidfile $${:slapgrid-sr-pid} --verbose --logfile $${:slapgrid-sr-log}
slapgrid-sr-log = $${runnerdirectory:home}/software.log
slapgrid-sr-pid = $${directory:run}/slapgrid-sr.pid
slapgrid-sr-startretries = 2
socket_name = unix://$${:socket_path}
socket_path = $${directory:tmp}/supervisord.sock
startsecs = 1
stdout_logfile = NONE
[supervisord-conf]
recipe = slapos.recipe.template:jinja2
template = ${template-supervisord:location}/${template-supervisord:filename}
rendered = $${directory:etc}/supervisord.conf
context =
section supervisord supervisord
[supervisord-wrapper]
recipe = slapos.cookbook:wrapper
command-line = $${buildout:directory}/bin/supervisord -c $${supervisord-conf:rendered} --nodaemon
wrapper-path = $${directory:services}/supervisord
[monitor-current-log-access]
[monitor-current-log-access]
< = monitor-directory-access
< = monitor-directory-access
source = $${directory:log}
source = $${directory:log}
software/slaprunner/template/supervisord.conf.in
0 → 100644
View file @
1d3ee03a
[unix_http_server]
file = {{ supervisord['socket_path'] }}
[supervisorctl]
serverurl = {{ supervisord['socket_name'] }}
[inet_http_server]
port = {{ supervisord['server'] }}
[supervisord]
logfile = {{ supervisord['logfile'] }}
pidfile = {{ supervisord['pidfile'] }}
[rpcinterface:supervisor]
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
[program:{{- supervisord['slapgrid-sr'] -}}]
command = {{ supervisord['slapgrid-sr-command'] }}
process_name = {{ supervisord['slapgrid-sr'] }}
numprocs = {{ supervisord['numprocs'] }}
autostart = {{ supervisord['autostart'] }}
exitcodes = {{ supervisord['exitcodes'] }}
startretries = {{ supervisord['slapgrid-sr-startretries'] }}
startsecs = {{ supervisord['startsecs'] }}
autorestart = {{ supervisord['autorestart'] }}
stdout_logfile = {{ supervisord['stdout_logfile'] }}
stderr_logfile = {{ supervisord['stdout_logfile'] }}
directory = {{ supervisord['directory'] }}
environment = PATH="{{- supervisord['path'] -}}"
[program:{{- supervisord['slapgrid-cp'] -}}]
command = {{ supervisord['slapgrid-cp-command'] }}
process_name = {{ supervisord['slapgrid-cp'] }}
numprocs = {{ supervisord['numprocs'] }}
autostart = {{ supervisord['autostart'] }}
exitcodes = {{ supervisord['exitcodes'] }}
startretries = {{ supervisord['slapgrid-cp-startretries'] }}
startsecs = {{ supervisord['startsecs'] }}
autorestart = {{ supervisord['autorestart'] }}
stdout_logfile = {{ supervisord['stdout_logfile'] }}
stderr_logfile = {{ supervisord['stdout_logfile'] }}
directory = {{ supervisord['directory'] }}
environment = PATH="{{- supervisord['path'] -}}"
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