diff --git a/setup.py b/setup.py index ebf85c9fc56cfe0f2afe64bbac21873856ce9cc2..d55fd6307605e1b3cfe461d4e37a88f49b66bf6f 100755 --- a/setup.py +++ b/setup.py @@ -140,6 +140,7 @@ setup(name=name, 'condor = slapos.recipe.condor:Recipe', 'boinc = slapos.recipe.boinc:Recipe', 'boinc.app = slapos.recipe.boinc:App', + 'boinc.client = slapos.recipe.boinc:Client', ], 'slapos.recipe.nosqltestbed.plugin': [ 'kumo = slapos.recipe.nosqltestbed.kumo:KumoTestBed', diff --git a/slapos/recipe/boinc/__init__.py b/slapos/recipe/boinc/__init__.py index 5d8014591964fdc3bb932acb5134af7813b46d5b..ccd6aedbbd72bab81a56c68e7035589b839fe477 100644 --- a/slapos/recipe/boinc/__init__.py +++ b/slapos/recipe/boinc/__init__.py @@ -280,4 +280,25 @@ class App(GenericBaseRecipe): update = install + +class Client(GenericBaseRecipe): + """Deploy a fully fonctionnal boinc client connected to a boinc server instance""" + + def install(self): + path_list = [] + boincbin = self.options['boinc-bin'].strip() + installdir = self.options['install-dir'].strip() + url = self.options['server-url'].strip() + key = self.options['key'].strip() + boinc_wrapper = self.options['client-wrapper'].strip() + + #Generate wrapper for boinc_client + client_wrapper = self.createPythonScript(boinc_wrapper, + 'slapos.recipe.librecipe.execute.execute', + ([boincbin, '--dir', installdir, '--attach_project', url, key]) + ) + path_list.append(client_wrapper) + return path_list + + update = install \ No newline at end of file