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
Eteri
slapos
Commits
5abd67a8
Commit
5abd67a8
authored
Feb 21, 2014
by
Nicolas Wavrant
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slaprunner: commit for deleting whitespaces
Conflicts: software/slaprunner/instance-runner.cfg
parent
4eee6031
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
32 additions
and
31 deletions
+32
-31
slapos/recipe/zeroknown.py
slapos/recipe/zeroknown.py
+7
-7
software/slaprunner/common.cfg
software/slaprunner/common.cfg
+3
-3
software/slaprunner/httpd_conf.in
software/slaprunner/httpd_conf.in
+1
-1
software/slaprunner/instance-runner.cfg
software/slaprunner/instance-runner.cfg
+10
-9
stack/monitor/monitor.cfg.in
stack/monitor/monitor.cfg.in
+4
-4
stack/monitor/monitor.py.in
stack/monitor/monitor.py.in
+5
-5
stack/monitor/webfiles/index.cgi.in
stack/monitor/webfiles/index.cgi.in
+1
-1
stack/monitor/webfiles/index.html.jinja2
stack/monitor/webfiles/index.html.jinja2
+1
-1
No files found.
slapos/recipe/zeroknown.py
View file @
5abd67a8
...
@@ -36,16 +36,16 @@ class WriteRecipe(GenericBaseRecipe):
...
@@ -36,16 +36,16 @@ class WriteRecipe(GenericBaseRecipe):
"""
"""
"""
"""
def
__init__
(
self
,
buildout
,
name
,
options
):
def
__init__
(
self
,
buildout
,
name
,
options
):
if
not
"filename"
in
options
:
if
not
"filename"
in
options
:
raise
zc
.
buildout
.
UserError
(
"You have to provide the parameter
\
"
filename
\
"
"
)
raise
zc
.
buildout
.
UserError
(
"You have to provide the parameter
\
"
filename
\
"
"
)
self
.
filename
=
options
[
'filename'
].
strip
()
self
.
filename
=
options
[
'filename'
].
strip
()
self
.
path
=
os
.
path
.
join
(
buildout
[
'buildout'
][
'directory'
],
self
.
filename
)
self
.
path
=
os
.
path
.
join
(
buildout
[
'buildout'
][
'directory'
],
self
.
filename
)
self
.
name
=
name
self
.
name
=
name
self
.
options
=
options
.
copy
()
self
.
options
=
options
.
copy
()
del
self
.
options
[
'filename'
]
del
self
.
options
[
'filename'
]
del
self
.
options
[
'recipe'
]
del
self
.
options
[
'recipe'
]
# Set up the parser, and write config file if needed
# Set up the parser, and write config file if needed
self
.
parser
=
ConfigParser
.
ConfigParser
()
self
.
parser
=
ConfigParser
.
ConfigParser
()
try
:
try
:
...
@@ -63,7 +63,7 @@ class WriteRecipe(GenericBaseRecipe):
...
@@ -63,7 +63,7 @@ class WriteRecipe(GenericBaseRecipe):
install
=
update
=
lambda
self
:
[]
install
=
update
=
lambda
self
:
[]
def
full_install
(
self
):
def
full_install
(
self
):
"""XXX-Nicolas : when some parameter's value is changed in
"""XXX-Nicolas : when some parameter's value is changed in
buildout profile, this will override custom user defined values"""
buildout profile, this will override custom user defined values"""
self
.
parser
.
read
(
self
.
path
)
self
.
parser
.
read
(
self
.
path
)
if
self
.
parser
.
has_section
(
self
.
name
):
if
self
.
parser
.
has_section
(
self
.
name
):
...
@@ -74,14 +74,14 @@ class WriteRecipe(GenericBaseRecipe):
...
@@ -74,14 +74,14 @@ class WriteRecipe(GenericBaseRecipe):
with
open
(
self
.
path
,
'w'
)
as
file
:
with
open
(
self
.
path
,
'w'
)
as
file
:
self
.
parser
.
write
(
file
)
self
.
parser
.
write
(
file
)
class
ReadRecipe
(
GenericBaseRecipe
):
class
ReadRecipe
(
GenericBaseRecipe
):
"""
"""
"""
"""
def
__init__
(
self
,
buildout
,
name
,
options
):
def
__init__
(
self
,
buildout
,
name
,
options
):
if
not
"filename"
in
options
:
if
not
"filename"
in
options
:
raise
zc
.
buildout
.
UserError
(
"You have to provide the parameter
\
"
filename
\
"
"
)
raise
zc
.
buildout
.
UserError
(
"You have to provide the parameter
\
"
filename
\
"
"
)
self
.
filename
=
options
[
'filename'
].
strip
()
self
.
filename
=
options
[
'filename'
].
strip
()
self
.
path
=
os
.
path
.
join
(
buildout
[
'buildout'
][
'directory'
],
self
.
filename
)
self
.
path
=
os
.
path
.
join
(
buildout
[
'buildout'
][
'directory'
],
self
.
filename
)
...
...
software/slaprunner/common.cfg
View file @
5abd67a8
...
@@ -28,7 +28,7 @@ parts =
...
@@ -28,7 +28,7 @@ parts =
instance-runner-import
instance-runner-import
instance-runner-export
instance-runner-export
slapos-cookbook
slapos-cookbook
slapos-cfg-template
slapos-cfg-template
# XXX: we have to manually add this for resilience
# XXX: we have to manually add this for resilience
rdiff-backup
rdiff-backup
collective.recipe.template-egg
collective.recipe.template-egg
...
@@ -105,7 +105,7 @@ recipe = hexagonit.recipe.download
...
@@ -105,7 +105,7 @@ recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/template/${:filename}
url = ${:_profile_base_location_}/template/${:filename}
md5sum = d31d1c51a51bc4b2b8dda197777a4bcb
md5sum = d31d1c51a51bc4b2b8dda197777a4bcb
location = ${buildout:parts-directory}/${:_buildout_section_name_}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = slapos.cfg.in
filename = slapos.cfg.in
download-only = true
download-only = true
mode = 0644
mode = 0644
...
@@ -114,7 +114,7 @@ recipe = hexagonit.recipe.download
...
@@ -114,7 +114,7 @@ recipe = hexagonit.recipe.download
url = ${:_profile_base_location_}/${:filename}
url = ${:_profile_base_location_}/${:filename}
md5sum = f8446fcf254b4929eb828a9a1d7e5f62
md5sum = f8446fcf254b4929eb828a9a1d7e5f62
location = ${buildout:parts-directory}/${:_buildout_section_name_}
location = ${buildout:parts-directory}/${:_buildout_section_name_}
filename = parameters.xml.in
filename = parameters.xml.in
download-only = true
download-only = true
mode = 0644
mode = 0644
...
...
software/slaprunner/httpd_conf.in
View file @
5abd67a8
...
@@ -73,4 +73,4 @@ RewriteRule ^/git-public/ - [E=AUTHREQUIRED:yes]
...
@@ -73,4 +73,4 @@ RewriteRule ^/git-public/ - [E=AUTHREQUIRED:yes]
Require valid-user
Require valid-user
</LocationMatch>
</LocationMatch>
include {{ parameters.cgi_httpd_conf }}
include {{ parameters.cgi_httpd_conf }}
software/slaprunner/instance-runner.cfg
View file @
5abd67a8
...
@@ -163,7 +163,7 @@ runner_port = 50005
...
@@ -163,7 +163,7 @@ runner_port = 50005
partition-amount = $${slap-parameter:instance-amount}
partition-amount = $${slap-parameter:instance-amount}
wrapper = $${directory:services}/slaprunner
wrapper = $${directory:services}/slaprunner
debug = $${slap-parameter:debug}
debug = $${slap-parameter:debug}
access-url = https://[$${:ipv6}]:$${:runner_port}
access-url = https://[$${:ipv6}]:$${:runner_port}
supd-temp-var = $${directory:etc}/supervisord.conf
supd-temp-var = $${directory:etc}/supervisord.conf
prox-db-var = $${slaprunner:working-directory}/proxy.db
prox-db-var = $${slaprunner:working-directory}/proxy.db
console = False
console = False
...
@@ -305,13 +305,13 @@ cgi_httpd_conf = $${cgi-httpd-configuration-file:output}
...
@@ -305,13 +305,13 @@ cgi_httpd_conf = $${cgi-httpd-configuration-file:output}
recipe = slapos.recipe.template:jinja2
recipe = slapos.recipe.template:jinja2
template = ${template_httpd_conf:location}/${template_httpd_conf:filename}
template = ${template_httpd_conf:location}/${template_httpd_conf:filename}
rendered = $${directory:etc}/httpd.conf
rendered = $${directory:etc}/httpd.conf
context =
context =
section parameters httpd-parameters
section parameters httpd-parameters
[cgi-httpd-wrapper]
[cgi-httpd-wrapper]
recipe = slapos.cookbook:wrapper
recipe = slapos.cookbook:wrapper
apache-executable = ${apache:location}/bin/httpd
apache-executable = ${apache:location}/bin/httpd
wrapper-path = $${ca-httpd:executable}
wrapper-path = $${ca-httpd:executable}
command-line = $${:apache-executable} -f $${httpd-conf:rendered} -DFOREGROUND
command-line = $${:apache-executable} -f $${httpd-conf:rendered} -DFOREGROUND
#--------------------
#--------------------
...
@@ -503,8 +503,9 @@ context =
...
@@ -503,8 +503,9 @@ context =
key runner_port slaprunner:runner_port
key runner_port slaprunner:runner_port
key runner_workdir slaprunner:working-directory
key runner_workdir slaprunner:working-directory
key slapgrid_cp slaprunner:slapgrid_cp
key slapgrid_cp slaprunner:slapgrid_cp
key slapgrid_sr slaprunner:slapgrid_sr
key slapgrid_sr slaprunner:slapgrid_sr
key slapproxy slaprunner:slapproxy
key slapproxy slaprunner:slapproxy
key software_root runnerdirectory:software-root
key ssh_client slaprunner:ssh_client
key ssh_client slaprunner:ssh_client
key supervisor slaprunner:supervisor
key supervisor slaprunner:supervisor
key supervisord_config slaprunner:supd-temp-var
key supervisord_config slaprunner:supd-temp-var
...
@@ -516,7 +517,7 @@ ipv6 = $${slap-network-information:global-ipv6}
...
@@ -516,7 +517,7 @@ ipv6 = $${slap-network-information:global-ipv6}
port = 8080
port = 8080
shell = $${shell:wrapper}
shell = $${shell:wrapper}
wrapper = $${directory:bin}/shellinaboxd
wrapper = $${directory:bin}/shellinaboxd
shellinabox-binary = ${shellinabox:location}/bin/shellinaboxd
shellinabox-binary = ${shellinabox:location}/bin/shellinaboxd
password = $${zero-parameters:shell-password}
password = $${zero-parameters:shell-password}
directory = $${runnerdirectory:home}
directory = $${runnerdirectory:home}
login-shell = $${directory:bin}/login
login-shell = $${directory:bin}/login
...
@@ -571,7 +572,7 @@ extensions = jinja2.ext.do
...
@@ -571,7 +572,7 @@ extensions = jinja2.ext.do
template = ${parameters-template:location}/${parameters-template:filename}
template = ${parameters-template:location}/${parameters-template:filename}
rendered = $${directory:etc}/.parameter.xml.default
rendered = $${directory:etc}/.parameter.xml.default
mode = 0644
mode = 0644
context =
context =
key slapparameter_dict slap-configuration:configuration
key slapparameter_dict slap-configuration:configuration
[deploy-instance-parameters]
[deploy-instance-parameters]
...
...
stack/monitor/monitor.cfg.in
View file @
5abd67a8
...
@@ -108,7 +108,7 @@ url = ${index-template:location}/$${:filename}
...
@@ -108,7 +108,7 @@ url = ${index-template:location}/$${:filename}
destination = $${directory:www}
destination = $${directory:www}
filename = ${index-template:filename}
filename = ${index-template:filename}
download-only = true
download-only = true
#md5sum =
#md5sum =
mode = 0644
mode = 0644
[deploy-status-cgi]
[deploy-status-cgi]
...
@@ -144,7 +144,7 @@ context =
...
@@ -144,7 +144,7 @@ context =
key monitoring_file_json monitor-parameters:json-path
key monitoring_file_json monitor-parameters:json-path
key monitoring_folder_bool monitor-parameters:result-dir
key monitoring_folder_bool monitor-parameters:result-dir
raw python_executable ${buildout:executable}
raw python_executable ${buildout:executable}
[deploy-rss-script]
[deploy-rss-script]
recipe = hexagonit.recipe.download
recipe = hexagonit.recipe.download
url = ${rss-bin:destination}/${rss-bin:filename}
url = ${rss-bin:destination}/${rss-bin:filename}
...
@@ -158,7 +158,7 @@ download-only = true
...
@@ -158,7 +158,7 @@ download-only = true
recipe = slapos.recipe.template
recipe = slapos.recipe.template
url = ${make-rss-script:output}
url = ${make-rss-script:output}
output = $${directory:bin}/make-rss.sh
output = $${directory:bin}/make-rss.sh
#md5sum =
#md5sum =
mode = 0744
mode = 0744
[cadirectory]
[cadirectory]
...
@@ -235,7 +235,7 @@ input = inline:
...
@@ -235,7 +235,7 @@ input = inline:
SSLProtocol -ALL +SSLv3 +TLSv1
SSLProtocol -ALL +SSLv3 +TLSv1
SSLHonorCipherOrder On
SSLHonorCipherOrder On
SSLCipherSuite RC4-SHA:HIGH:!ADH
SSLCipherSuite RC4-SHA:HIGH:!ADH
</IfDefine>
</IfDefine>
SSLEngine On
SSLEngine On
ScriptSock $${:cgid-pid-file}
ScriptSock $${:cgid-pid-file}
<Directory $${:document-root}>
<Directory $${:document-root}>
...
...
stack/monitor/monitor.py.in
View file @
5abd67a8
...
@@ -67,7 +67,7 @@ def runScripts(directory):
...
@@ -67,7 +67,7 @@ def runScripts(directory):
command = [os.path.join(promise_dir, script)]
command = [os.path.join(promise_dir, script)]
script = os.path.basename(command[0])
script = os.path.basename(command[0])
result[script] = ''
result[script] = ''
process_handler = subprocess.Popen(command,
process_handler = subprocess.Popen(command,
cwd=instance_path,
cwd=instance_path,
env=None if sys.platform == 'cygwin' else {},
env=None if sys.platform == 'cygwin' else {},
...
@@ -110,18 +110,18 @@ if __name__ == "__main__":
...
@@ -110,18 +110,18 @@ if __name__ == "__main__":
parser = OptionParser(option_list=option_list)
parser = OptionParser(option_list=option_list)
monitors = {}
monitors = {}
(options, args) = parser.parse_args()
(options, args) = parser.parse_args()
if not (options.monitor or options.promise
if not (options.monitor or options.promise
or options.service or options.all):
or options.service or options.all):
exit("Please provide at list one arg in : -a, -m, -p, -s")
exit("Please provide at list one arg in : -a, -m, -p, -s")
if options.monitor or options.all:
if options.monitor or options.all:
monitors.update(runScripts(monitor_dir))
monitors.update(runScripts(monitor_dir))
if options.promise or options.all:
if options.promise or options.all:
monitors.update(runScripts(promise_dir))
monitors.update(runScripts(promise_dir))
if options.service or options.all:
if options.service or options.all:
monitors.update(runServices(pid_dir))
monitors.update(runServices(pid_dir))
if options.only_stdout:
if options.only_stdout:
print json.dumps(monitors)
print json.dumps(monitors)
else:
else:
...
@@ -130,4 +130,4 @@ if __name__ == "__main__":
...
@@ -130,4 +130,4 @@ if __name__ == "__main__":
exit(0)
exit(0)
else:
else:
exit(1)
exit(1)
stack/monitor/webfiles/index.cgi.in
View file @
5abd67a8
...
@@ -51,7 +51,7 @@ def return_document():
...
@@ -51,7 +51,7 @@ def return_document():
def make_menu():
def make_menu():
# Transform deep-2 tree in json
# Transform deep-2 tree in json
folder_list = {}
folder_list = {}
for folder in os.listdir(cgi_path):
for folder in os.listdir(cgi_path):
if os.path.isdir(os.path.join(cgi_path, folder)):
if os.path.isdir(os.path.join(cgi_path, folder)):
folder_list[folder] = []
folder_list[folder] = []
...
...
stack/monitor/webfiles/index.html.jinja2
View file @
5abd67a8
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
</ul>
</ul>
</div>
</div>
</div>
</div>
<div
id=
"content"
>
<div
id=
"content"
>
<iframe
src=
"{{ default_page }}"
>
<iframe
src=
"{{ default_page }}"
>
</iframe>
</iframe>
</div>
</div>
...
...
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