Search in sources :

Example 1 with FlavorConfigBuilder

use of com.yahoo.vespa.hosted.provision.provisioning.FlavorConfigBuilder in project vespa by vespa-engine.

the class NodeRepositoryTester method createConfig.

private FlavorsConfig createConfig() {
    FlavorConfigBuilder b = new FlavorConfigBuilder();
    b.addFlavor("default", 2., 4., 100, Flavor.Type.BARE_METAL).cost(3);
    b.addFlavor("small", 1., 2., 50, Flavor.Type.BARE_METAL).cost(2);
    b.addFlavor("docker", 1., 2., 50, Flavor.Type.DOCKER_CONTAINER).cost(1);
    return b.build();
}
Also used : FlavorConfigBuilder(com.yahoo.vespa.hosted.provision.provisioning.FlavorConfigBuilder)

Example 2 with FlavorConfigBuilder

use of com.yahoo.vespa.hosted.provision.provisioning.FlavorConfigBuilder in project vespa by vespa-engine.

the class RetireIPv4OnlyNodesTest method initFlavors.

private List<Flavor> initFlavors() {
    FlavorConfigBuilder flavorConfigBuilder = new FlavorConfigBuilder();
    flavorConfigBuilder.addFlavor("default", 1., /* cpu*/
    3., /* mem GB*/
    2., /*disk GB*/
    Flavor.Type.BARE_METAL);
    flavorConfigBuilder.addFlavor("vm", 1., /* cpu*/
    3., /* mem GB*/
    2., /*disk GB*/
    Flavor.Type.VIRTUAL_MACHINE);
    return flavorConfigBuilder.build().flavor().stream().map(Flavor::new).collect(Collectors.toList());
}
Also used : FlavorConfigBuilder(com.yahoo.vespa.hosted.provision.provisioning.FlavorConfigBuilder)

Example 3 with FlavorConfigBuilder

use of com.yahoo.vespa.hosted.provision.provisioning.FlavorConfigBuilder in project vespa by vespa-engine.

the class MockNodeFlavors method createConfig.

private static FlavorsConfig createConfig() {
    FlavorConfigBuilder b = new FlavorConfigBuilder();
    b.addFlavor("default", 2., 16., 400, Flavor.Type.BARE_METAL);
    b.addFlavor("medium-disk", 6., 12., 56, Flavor.Type.BARE_METAL);
    b.addFlavor("large", 4., 32., 1600, Flavor.Type.BARE_METAL);
    b.addFlavor("docker", 0.2, 0.5, 100, Flavor.Type.DOCKER_CONTAINER);
    b.addFlavor("v-4-8-100", 4.0, 8.0, 100, Flavor.Type.VIRTUAL_MACHINE);
    FlavorsConfig.Flavor.Builder largeVariant = b.addFlavor("large-variant", 64, 128, 2000, Flavor.Type.BARE_METAL);
    b.addReplaces("large", largeVariant);
    FlavorsConfig.Flavor.Builder expensiveFlavor = b.addFlavor("expensive", 6, 12, 500, Flavor.Type.BARE_METAL);
    b.addReplaces("default", expensiveFlavor);
    b.addCost(200, expensiveFlavor);
    return b.build();
}
Also used : FlavorConfigBuilder(com.yahoo.vespa.hosted.provision.provisioning.FlavorConfigBuilder) Flavor(com.yahoo.config.provision.Flavor)

Aggregations

FlavorConfigBuilder (com.yahoo.vespa.hosted.provision.provisioning.FlavorConfigBuilder)3 Flavor (com.yahoo.config.provision.Flavor)1