Search in sources :

Example 1 with NodeType

use of com.yahoo.config.provision.NodeType in project vespa by vespa-engine.

the class ContainerModelBuilder method createNodesFromNodeType.

private List<Container> createNodesFromNodeType(ContainerCluster cluster, Element nodesElement, ConfigModelContext context) {
    NodeType type = NodeType.valueOf(nodesElement.getAttribute("type"));
    ClusterSpec clusterSpec = ClusterSpec.request(ClusterSpec.Type.container, ClusterSpec.Id.from(cluster.getName()), context.getDeployState().getWantedNodeVespaVersion(), false);
    Map<HostResource, ClusterMembership> hosts = cluster.getRoot().getHostSystem().allocateHosts(clusterSpec, Capacity.fromRequiredNodeType(type), 1, log);
    return createNodesFromHosts(hosts, cluster);
}
Also used : HostResource(com.yahoo.vespa.model.HostResource) ClusterMembership(com.yahoo.config.provision.ClusterMembership) NodeType(com.yahoo.config.provision.NodeType) ClusterSpec(com.yahoo.config.provision.ClusterSpec)

Aggregations

ClusterMembership (com.yahoo.config.provision.ClusterMembership)1 ClusterSpec (com.yahoo.config.provision.ClusterSpec)1 NodeType (com.yahoo.config.provision.NodeType)1 HostResource (com.yahoo.vespa.model.HostResource)1