diff --git a/slapos/recipe/boinc/__init__.py b/slapos/recipe/boinc/__init__.py index 5151a5e886791312525d08b0bf3c161c0a312c02..260f73e64df296aee259520e8482d99f77af6278 100644 --- a/slapos/recipe/boinc/__init__.py +++ b/slapos/recipe/boinc/__init__.py @@ -37,7 +37,7 @@ class Recipe(GenericBaseRecipe): #get current slapuser name stat_info = os.stat(options['home'].strip()) options['user'] = pwd.getpwuid(stat_info.st_uid)[0] - url_base = "http://["+options['ip']+"]:"+options['port'] + url_base = options['url-base'] project = options['project'].strip() root = options['installroot'].strip() options['home_page'] = url_base + "/" + project @@ -65,8 +65,7 @@ class Recipe(GenericBaseRecipe): self.pythonbin = options['python-binary'].strip() #Apache php informations - self.ipv6 = options['ip'].strip() - self.port = options['port'].strip() + self.url_base =options['url-base'].strip() self.htpasswd = options['htpasswd'].strip() self.phpini = options['php-ini'].strip() self.phpbin = options['php-bin'].strip() @@ -99,7 +98,6 @@ class Recipe(GenericBaseRecipe): path_list = [] make_project = os.path.join(self.package, 'bin/make_project') niceprojectname = self.project + "@Home" - url_base = "http://["+self.ipv6+"]:"+self.port slapuser = self.options['user'] #Define environment variable here @@ -141,7 +139,7 @@ class Recipe(GenericBaseRecipe): # Generate make project wrapper file readme_file = os.path.join(self.installroot, self.project+'.readme') - launch_args = [make_project, '--url_base', url_base, "--db_name", + launch_args = [make_project, '--url_base', self.url_base, "--db_name", self.database, "--db_user", self.username, "--db_passwd", self.password, "--project_root", self.installroot, "--db_host", self.mysqlhost, "--user_name", slapuser, "--srcdir", diff --git a/software/boinc/software.cfg b/software/boinc/software.cfg index 86079ef5bcfd265823ee4c7f32a6625a40e7b76d..033339902d0611c76d6a52c5c42f075d13de2e1c 100644 --- a/software/boinc/software.cfg +++ b/software/boinc/software.cfg @@ -1,8 +1,5 @@ [buildout] -develop = - /srv/slapgrid/slappart19/srv//runner/project/slapos.github - parts = boinc-instance template @@ -12,8 +9,8 @@ parts = template_input slapos-cookbook instance-egg -# slapos.cookbook-repository -# check-recipe + slapos.cookbook-repository + check-recipe extends = ../../stack/boinc/buildout.cfg diff --git a/stack/boinc/buildout.cfg b/stack/boinc/buildout.cfg index 972da0a6c6d2b02521b49bed300cbe67853c5ed3..13db638723b3da4364c089c24801c20d6c923f76 100644 --- a/stack/boinc/buildout.cfg +++ b/stack/boinc/buildout.cfg @@ -1,7 +1,7 @@ [buildout] # Local development -#develop = -# ${:parts-directory}/slapos.cookbook-repository +develop = + ${:parts-directory}/slapos.cookbook-repository parts = slapos-cookbook @@ -41,7 +41,7 @@ eggs = recipe = slapos.recipe.template url = ${:_profile_base_location_}/instance-boinc.cfg output = ${buildout:directory}/template-boinc.cfg -md5sum = 6746390ac3e19a8b1b933e0722084675 +md5sum = a034940505756139e5aeacd5d8e17fbc mode = 0644 #Template for deploying MySQL Database Server diff --git a/stack/boinc/instance-boinc.cfg b/stack/boinc/instance-boinc.cfg index 1a631388c1f963f92f3bbc6cde17c2d13535b3ff..af2b426787e1ee98c902ae3d853f28f342c0b7b2 100644 --- a/stack/boinc/instance-boinc.cfg +++ b/stack/boinc/instance-boinc.cfg @@ -150,7 +150,7 @@ lock-file = $${basedirectory:run}/apache.lock error-log = $${directory:httpd-log}/error.log access-log = $${directory:httpd-log}/access.log wrapper = $${basedirectory:services}/apache -ip = $${httpd-conf:ip} +url-base = $${httpd-conf:ip} port = $${httpd-conf:port} url = http://[$${:ip}]:$${:port}/ httpd-binary = ${apache:location}/bin/httpd @@ -182,6 +182,8 @@ bytes = 4 recipe = slapos.cookbook:boinc home = $${buildout:directory} project = $${slap-parameter:project} +#http://[$${apache-php:ip}]:$${apache-php:port}/ +url-base = $${request-frontend:connection-site_url} fullname = $${slap-parameter:full-name} copyright = $${slap-parameter:copyright-holder} boinc = ${boinc:location} @@ -199,8 +201,6 @@ python-binary = ${buildout:executable} dash = ${dash:location}/bin/dash #Apache and php -ip = $${apache-php:ip} -port = $${apache-php:port} htpasswd = ${apache:location}/bin/htpasswd apache-pid = $${httpd-conf:pid_file} php-ini = $${apache-php:php-ini-dir}/php.ini