def _provision_puppet(self, provision_item): """ runs puppet on remote host. puppet files must already have been copied """ service_data = self._template_data() return util._run_puppet( provision_item, parser=service_data['puppet_parser'], facts=self.facts, )
def _bootstrap_puppet(self, force=False): """ puppet itself is already installed at this point, this sets up the provisioning dependencies """ def _init_puppet(_dir): if not force and exists(os.path.join(_dir, 'modules'), use_sudo=True): self.report(" puppet-librarian has already processed modules") return self.report(" puppet-librarian will install dependencies") with cd(_dir): run('librarian-puppet init') run('librarian-puppet install --verbose') self.report(" bootstrapping puppet dependencies on remote host") util._run_puppet( 'puppet/modules/ymir/install_librarian.pp', debug=self.YMIR_DEBUG) _init_puppet("puppet")
def _bootstrap_puppet(self, force=False): """ puppet itself is already installed at this point, this sets up the provisioning dependencies """ def _init_puppet(_dir): if not force and exists(os.path.join(_dir, 'modules'), use_sudo=True): self.report(" puppet-librarian has already processed modules") return self.report(" puppet-librarian will install dependencies") with cd(_dir): run('librarian-puppet init') run('librarian-puppet install --verbose') self.report(" bootstrapping puppet dependencies on remote host") util._run_puppet('puppet/modules/ymir/install_librarian.pp', debug=self.YMIR_DEBUG) _init_puppet("puppet")
def setup_ip(self, ip): self.sync_tags() self.sync_buckets() self.sync_eips() self.report('installing puppet & puppet deps', section=True) self._clean_tmp_dir() with self.ssh_ctx(): with lcd(self._ymir_service_root): self._update_sys_packages() self._bootstrap_dev() self.copy_puppet() self._bootstrap_puppet(force=True) for setup_item in self.SETUP_LIST: self.report(' .. setup_list[{0}]: "{1}"'.format( self.SETUP_LIST.index(setup_item), setup_item)) util._run_puppet( setup_item, puppet_dir='puppet', facts=self.facts, debug=self.YMIR_DEBUG, ) self.report("Setup complete. Now run `fab provision`")
def setup_ip(self, ip): self.sync_tags() self.sync_buckets() self.sync_eips() self.report('installing puppet & puppet deps', section=True) self._clean_tmp_dir() with self.ssh_ctx(): with lcd(self._ymir_service_root): self._update_sys_packages() self._bootstrap_dev() self.copy_puppet() self._bootstrap_puppet(force=True) for setup_item in self.SETUP_LIST: self.report(' .. setup_list[{0}]: "{1}"'.format( self.SETUP_LIST.index(setup_item), setup_item )) util._run_puppet( setup_item, puppet_dir='puppet', facts=self.facts, debug=self.YMIR_DEBUG,) self.report("Setup complete. Now run `fab provision`")