Exemple #1
0
 def build_nodes(self):
     """Builds each node."""
     logger.info("Building controllers...")
     for node in self.controllers:
         node.build()
     logger.info("Building the rest of the nodes.")
     threading.execute(node.build for node in self.misc_nodes)
     self.status = "Nodes built!"
Exemple #2
0
 def add_nodes(self, node_request):
     logger.info("Adding nodes...")
     additional_nodes = self.acquire_nodes(node_request)
     self.nodes.extend(additional_nodes)
     self.nodes.sort(key=lambda node: node.name)
     chefserver = self.first_node_with_role('chefserver')
     chefserver.feature('chefserver').remote_other_nodes()
     threading.execute(node.build for node in additional_nodes)
     self.update()
Exemple #3
0
 def acquire_nodes(self, specs):
     active.node_names = set(self.node_names)
     func_list = [partial(self.provisioner.build_node, self, spec)
                  for spec in specs]
     nodes = threading.execute(func_list)
     assert nodes is not None
     nodes.sort(key=lambda node: node.name)
     return nodes