Commit 7764e58a authored by Yingjie Xu's avatar Yingjie Xu

Add report url.

parent 99a3f950
......@@ -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")
......
......@@ -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
[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]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment