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
Tom Niget
slapos
Commits
fdcfeaab
Commit
fdcfeaab
authored
May 29, 2013
by
Vivien Alger
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Moving to a configuration wrapper rather than a recipe
parent
0c611277
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
10 additions
and
62 deletions
+10
-62
setup.py
setup.py
+0
-1
slapos/recipe/kvm_monitor/__init__.py
slapos/recipe/kvm_monitor/__init__.py
+0
-50
slapos/recipe/kvm_monitor/template/kvm_monitor_run.in
slapos/recipe/kvm_monitor/template/kvm_monitor_run.in
+0
-2
software/kvm/common.cfg
software/kvm/common.cfg
+1
-1
software/kvm/instance-kvm.cfg.in
software/kvm/instance-kvm.cfg.in
+9
-8
No files found.
setup.py
View file @
fdcfeaab
...
...
@@ -131,7 +131,6 @@ setup(name=name,
'kumofs = slapos.recipe.kumofs:Recipe'
,
'kvm = slapos.recipe.kvm:Recipe'
,
'kvm.frontend = slapos.recipe.kvm_frontend:Recipe'
,
'kvm.monitor = slapos.recipe.kvm_monitor:MonitorRecipe'
,
'lamp = slapos.recipe.lamp:Request'
,
'lamp.generic = slapos.recipe.lampgeneric:Recipe'
,
'lamp.request = slapos.recipe.lamp:Request'
,
...
...
slapos/recipe/kvm_monitor/__init__.py
deleted
100644 → 0
View file @
0c611277
##############################################################################
#
# Copyright (c) 2011 Vifib SARL and Contributors. All Rights Reserved.
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
# End users who are looking for a ready-to-use solution with commercial
# guarantees and support are strongly adviced to contract a Free Software
# Service Company
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 3
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
##############################################################################
from
slapos.recipe.librecipe
import
GenericBaseRecipe
class
MonitorRecipe
(
GenericBaseRecipe
):
def
install
(
self
):
options
=
self
.
options
config
=
dict
(
kvm_monitor_path
=
options
[
'kvm-monitor-path'
],
filepath
=
options
[
'filepath'
],
xml_path
=
options
[
'xml-path'
],
sections
=
options
[
'sections'
],
options
=
options
[
'options'
]
)
script
=
self
.
createExecutable
(
options
[
'path'
],
self
.
substituteTemplate
(
self
.
getTemplateFilename
(
'kvm_monitor_run.in'
),
config
)
)
return
[
script
]
slapos/recipe/kvm_monitor/template/kvm_monitor_run.in
deleted
100644 → 0
View file @
0c611277
#!/bin/sh
exec
%
(
kvm_monitor_path
)
s %
(
filepath
)
s %
(
xml_path
)
s
-s
%
(
sections
)
s
-opts
%
(
options
)
s
software/kvm/common.cfg
View file @
fdcfeaab
...
...
@@ -71,7 +71,7 @@ command =
[template-kvm]
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance-kvm.cfg.in
md5sum =
06a4dc42f84914b3ec6694ad857f9d27
md5sum =
cb8adfb70882a07e1df3943983c27963
output = ${buildout:directory}/template-kvm.cfg
mode = 0644
...
...
software/kvm/instance-kvm.cfg.in
View file @
fdcfeaab
...
...
@@ -130,13 +130,14 @@ port = $${novnc-instance:port}
[kvm-monitor]
recipe = slapos.cookbook:kvm.monitor
path = $${directory:services}/kvm_monitor
kvm-monitor-path = ${buildout:bin-directory}/kvm.monitor.test
filepath = $${buildout:directory}/buildout-switch-softwaretype.cfg
sections = slap-parameter
options = disk-size ram-size cpu-count
xml-path = $${buildout:directory}/report.xml
recipe = slapos.cookbook:wrapper
wrapper-path = $${directory:services}/kvm_monitor
command-line = ${buildout:bin-directory}/kvm.monitor.test
$${buildout:directory}/buildout-switch-softwaretype.cfg
$${buildout:directory}/report.xml
-s slap-parameter
-opts disk-size ram-size cpu-count
#----------------
...
...
@@ -163,7 +164,7 @@ log = $${directory:log}/crond.log
recipe = slapos.cookbook:cron.d
name = kvm_monitor
frequency = 0 0 * * *
command = $${kvm-monitor:path}
command = $${kvm-monitor:
wrapper-
path}
[request-slave-frontend]
recipe = slapos.cookbook:requestoptional
...
...
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