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);
}
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();
}
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();
}
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();
}
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");
}
Aggregations