Commit 43f10015 authored by Jérome Perrin's avatar Jérome Perrin

grid: pass cmmi shared path to software buildout

New `slapos_recipe_cmmi_shared_path` option from `slapos` section of
slapos config.
When running software buildout, this with be passed to buildout as
`buildout:slapos-recipe-cmmi-shared-path`
parent 164d04bf
...@@ -8,6 +8,7 @@ cert_file = /etc/opt/slapos/ssl/computer.crt ...@@ -8,6 +8,7 @@ cert_file = /etc/opt/slapos/ssl/computer.crt
certificate_repository_path = /etc/opt/slapos/ssl/partition_pki certificate_repository_path = /etc/opt/slapos/ssl/partition_pki
software_root = /opt/slapgrid software_root = /opt/slapgrid
instance_root = /srv/slapgrid instance_root = /srv/slapgrid
slapos_recipe_cmmi_shared_path = /opt/slapgrid/shared
[slapformat] [slapformat]
# Replace by your network interface providing IPv6 if you don't use re6st # Replace by your network interface providing IPv6 if you don't use re6st
......
...@@ -109,7 +109,8 @@ class Software(object): ...@@ -109,7 +109,8 @@ class Software(object):
download_binary_dir_url=None, upload_binary_dir_url=None, download_binary_dir_url=None, upload_binary_dir_url=None,
download_from_binary_cache_url_blacklist=None, download_from_binary_cache_url_blacklist=None,
upload_to_binary_cache_url_blacklist=None, upload_to_binary_cache_url_blacklist=None,
software_min_free_space=None): software_min_free_space=None,
slapos_recipe_cmmi_shared_path=None):
"""Initialisation of class parameters """Initialisation of class parameters
""" """
...@@ -124,6 +125,7 @@ class Software(object): ...@@ -124,6 +125,7 @@ class Software(object):
self.software_url_hash = md5digest(self.url) self.software_url_hash = md5digest(self.url)
self.software_path = os.path.join(self.software_root, self.software_path = os.path.join(self.software_root,
self.software_url_hash) self.software_url_hash)
self.slapos_recipe_cmmi_shared_path = slapos_recipe_cmmi_shared_path
self.buildout = buildout self.buildout = buildout
self.logger = logger self.logger = logger
self.signature_private_key_file = signature_private_key_file self.signature_private_key_file = signature_private_key_file
...@@ -258,6 +260,10 @@ class Software(object): ...@@ -258,6 +260,10 @@ class Software(object):
additional_parameters = list(self._additional_buildout_parameters(extends_cache)) additional_parameters = list(self._additional_buildout_parameters(extends_cache))
additional_parameters.extend(['-c', buildout_cfg]) additional_parameters.extend(['-c', buildout_cfg])
if self.slapos_recipe_cmmi_shared_path:
additional_parameters.append('buildout:slapos-recipe-cmmi-shared-path=%s' %
self.slapos_recipe_cmmi_shared_path)
utils.bootstrapBuildout(path=self.software_path, utils.bootstrapBuildout(path=self.software_path,
buildout=self.buildout, buildout=self.buildout,
logger=self.logger, logger=self.logger,
......
...@@ -556,7 +556,8 @@ stderr_logfile_backups=1 ...@@ -556,7 +556,8 @@ stderr_logfile_backups=1
shadir_ca_file=self.shadir_ca_file, shadir_ca_file=self.shadir_ca_file,
shadir_cert_file=self.shadir_cert_file, shadir_cert_file=self.shadir_cert_file,
shadir_key_file=self.shadir_key_file, shadir_key_file=self.shadir_key_file,
software_min_free_space=self.software_min_free_space) software_min_free_space=self.software_min_free_space,
slapos_recipe_cmmi_shared_path=self.config.get('slapos_recipe_cmmi_shared_path'),)
# call manager for every software release # call manager for every software release
for manager in self._manager_list: for manager in self._manager_list:
......
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