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
Hardik Juneja
slapos
Commits
7764e58a
Commit
7764e58a
authored
Apr 23, 2012
by
Yingjie Xu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add report url.
parent
99a3f950
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
14 deletions
+18
-14
slapos/recipe/agent/__init__.py
slapos/recipe/agent/__init__.py
+2
-1
software/agent/instance.cfg
software/agent/instance.cfg
+12
-9
software/agent/software.cfg
software/agent/software.cfg
+4
-4
No files found.
slapos/recipe/agent/__init__.py
View file @
7764e58a
...
...
@@ -55,6 +55,7 @@ class Recipe(BaseSlapRecipe, GenericSlapRecipe):
configuration
.
add_section
(
"agent"
)
configuration
.
set
(
"agent"
,
"portal_url"
,
self
.
parameter_dict
[
"portal_url"
])
configuration
.
set
(
"agent"
,
"master_url"
,
self
.
parameter_dict
[
"master_url"
])
configuration
.
set
(
"agent"
,
"report_url"
,
self
.
parameter_dict
[
"report_url"
])
key_filepath
=
os
.
path
.
join
(
self
.
work_directory
,
"key"
)
key_file
=
open
(
key_filepath
,
"w"
)
key_file
.
write
(
self
.
parameter_dict
[
"key"
])
...
...
@@ -78,11 +79,11 @@ class Recipe(BaseSlapRecipe, GenericSlapRecipe):
state
=
open
(
self
.
options
[
"state_file"
],
"w"
)
state
.
write
(
''
)
state
.
close
()
configuration
.
set
(
"agent"
,
"path_file"
,
self
.
options
[
"path_file"
])
configuration
.
add_section
(
"software_uri"
)
software_list
=
json
.
loads
(
self
.
parameter_dict
[
"software_list"
])
for
software
in
software_list
:
configuration
.
set
(
"software_uri"
,
software
,
self
.
parameter_dict
[
software
])
configuration
.
write
(
open
(
configuration_path
,
"w"
))
agent_crond_path
=
os
.
path
.
join
(
self
.
crond
,
"agent"
)
...
...
software/agent/instance.cfg
View file @
7764e58a
...
...
@@ -9,17 +9,20 @@ develop-eggs-directory = ${buildout:develop-eggs-directory}
[instance]
recipe = ${instance-recipe:egg}:${instance-recipe:module}
agent_binary = ${buildout:directory}/bin/agent
report_start = ${buildout:directory}/bin/report_start
report_stop = ${buildout:directory}/bin/report_stop
dcrond_binary = ${dcron:location}/sbin/crond
python_binary = ${python2.7:location}/bin/python
pidfile = $${
buildout:directory
}/agent.pid
log_directory = $${
buildout:directory}/var/log
state_file = $${
buildout:directory
}/state.cfg
pidfile = $${
rootdirectory:run
}/agent.pid
log_directory = $${
rootdirectory:agentlog}
state_file = $${
rootdirectory:srv
}/state.cfg
[rootdirectory]
recipe = slapos.cookbook:mkdirectory
etc = $${buildout:directory}/etc/
run = $${rootdirectory:etc}/run/
var = $${buildout:directory}/var/
log = $${rootdirectory:var}/log/
srv = $${buildout:directory}/srv/
bin = $${buildout:directory}/bin/
etc = $${buildout:directory}/etc
run = $${rootdirectory:etc}/run
var = $${buildout:directory}/var
log = $${rootdirectory:var}/log
agentlog = $${rootdirectory:log}/agent
srv = $${buildout:directory}/srv
bin = $${buildout:directory}/bin
software/agent/software.cfg
View file @
7764e58a
[buildout]
#
develop =
#
/opt/slapdev
#
/opt/slapos.toolbox
develop =
/opt/slapdev
/opt/slapos.toolbox
extends =
../../component/dcron/buildout.cfg
...
...
@@ -31,7 +31,7 @@ eggs = ${instance-recipe:egg}
recipe = slapos.recipe.template
url = ${:_profile_base_location_}/instance.cfg
output = ${buildout:directory}/template.cfg
md5sum =
2e1a7a68b18de68b163e98a5f92cc776
md5sum =
10d7cf082399948e8dfef1c4644b4425
mode = 0644
[eggs]
...
...
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