Example #1
0
 def get_nodes_deployed_state(self):
     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='custom',
                          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')
Example #2
0
 def get_nodes_deployed_state(self):
     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='custom',
                 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')
Example #3
0
 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)
     self.remote().check_stderr("astute -f /root/astute.yaml -v")
Example #4
0
 def setup_agent_nodes(self, nodes):
     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)
Example #5
0
 def setup_agent_nodes(self, nodes):
     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)
Example #6
0
 def setup_agent_nodes(self, nodes):
     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)
Example #7
0
 def test_orchestrating_simple(self):
     Manifest().write_openstack_simple_manifest(
         remote=self.remote(),
         ci=self.ci(),
         controllers=self.nodes().controllers[:1])
     config_text = Astute.config('simple', controllers=self.nodes().controllers[:1],
         computes=self.nodes().computes, quantums=self.nodes().quantums)
     remote = self.nodes().stomps[0].remote('public', login='******',
         password='******')
     write_config(remote, '/tmp/nodes.yaml', config_text)
     remote.check_stderr('astute_run -v -f /tmp/nodes.yaml')
Example #8
0
 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)
Example #9
0
 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)
Example #10
0
 def prepare_astute(self):
     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)
Example #11
0
 def test_orchestrating_minimal(self):
     Manifest().write_openstack_manifest(
         remote=self.remote(),
         template=Template.minimal(), ci=self.ci(),
         controllers=self.nodes().controllers[:2],
         quantums=self.nodes().quantums,
         swift=False,
         quantum=True)
     config_text = Astute.config('minimal', controllers=self.nodes().controllers,
         computes=self.nodes().computes)
     remote = self.nodes().stomps[0].remote('public', login='******',
         password='******')
     write_config(remote, '/tmp/nodes.yaml', config_text)
     remote.check_stderr('astute_run -v -f /tmp/nodes.yaml')
Example #12
0
 def prepare_astute(self):
     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)
Example #13
0
 def prepare_astute(self):
     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)
Example #14
0
 def prepare_astute(self):
     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)
Example #15
0
 def write_manifest(cls, remote, manifest):
     write_config(
         remote, '/etc/puppet/manifests/site.pp',
         str(manifest))
Example #16
0
 def write_manifest(cls, remote, manifest):
     write_config(remote, '/etc/puppet/manifests/site.pp', str(manifest))