use of com.sequenceiq.cloudbreak.template.model.GeneralClusterConfigs in project cloudbreak by hortonworks.
the class RecipeTestUtil method generalClusterConfigs.
public static GeneralClusterConfigs generalClusterConfigs() {
GeneralClusterConfigs generalClusterConfigs = new GeneralClusterConfigs();
generalClusterConfigs.setClusterManagerIp("10.1.1.1");
generalClusterConfigs.setInstanceGroupsPresented(true);
generalClusterConfigs.setGatewayInstanceMetadataPresented(false);
generalClusterConfigs.setClusterName("clustername");
generalClusterConfigs.setStackName("clustername");
generalClusterConfigs.setUuid("111-222-333-444");
generalClusterConfigs.setUserName("username");
generalClusterConfigs.setPassword("Passw0rd");
generalClusterConfigs.setNodeCount(1);
generalClusterConfigs.setPrimaryGatewayInstanceDiscoveryFQDN(Optional.of("fqdn.loal.com"));
generalClusterConfigs.setIdentityUserEmail(IDENTITY_USER_EMAIL);
return generalClusterConfigs;
}
use of com.sequenceiq.cloudbreak.template.model.GeneralClusterConfigs in project cloudbreak by hortonworks.
the class RecipeTestUtil method generalClusterConfigs.
public static GeneralClusterConfigs generalClusterConfigs(Cluster cluster) {
GeneralClusterConfigs generalClusterConfigs = new GeneralClusterConfigs();
generalClusterConfigs.setClusterManagerIp(cluster.getClusterManagerIp());
generalClusterConfigs.setInstanceGroupsPresented(true);
generalClusterConfigs.setGatewayInstanceMetadataPresented(true);
generalClusterConfigs.setClusterName(cluster.getName());
generalClusterConfigs.setStackName(cluster.getName());
generalClusterConfigs.setUuid("111-222-333-444");
generalClusterConfigs.setUserName(cluster.getUserName());
generalClusterConfigs.setPassword(cluster.getPassword());
generalClusterConfigs.setNodeCount(1);
generalClusterConfigs.setIdentityUserEmail(IDENTITY_USER_EMAIL);
generalClusterConfigs.setPrimaryGatewayInstanceDiscoveryFQDN(Optional.of("fqdn.loal.com"));
return generalClusterConfigs;
}
use of com.sequenceiq.cloudbreak.template.model.GeneralClusterConfigs in project cloudbreak by hortonworks.
the class CmTemplateProcessorTest method testAddInstantiatorWithBaseRoles.
@Test
public void testAddInstantiatorWithBaseRoles() {
underTest = new CmTemplateProcessor(getBlueprintText("input/clouderamanager.bp"));
ClouderaManagerRepo clouderaManagerRepoDetails = new ClouderaManagerRepo();
clouderaManagerRepoDetails.setVersion(CMRepositoryVersionUtil.CLOUDERAMANAGER_VERSION_6_3_0.getVersion());
GeneralClusterConfigs generalClusterConfigs = new GeneralClusterConfigs();
generalClusterConfigs.setClusterName("cluster");
TemplatePreparationObject.Builder tpoBuilder = new TemplatePreparationObject.Builder().withGeneralClusterConfigs(generalClusterConfigs);
TemplatePreparationObject templatePreparationObject = tpoBuilder.build();
underTest.addInstantiator(clouderaManagerRepoDetails, templatePreparationObject, "dszabo-sdx");
ApiClusterTemplateInstantiator instantiator = underTest.getTemplate().getInstantiator();
List<ApiClusterTemplateRoleConfigGroupInfo> roleConfigGroups = instantiator.getRoleConfigGroups();
List<String> refNames = roleConfigGroups.stream().map(ApiClusterTemplateRoleConfigGroupInfo::getRcgRefName).collect(Collectors.toList());
assertEquals(2, refNames.size());
assertTrue(refNames.containsAll(List.of("yarn-NODEMANAGER-BASE", "hdfs-DATANODE-BASE")));
assertEquals("cluster", instantiator.getClusterName());
}
use of com.sequenceiq.cloudbreak.template.model.GeneralClusterConfigs in project cloudbreak by hortonworks.
the class CmTemplateProcessorTest method addInstantiatorKeepsCustomClusterName.
@Test
public void addInstantiatorKeepsCustomClusterName() {
underTest = new CmTemplateProcessor(getBlueprintText("input/clouderamanager-custom_cluster_name.bp"));
GeneralClusterConfigs generalClusterConfigs = new GeneralClusterConfigs();
generalClusterConfigs.setClusterName("cluster");
TemplatePreparationObject templatePreparationObject = new TemplatePreparationObject.Builder().withGeneralClusterConfigs(generalClusterConfigs).build();
underTest.addInstantiator(null, templatePreparationObject, null);
ApiClusterTemplateInstantiator instantiator = underTest.getTemplate().getInstantiator();
assertEquals("kusztom", instantiator.getClusterName());
}
use of com.sequenceiq.cloudbreak.template.model.GeneralClusterConfigs in project cloudbreak by hortonworks.
the class HiveServer2ConfigProviderTest method getTemplatePreparationObject.
private TemplatePreparationObject getTemplatePreparationObject() {
HostgroupView master = new HostgroupView("master", 1, InstanceGroupType.GATEWAY, 1);
HostgroupView worker = new HostgroupView("worker", 2, InstanceGroupType.CORE, 2);
GeneralClusterConfigs generalClusterConfigs = new GeneralClusterConfigs();
generalClusterConfigs.setUuid("uuid");
return Builder.builder().withGeneralClusterConfigs(generalClusterConfigs).withHostgroupViews(Set.of(master, worker)).build();
}
Aggregations