use of com.sequenceiq.cloudbreak.template.views.RdsView in project cloudbreak by hortonworks.
the class KnoxServiceConfigProvider method getServiceConfigs.
@Override
public List<ApiClusterTemplateConfig> getServiceConfigs(CmTemplateProcessor templateProcessor, TemplatePreparationObject source) {
List<ApiClusterTemplateConfig> configList = new ArrayList<>();
if (source.getProductDetailsView() != null && isKnoxDatabaseSupported(source.getProductDetailsView().getCm(), getCdhProduct(source), getCdhPatchVersion(source))) {
RdsView knoxGatewayRdsView = getRdsView(source);
configList.add(config(DATABASE_TYPE, knoxGatewayRdsView.getSubprotocol()));
configList.add(config(DATABASE_NAME, knoxGatewayRdsView.getDatabaseName()));
configList.add(config(DATABASE_HOST, knoxGatewayRdsView.getHost()));
configList.add(config(DATABASE_PORT, knoxGatewayRdsView.getPort()));
configList.add(config(DATABASE_USER, knoxGatewayRdsView.getConnectionUserName()));
configList.add(config(DATABASE_PASSWORD, knoxGatewayRdsView.getConnectionPassword()));
}
configList.add(config(KNOX_AUTORESTART_ON_STOP, Boolean.TRUE.toString()));
return configList;
}
use of com.sequenceiq.cloudbreak.template.views.RdsView 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.sequenceiq.cloudbreak.template.views.RdsView in project cloudbreak by hortonworks.
the class ClusterHostServiceRunner method decoratePillarWithClouderaManagerDatabase.
private void decoratePillarWithClouderaManagerDatabase(Cluster cluster, Map<String, SaltPillarProperties> servicePillar) throws CloudbreakOrchestratorFailedException {
RdsConfigWithoutCluster clouderaManagerRdsConfig = rdsConfigWithoutClusterService.findByClusterIdAndType(cluster.getId(), DatabaseType.CLOUDERA_MANAGER);
if (clouderaManagerRdsConfig == null) {
throw new CloudbreakOrchestratorFailedException("Cloudera Manager RDSConfig is missing for stack");
}
RdsView rdsView = new RdsView(clouderaManagerRdsConfig);
servicePillar.put("cloudera-manager-database", new SaltPillarProperties("/cloudera-manager/database.sls", singletonMap("cloudera-manager", singletonMap("database", rdsView))));
}
use of com.sequenceiq.cloudbreak.template.views.RdsView in project cloudbreak by hortonworks.
the class RangerRoleConfigProvider method getServiceConfigs.
@Override
public List<ApiClusterTemplateConfig> getServiceConfigs(CmTemplateProcessor templateProcessor, TemplatePreparationObject source) {
String cmVersion = getCmVersion(source);
List<ApiClusterTemplateConfig> configList = new ArrayList<>();
if (isVersionNewerOrEqualThanLimited(cmVersion, CLOUDERAMANAGER_VERSION_7_2_1)) {
RdsView rangerRdsView = getRdsView(source);
addDbConfigs(rangerRdsView, configList, cmVersion);
configList.add(config(RANGER_DATABASE_PORT, rangerRdsView.getPort()));
}
return configList;
}
use of com.sequenceiq.cloudbreak.template.views.RdsView in project cloudbreak by hortonworks.
the class HueConfigProvider method getServiceConfigVariables.
@Override
public List<ApiClusterTemplateVariable> getServiceConfigVariables(TemplatePreparationObject source) {
List<ApiClusterTemplateVariable> result = new ArrayList<>();
RdsView hueRdsView = getRdsView(source);
result.add(new ApiClusterTemplateVariable().name(HUE_DATABASE_HOST).value(hueRdsView.getHost()));
result.add(new ApiClusterTemplateVariable().name(HUE_DATABASE_PORT).value(hueRdsView.getPort()));
result.add(new ApiClusterTemplateVariable().name(HUE_DATABASE_NAME).value(hueRdsView.getDatabaseName()));
result.add(new ApiClusterTemplateVariable().name(HUE_HUE_DATABASE_TYPE).value(hueRdsView.getSubprotocol()));
result.add(new ApiClusterTemplateVariable().name(HUE_HUE_DATABASE_USER).value(hueRdsView.getConnectionUserName()));
result.add(new ApiClusterTemplateVariable().name(HUE_DATABASE_PASSWORD).value(hueRdsView.getConnectionPassword()));
configureKnoxProxyHostsConfigVariables(source, result);
return result;
}
Aggregations