def configure_supervisor(self): new_instance_folder = '{}/{}'.format( self.config.instances_root, self.instance.name ) settings = { 'supervisor': {'parts': [new_instance_folder]} } remote_file = "{}/customizeme.cfg".format(self.config.supervisor.path) customizeme = configure_ini( string=self.remote.get_file(remote_file), append=True, params=settings) successfull = self.remote.put_file("{}/{}".format(self.config.supervisor.path, 'customizeme.cfg'), customizeme) if not successfull: raise StepError('Error when configuring {}'.format(remote_file)) code, stdout = self.remote.execute('cd {} && ./supervisor_config'.format(self.config.supervisor.path), do_raise=True) return success( stdout, "Succesfully added {} to supervisor".format(new_instance_folder) )
def clone_buildout(self): if self.remote.file_exists('{}'.format(self.buildout.folder)): return skippable_error_log('Folder {} already exists'.format(self.buildout.folder)) return success( self.buildout.clone(self.config.maxserver_buildout_uri, self.config.maxserver_buildout_branch), 'Succesfully cloned repo at {}'.format(self.buildout.folder) )
def update_buildout(self): result = self.buildout.upgrade(self.config.maxserver_buildout_branch, self.config.local_git_branch) return success(result, "Succesfully commited local changes")
def bootstrap_buildout(self): return success( self.buildout.bootstrap(), 'Succesfully bootstraped buildout {}'.format(self.buildout.folder) )