Search in sources :

Example 21 with Stack

use of com.sequenceiq.cloudbreak.domain.stack.Stack in project cloudbreak by hortonworks.

the class ClusterBuilderService method autoConfigureCluster.

public void autoConfigureCluster(Long stackId) throws CloudbreakException, ClusterClientInitException {
    Stack stack = stackService.getByIdWithListsInTransaction(stackId);
    getClusterSetupService(stack).autoConfigureClusterManager();
}
Also used : Stack(com.sequenceiq.cloudbreak.domain.stack.Stack)

Example 22 with Stack

use of com.sequenceiq.cloudbreak.domain.stack.Stack in project cloudbreak by hortonworks.

the class ClusterBuilderService method configureKerberos.

public void configureKerberos(Long stackId) throws CloudbreakException {
    Stack stack = stackService.getByIdWithListsInTransaction(stackId);
    getClusterSetupService(stackId).configureKerberos(kerberosConfigService.get(stack.getEnvironmentCrn(), stack.getName()).orElse(null));
}
Also used : Stack(com.sequenceiq.cloudbreak.domain.stack.Stack)

Example 23 with Stack

use of com.sequenceiq.cloudbreak.domain.stack.Stack in project cloudbreak by hortonworks.

the class ClusterBuilderService method prepareExtendedTemplate.

public void prepareExtendedTemplate(Long stackId) {
    Stack stack = stackService.getByIdWithListsInTransaction(stackId);
    Cluster cluster = stack.getCluster();
    Set<HostGroup> hostGroups = hostGroupService.getByClusterWithRecipes(cluster.getId());
    setInitialBlueprintText(cluster);
    String template = getClusterSetupService(stack).prepareTemplate(loadInstanceMetadataForHostGroups(hostGroups), stackToTemplatePreparationObjectConverter.convert(stack), getSdxContextOptional(stack.getDatalakeCrn()).orElse(null), stack.getDatalakeCrn(), kerberosConfigService.get(stack.getEnvironmentCrn(), stack.getName()).orElse(null));
    validateExtendedBlueprintTextDoesNotContainUnresolvedHandlebarParams(template);
    cluster.setExtendedBlueprintText(template);
    clusterService.save(cluster);
}
Also used : Cluster(com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster) HostGroup(com.sequenceiq.cloudbreak.domain.stack.cluster.host.HostGroup) Stack(com.sequenceiq.cloudbreak.domain.stack.Stack)

Example 24 with Stack

use of com.sequenceiq.cloudbreak.domain.stack.Stack in project cloudbreak by hortonworks.

the class ClusterUpscaleService method ensureComponentsAreStopped.

public void ensureComponentsAreStopped(Long stackId, Map<String, String> components, String hostname) throws CloudbreakException {
    Stack stack = stackService.getByIdWithListsInTransaction(stackId);
    LOGGER.info("Ensuring components are in stopped state in ambari on host {}", hostname);
    getClusterConnector(stack).ensureComponentsAreStopped(components, hostname);
}
Also used : Stack(com.sequenceiq.cloudbreak.domain.stack.Stack)

Example 25 with Stack

use of com.sequenceiq.cloudbreak.domain.stack.Stack in project cloudbreak by hortonworks.

the class ClusterUpscaleService method executePostRecipesOnNewHosts.

public void executePostRecipesOnNewHosts(Long stackId) throws CloudbreakException {
    Stack stack = stackService.getByIdWithListsInTransaction(stackId);
    LOGGER.debug("Start executing post recipes");
    recipeEngine.executePostInstallRecipes(stack, hostGroupService.getByClusterWithRecipes(stack.getCluster().getId()));
}
Also used : Stack(com.sequenceiq.cloudbreak.domain.stack.Stack)

Aggregations

Stack (com.sequenceiq.cloudbreak.domain.stack.Stack)1041 Test (org.junit.jupiter.api.Test)326 Cluster (com.sequenceiq.cloudbreak.domain.stack.cluster.Cluster)255 Test (org.junit.Test)208 InstanceMetaData (com.sequenceiq.cloudbreak.domain.stack.instance.InstanceMetaData)158 Map (java.util.Map)114 DetailedEnvironmentResponse (com.sequenceiq.environment.api.v1.environment.model.response.DetailedEnvironmentResponse)113 InstanceGroup (com.sequenceiq.cloudbreak.domain.stack.instance.InstanceGroup)112 ParameterizedTest (org.junit.jupiter.params.ParameterizedTest)111 List (java.util.List)101 Set (java.util.Set)101 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)100 Collectors (java.util.stream.Collectors)84 Optional (java.util.Optional)83 HashSet (java.util.HashSet)82 Inject (javax.inject.Inject)80 Logger (org.slf4j.Logger)78 LoggerFactory (org.slf4j.LoggerFactory)78 DetailedStackStatus (com.sequenceiq.cloudbreak.api.endpoint.v4.common.DetailedStackStatus)69 StackStatus (com.sequenceiq.cloudbreak.domain.stack.StackStatus)67