Search in sources :

Example 1 with RdsView

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

the class BlueprintTemplateModelContextBuilder method withRdsConfigs.

public BlueprintTemplateModelContextBuilder withRdsConfigs(Iterable<RDSConfig> rdsConfigs) {
    for (RDSConfig rdsConfig : rdsConfigs) {
        if (rdsConfig != null) {
            RdsView rdsView = new RdsView(rdsConfig);
            String componentName = rdsConfig.getType().toLowerCase();
            this.rds.put(componentName, rdsView);
        }
    }
    return this;
}
Also used : RDSConfig(com.sequenceiq.cloudbreak.domain.RDSConfig) RdsView(com.sequenceiq.cloudbreak.blueprint.template.views.RdsView)

Example 2 with RdsView

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

the class ClusterHostServiceRunner method decoratePillarWithAmbariDatabase.

private void decoratePillarWithAmbariDatabase(Cluster cluster, Map<String, SaltPillarProperties> servicePillar) throws CloudbreakOrchestratorFailedException {
    RDSConfig ambariRdsConfig = rdsConfigService.findByClusterIdAndType(cluster.getOwner(), cluster.getAccount(), cluster.getId(), RdsType.AMBARI);
    if (ambariRdsConfig == null) {
        throw new CloudbreakOrchestratorFailedException("Ambari RDSConfig is missing for stack");
    }
    RdsView ambariRdsView = new RdsView(ambariRdsConfig);
    servicePillar.put("ambari-database", new SaltPillarProperties("/ambari/database.sls", singletonMap("ambari", singletonMap("database", ambariRdsView))));
}
Also used : CloudbreakOrchestratorFailedException(com.sequenceiq.cloudbreak.orchestrator.exception.CloudbreakOrchestratorFailedException) RDSConfig(com.sequenceiq.cloudbreak.domain.RDSConfig) RdsView(com.sequenceiq.cloudbreak.blueprint.template.views.RdsView) SaltPillarProperties(com.sequenceiq.cloudbreak.orchestrator.model.SaltPillarProperties)

Aggregations

RdsView (com.sequenceiq.cloudbreak.blueprint.template.views.RdsView)2 RDSConfig (com.sequenceiq.cloudbreak.domain.RDSConfig)2 CloudbreakOrchestratorFailedException (com.sequenceiq.cloudbreak.orchestrator.exception.CloudbreakOrchestratorFailedException)1 SaltPillarProperties (com.sequenceiq.cloudbreak.orchestrator.model.SaltPillarProperties)1