def deploy_by_astute(self, config): print "config.yaml:", config config_path = "/root/config.yaml" write_config(self.remote(), config_path, str(config)) self.remote().check_call("cobbler_system -f %s" % config_path) self.remote().check_stderr("openstack_system -c %s -o /etc/puppet/manifests/site.pp -a /root/astute.yaml" % config_path, True) self.remote().check_stderr("astute -f /root/astute.yaml -v", True)
def get_nodes_deployed_state(self): """ Get or prepare vms(nodes) state: update modules on master node write /root/fuel.defaults install OS (cobbler) """ if not self.environment().has_snapshot("nodes-deployed"): self.ci().get_empty_state() self.update_modules() self.remote().execute("killall bootstrap_admin_node.sh") write_config( self.remote(), "/root/fuel.defaults", iso_master.get_config( hostname="master", domain="localdomain", management_interface=INTERFACES["internal"], management_ip=self.nodes().masters[0].get_ip_address_by_network_name("internal"), management_mask=self.ci().internal_net_mask(), external_interface=INTERFACES["public"], dhcp_start_address=IPNetwork(self.ci().internal_network())[50], dhcp_end_address=IPNetwork(self.ci().internal_network())[100], mirror_type="default", external_ip="", external_mask="", parent_proxy=PARENT_PROXY, puppet_master_version=PUPPET_MASTER_VERSION, ), ) self.remote().execute("/usr/local/sbin/bootstrap_admin_node.sh --batch-mode") self.prepare_cobbler_environment() self.environment().revert("nodes-deployed") for node in self.nodes(): node.await("internal")
def setup_agent_nodes(self, nodes): """ Make the basic settings for default vm(node). """ agent_config = load(root('fuel-test', 'config', 'puppet.agent.config')) for node in nodes: if node.name != 'master': remote = node.remote('public', login='******', password='******') self.add_nodes_to_hosts(remote, self.environment().nodes) setup_puppet_client(remote) write_config(remote, '/etc/puppet/puppet.conf', agent_config) request_cerificate(remote)
def prepare_astute(self): config = Config().generate( template=Template.single(), ci=self.ci(), nodes=self.ci().nodes().controllers[:1], quantum=False ) print "Generated config.yaml:", config config_path = "/root/config.yaml" write_config(self.remote(), config_path, str(config)) self.remote().check_call("cobbler_system -f %s" % config_path) self.remote().check_stderr("openstack_system -c %s -o /etc/puppet/manifests/site.pp -a /root/astute.yaml" % config_path, True)
def prepare_astute(self): """ Prepare config files for astute. """ config = Config().generate( template=Template.minimal(), ci=self.ci(), nodes = self.nodes().controllers + self.nodes().computes, quantums=self.nodes().quantums, quantum=True, cinder_nodes=['controller'] ) print "Generated config.yaml:", config config_path = "/root/config.yaml" write_config(self.remote(), config_path, str(config)) self.remote().check_call("cobbler_system -f %s" % config_path) self.remote().check_stderr("openstack_system -c %s -o /etc/puppet/manifests/site.pp -a /root/astute.yaml" % config_path, True)
def prepare_astute(self): """ Prepare astute config. """ config = Config().generate( ci=self.ci(), nodes=self.nodes(), template=Template.full(), quantums=self.nodes().quantums, swift=False, loopback=False, use_syslog=False, quantum=True ) print "Generated config.yaml:", config config_path = "/root/config.yaml" write_config(self.remote(), config_path, str(config)) self.remote().check_call("cobbler_system -f %s" % config_path) self.remote().check_stderr("openstack_system -c %s -o /etc/puppet/manifests/site.pp -a /root/astute.yaml" % config_path, True)
def write_manifest(cls, remote, manifest): write_config( remote, '/etc/puppet/manifests/site.pp', str(manifest))