use of com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerRepo in project cloudbreak by hortonworks.
the class RangerRazDatalakeConfigProviderTest method getAdditionalServicesWhenRazIsEnabledWithCm721AndAws.
@Test
@DisplayName("CM 7.2.1 DL is used and Raz is requested, AWS, no additional service needs to be added to the template")
void getAdditionalServicesWhenRazIsEnabledWithCm721AndAws() {
ClouderaManagerRepo cmRepo = new ClouderaManagerRepo();
cmRepo.setVersion("7.2.1");
GeneralClusterConfigs generalClusterConfigs = new GeneralClusterConfigs();
generalClusterConfigs.setEnableRangerRaz(true);
HostgroupView master = new HostgroupView("master", 0, InstanceGroupType.GATEWAY, List.of());
HostgroupView idbroker = new HostgroupView("idbroker", 0, InstanceGroupType.CORE, List.of());
TemplatePreparationObject preparationObject = Builder.builder().withStackType(StackType.DATALAKE).withCloudPlatform(CloudPlatform.AWS).withProductDetails(cmRepo, List.of()).withGeneralClusterConfigs(generalClusterConfigs).withHostgroupViews(Set.of(master, idbroker)).build();
Map<String, ApiClusterTemplateService> additionalServices = configProvider.getAdditionalServices(cmTemplateProcessor, preparationObject);
assertEquals(0, additionalServices.size());
}
use of com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerRepo in project cloudbreak by hortonworks.
the class RangerRazDatalakeConfigProviderTest method getAdditionalServicesWhenRazIsEnabledWithCm720.
@ParameterizedTest(name = "{0}")
@MethodSource("razCloudPlatformDataProvider")
@DisplayName("CM 7.2.0 DL is used and Raz is requested, no additional service needs to be added to the template")
void getAdditionalServicesWhenRazIsEnabledWithCm720(String testCaseName, CloudPlatform cloudPlatform) {
ClouderaManagerRepo cmRepo = new ClouderaManagerRepo();
cmRepo.setVersion("7.2.0");
GeneralClusterConfigs generalClusterConfigs = new GeneralClusterConfigs();
generalClusterConfigs.setEnableRangerRaz(true);
HostgroupView master = new HostgroupView("master", 0, InstanceGroupType.GATEWAY, List.of());
HostgroupView idbroker = new HostgroupView("idbroker", 0, InstanceGroupType.CORE, List.of());
TemplatePreparationObject preparationObject = Builder.builder().withStackType(StackType.DATALAKE).withCloudPlatform(cloudPlatform).withProductDetails(cmRepo, List.of()).withGeneralClusterConfigs(generalClusterConfigs).withHostgroupViews(Set.of(master, idbroker)).build();
Map<String, ApiClusterTemplateService> additionalServices = configProvider.getAdditionalServices(cmTemplateProcessor, preparationObject);
assertEquals(0, additionalServices.size());
}
use of com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerRepo in project cloudbreak by hortonworks.
the class RangerRazDatalakeConfigProviderTest method getAdditionalServicesWhenRazIsEnabledAndDataHub.
@ParameterizedTest(name = "{0}")
@MethodSource("razCloudPlatformDataProvider")
@DisplayName("CM 7.2.0 DL is used and Raz is requested, but Data Hub, no additional service needs to be added to the template")
void getAdditionalServicesWhenRazIsEnabledAndDataHub(String testCaseName, CloudPlatform cloudPlatform) {
ClouderaManagerRepo cmRepo = new ClouderaManagerRepo();
cmRepo.setVersion("7.2.0");
GeneralClusterConfigs generalClusterConfigs = new GeneralClusterConfigs();
HostgroupView master = new HostgroupView("master", 0, InstanceGroupType.GATEWAY, List.of());
HostgroupView worker = new HostgroupView("worker", 0, InstanceGroupType.CORE, List.of());
TemplatePreparationObject preparationObject = Builder.builder().withStackType(StackType.WORKLOAD).withCloudPlatform(cloudPlatform).withProductDetails(cmRepo, List.of()).withDataLakeView(new DatalakeView(true)).withGeneralClusterConfigs(generalClusterConfigs).withHostgroupViews(Set.of(master, worker)).build();
Map<String, ApiClusterTemplateService> additionalServices = configProvider.getAdditionalServices(cmTemplateProcessor, preparationObject);
assertEquals(0, additionalServices.size());
}
use of com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerRepo in project cloudbreak by hortonworks.
the class StackComponentUpdaterTest method getClouderaManagerRepo.
private ClouderaManagerRepo getClouderaManagerRepo() {
ClouderaManagerRepo clouderaManagerRepo = new ClouderaManagerRepo();
clouderaManagerRepo.setBaseUrl("http://public-repo-1.hortonworks.com/cm/centos7/7.2.0/updates/7.2.0");
clouderaManagerRepo.setVersion(TARGET_STACK_VERSION);
return clouderaManagerRepo;
}
use of com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerRepo in project cloudbreak by hortonworks.
the class CmSyncOperationResultEvaluatorServiceTest method testEvaluateCmRepoSyncWhenInstalledVersionAndFoundComponentPresentThenSuccess.
@Test
void testEvaluateCmRepoSyncWhenInstalledVersionAndFoundComponentPresentThenSuccess() {
CmRepoSyncOperationResult cmRepoSyncOperationResult = new CmRepoSyncOperationResult(INSTALLED_CM_VERSION, new ClouderaManagerRepo());
CmSyncOperationStatus.Builder cmSyncOperationStatusBuilder = underTest.evaluateCmRepoSync(cmRepoSyncOperationResult);
CmSyncOperationStatus cmSyncOperationStatus = cmSyncOperationStatusBuilder.build();
assertTrue(cmSyncOperationStatus.hasSucceeded());
assertEquals(String.format("Reading CM repository version succeeded, the current version of CM is %s.", INSTALLED_CM_VERSION), cmSyncOperationStatus.getMessage());
}
Aggregations