Search in sources :

Example 26 with BlueprintView

use of com.sequenceiq.cloudbreak.template.views.BlueprintView in project cloudbreak by hortonworks.

the class BlueprintViewProvider method getBlueprintView.

public BlueprintView getBlueprintView(@Nonnull Blueprint blueprint) {
    String blueprintText = blueprint.getBlueprintText();
    BlueprintStackInfo blueprintStackInfo = stackInfoService.blueprintStackInfo(blueprintText);
    BlueprintTextProcessor processor = blueprintTextProcessorFactory.createBlueprintTextProcessor(blueprintText);
    return new BlueprintView(blueprintText, blueprintStackInfo.getVersion(), blueprintStackInfo.getType(), processor);
}
Also used : BlueprintStackInfo(com.sequenceiq.cloudbreak.template.model.BlueprintStackInfo) BlueprintTextProcessor(com.sequenceiq.cloudbreak.template.processor.BlueprintTextProcessor) BlueprintView(com.sequenceiq.cloudbreak.template.views.BlueprintView)

Example 27 with BlueprintView

use of com.sequenceiq.cloudbreak.template.views.BlueprintView in project cloudbreak by hortonworks.

the class SchemaRegistryServiceConfigProviderTest method getTemplatePreparationObject.

private TemplatePreparationObject getTemplatePreparationObject(CmTemplateProcessor cmTemplateProcessor) {
    HostgroupView master = new HostgroupView("master", 1, InstanceGroupType.GATEWAY, 1);
    HostgroupView worker = new HostgroupView("worker", 2, InstanceGroupType.CORE, 3);
    BlueprintView blueprintView = new BlueprintView(null, null, null, cmTemplateProcessor);
    RDSConfig rdsConfig = new RDSConfig();
    rdsConfig.setType(DatabaseType.REGISTRY.toString());
    rdsConfig.setDatabaseEngine(DatabaseVendor.POSTGRES);
    rdsConfig.setConnectionURL("jdbc:postgresql://testhost:5432/schema_registry");
    rdsConfig.setConnectionUserName("schema_registry_server");
    rdsConfig.setConnectionPassword("schema_registry_server_password");
    return TemplatePreparationObject.Builder.builder().withBlueprintView(blueprintView).withHostgroupViews(Set.of(master, worker)).withRdsConfigs(Set.of(rdsConfig)).build();
}
Also used : BlueprintView(com.sequenceiq.cloudbreak.template.views.BlueprintView) RDSConfig(com.sequenceiq.cloudbreak.domain.RDSConfig) HostgroupView(com.sequenceiq.cloudbreak.template.views.HostgroupView)

Example 28 with BlueprintView

use of com.sequenceiq.cloudbreak.template.views.BlueprintView in project cloudbreak by hortonworks.

the class StreamsMessagingManagerServiceConfigProviderTest method getTemplatePreparationObject.

private TemplatePreparationObject getTemplatePreparationObject(String internalFqdn, boolean ssl, CmTemplateProcessor cmTemplateProcessor) {
    HostgroupView master = new HostgroupView("master", 1, InstanceGroupType.GATEWAY, 1);
    HostgroupView worker = new HostgroupView("worker", 2, InstanceGroupType.CORE, 3);
    BlueprintView blueprintView = new BlueprintView(null, null, null, cmTemplateProcessor);
    RDSConfig rdsConfig = new RDSConfig();
    rdsConfig.setType(DatabaseType.STREAMS_MESSAGING_MANAGER.toString());
    rdsConfig.setDatabaseEngine(DatabaseVendor.POSTGRES);
    rdsConfig.setConnectionURL("jdbc:postgresql://testhost:5432/smm");
    rdsConfig.setConnectionUserName("smm_server");
    rdsConfig.setConnectionPassword("smm_server_db_password");
    return TemplatePreparationObject.Builder.builder().withBlueprintView(blueprintView).withHostgroupViews(Set.of(master, worker)).withRdsConfigs(Set.of(rdsConfig)).build();
}
Also used : BlueprintView(com.sequenceiq.cloudbreak.template.views.BlueprintView) RDSConfig(com.sequenceiq.cloudbreak.domain.RDSConfig) HostgroupView(com.sequenceiq.cloudbreak.template.views.HostgroupView)

Example 29 with BlueprintView

use of com.sequenceiq.cloudbreak.template.views.BlueprintView in project cloudbreak by hortonworks.

the class SqlStreamBuilderSnapperDatabaseConfigProviderTest method initTemplatePreparationObject.

private TemplatePreparationObject initTemplatePreparationObject(CmTemplateProcessor cmTemplateProcessor) {
    HostgroupView manager = new HostgroupView("manager", 1, InstanceGroupType.GATEWAY, 1);
    HostgroupView master = new HostgroupView("master", 1, InstanceGroupType.CORE, 2);
    HostgroupView worker = new HostgroupView("worker", 2, InstanceGroupType.CORE, 3);
    BlueprintView blueprintView = new BlueprintView(null, null, null, cmTemplateProcessor);
    RDSConfig rdsConfig = new RDSConfig();
    rdsConfig.setType(DatabaseType.SQL_STREAM_BUILDER_SNAPPER.toString());
    rdsConfig.setDatabaseEngine(DatabaseVendor.POSTGRES);
    rdsConfig.setConnectionDriver(DatabaseVendor.POSTGRES.connectionDriver());
    rdsConfig.setConnectionURL("jdbc:postgresql://testhost:5432/eventador_snapper");
    rdsConfig.setConnectionUserName("ssb_test_user");
    rdsConfig.setConnectionPassword("ssb_test_pw");
    return TemplatePreparationObject.Builder.builder().withBlueprintView(blueprintView).withHostgroupViews(Set.of(manager, master, worker)).withRdsConfigs(Set.of(rdsConfig)).build();
}
Also used : BlueprintView(com.sequenceiq.cloudbreak.template.views.BlueprintView) RDSConfig(com.sequenceiq.cloudbreak.domain.RDSConfig) HostgroupView(com.sequenceiq.cloudbreak.template.views.HostgroupView)

Example 30 with BlueprintView

use of com.sequenceiq.cloudbreak.template.views.BlueprintView in project cloudbreak by hortonworks.

the class CmHostGroupRoleConfigProviderProcessorTest method setup.

private void setup(String path, TemplatePreparationObject.Builder builder) {
    String blueprintText = getBlueprintText(path);
    templateProcessor = new CmTemplateProcessor(blueprintText);
    templatePreparator = builder.withBlueprintView(new BlueprintView(blueprintText, "CDP", "1.0", templateProcessor)).withGeneralClusterConfigs(new GeneralClusterConfigs()).build();
    templateProcessor.addInstantiator(null, templatePreparator, "sdx");
}
Also used : GeneralClusterConfigs(com.sequenceiq.cloudbreak.template.model.GeneralClusterConfigs) BlueprintView(com.sequenceiq.cloudbreak.template.views.BlueprintView)

Aggregations

BlueprintView (com.sequenceiq.cloudbreak.template.views.BlueprintView)46 TemplatePreparationObject (com.sequenceiq.cloudbreak.template.TemplatePreparationObject)32 GeneralClusterConfigs (com.sequenceiq.cloudbreak.template.model.GeneralClusterConfigs)19 ApiClusterTemplateConfig (com.cloudera.api.swagger.model.ApiClusterTemplateConfig)15 CmTemplateProcessor (com.sequenceiq.cloudbreak.cmtemplate.CmTemplateProcessor)14 HostgroupView (com.sequenceiq.cloudbreak.template.views.HostgroupView)14 Test (org.junit.jupiter.api.Test)14 RDSConfig (com.sequenceiq.cloudbreak.domain.RDSConfig)13 BlueprintTextProcessor (com.sequenceiq.cloudbreak.template.processor.BlueprintTextProcessor)13 Test (org.junit.Test)13 Gateway (com.sequenceiq.cloudbreak.domain.stack.cluster.gateway.Gateway)11 ClouderaManagerRepo (com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerRepo)9 Builder (com.sequenceiq.cloudbreak.template.TemplatePreparationObject.Builder)9 VirtualGroupRequest (com.sequenceiq.cloudbreak.auth.altus.VirtualGroupRequest)8 ArgumentMatchers.anyString (org.mockito.ArgumentMatchers.anyString)8 ClouderaManagerProduct (com.sequenceiq.cloudbreak.cloud.model.ClouderaManagerProduct)7 HashSet (java.util.HashSet)7 IdBroker (com.sequenceiq.cloudbreak.domain.stack.cluster.IdBroker)6 ApiClusterTemplateVariable (com.cloudera.api.swagger.model.ApiClusterTemplateVariable)5 DatalakeView (com.sequenceiq.cloudbreak.template.views.DatalakeView)5