use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class NifiRegistryConfigProvider method getServiceConfigs.
@Override
public List<ApiClusterTemplateConfig> getServiceConfigs(CmTemplateProcessor templateProcessor, TemplatePreparationObject source) {
List<ApiClusterTemplateConfig> configList = new ArrayList<>();
String cdhVersion = source.getBlueprintView().getProcessor().getStackVersion() == null ? "" : source.getBlueprintView().getProcessor().getStackVersion();
if (isVersionNewerOrEqualThanLimited(cdhVersion, CLOUDERAMANAGER_VERSION_7_1_0)) {
VirtualGroupRequest virtualGroupRequest = source.getVirtualGroupRequest();
String adminGroup = virtualGroupService.createOrGetVirtualGroup(virtualGroupRequest, UmsVirtualGroupRight.NIFI_REGISTRY_ADMIN);
configList.add(config("nifi.registry.initial.admin.groups", adminGroup));
rangerAutoCompleteConfigProvider.extendServiceConfigs(source, configList);
}
return configList;
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class HueConfigProvider method getServiceConfigs.
@Override
public List<ApiClusterTemplateConfig> getServiceConfigs(CmTemplateProcessor templateProcessor, TemplatePreparationObject source) {
List<ApiClusterTemplateConfig> result = new ArrayList<>();
result.add(new ApiClusterTemplateConfig().name("database_host").variable(HUE_DATABASE_HOST));
result.add(new ApiClusterTemplateConfig().name("database_port").variable(HUE_DATABASE_PORT));
result.add(new ApiClusterTemplateConfig().name("database_name").variable(HUE_DATABASE_NAME));
result.add(new ApiClusterTemplateConfig().name("database_type").variable(HUE_HUE_DATABASE_TYPE));
result.add(new ApiClusterTemplateConfig().name("database_user").variable(HUE_HUE_DATABASE_USER));
result.add(new ApiClusterTemplateConfig().name("database_password").variable(HUE_DATABASE_PASSWORD));
configureKnoxProxyHostsServiceConfig(source, result);
return result;
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class HiveMetastoreConfigProvider method getServiceConfigs.
@Override
public List<ApiClusterTemplateConfig> getServiceConfigs(CmTemplateProcessor templateProcessor, TemplatePreparationObject source) {
RdsView hiveRdsView = getRdsView(source);
List<ApiClusterTemplateConfig> configs = Lists.newArrayList(config(HIVE_METASTORE_DATABASE_HOST, hiveRdsView.getHost()), config(HIVE_METASTORE_DATABASE_NAME, hiveRdsView.getDatabaseName()), config(HIVE_METASTORE_DATABASE_PASSWORD, hiveRdsView.getConnectionPassword()), config(HIVE_METASTORE_DATABASE_PORT, hiveRdsView.getPort()), config(HIVE_METASTORE_DATABASE_TYPE, hiveRdsView.getSubprotocol()), config(HIVE_METASTORE_DATABASE_USER, hiveRdsView.getConnectionUserName()));
String cmVersion = getCmVersion(source);
addDbSslConfigsIfNeeded(templateProcessor, hiveRdsView, configs, cmVersion);
// The Initiator thread in the DataLake's HMS will take care of this.
if (source.getStackType() == StackType.WORKLOAD && isVersionNewerOrEqualThanLimited(cmVersion, CLOUDERAMANAGER_VERSION_7_1_1)) {
configs.add(config(HIVE_COMPACTOR_INITIATOR_ON, Boolean.FALSE.toString()));
}
Optional<KerberosConfig> kerberosConfigOpt = source.getKerberosConfig();
if (kerberosConfigOpt.isPresent()) {
String safetyValveValue = getSafetyValveProperty("hive.hook.proto.file.per.event", Boolean.TRUE.toString());
configs.add(config(HIVE_SERVICE_CONFIG_SAFETY_VALVE, safetyValveValue));
}
if (source.getStackType() == StackType.DATALAKE) {
source.getLdapConfig().ifPresent(ldap -> {
configs.add(config(HIVE_METASTORE_ENABLE_LDAP_AUTH, Boolean.TRUE.toString()));
configs.add(config(HIVE_METASTORE_LDAP_URI, ldap.getConnectionURL()));
configs.add(config(HIVE_METASTORE_LDAP_BASEDN, ldap.getUserSearchBase()));
});
}
return configs;
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class HbaseServiceConfigProvider method getServiceConfigs.
@Override
public List<ApiClusterTemplateConfig> getServiceConfigs(CmTemplateProcessor templateProcessor, TemplatePreparationObject source) {
List<ApiClusterTemplateConfig> configList = new ArrayList<>();
String cmVersion = templateProcessor.getCmVersion().orElse("");
if (isVersionNewerOrEqualThanLimited(cmVersion, CLOUDERAMANAGER_VERSION_7_2_0)) {
VirtualGroupRequest virtualGroupRequest = source.getVirtualGroupRequest();
String adminGroup = virtualGroupService.createOrGetVirtualGroup(virtualGroupRequest, UmsVirtualGroupRight.HBASE_ADMIN);
configList.add(config(SPNEGO_ADMIN_GROUP, adminGroup));
}
return configList;
}
use of com.cloudera.api.swagger.model.ApiClusterTemplateConfig in project cloudbreak by hortonworks.
the class SchemaRegistryServiceConfigProviderTest method testGetSchemaRegistryRoleConfigs720.
@Test
public void testGetSchemaRegistryRoleConfigs720() {
String inputJson = loadBlueprint("7.2.0");
CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson);
TemplatePreparationObject preparationObject = getTemplatePreparationObject(cmTemplateProcessor);
List<ApiClusterTemplateConfig> roleConfigs = underTest.getRoleConfigs(SchemaRegistryRoles.SCHEMA_REGISTRY_SERVER, preparationObject);
assertThat(roleConfigs).hasSameElementsAs(List.of(config(RANGER_PLUGIN_SR_SERVICE_NAME, GENERATED_RANGER_SERVICE_NAME)));
}
Aggregations