use of com.sequenceiq.cloudbreak.orchestrator.host.OrchestratorStateParams in project cloudbreak by hortonworks.
the class UpgradeCcmOrchestratorService method applyUpgradeState.
public void applyUpgradeState(Long stackId) throws CloudbreakOrchestratorException {
OrchestratorStateParams stateParams = createStateParams(stackId, UPGRADE_CCM_STATE);
LOGGER.debug("Calling applyUpgradeState with state params '{}'", stateParams);
hostOrchestrator.runOrchestratorState(stateParams);
}
use of com.sequenceiq.cloudbreak.orchestrator.host.OrchestratorStateParams in project cloudbreak by hortonworks.
the class UpgradeCcmOrchestratorService method disableMina.
public void disableMina(Long stackId) throws CloudbreakOrchestratorException {
OrchestratorStateParams stateParams = createStateParams(stackId, DISABLE_MINA_STATE);
LOGGER.debug("Calling disableMina with state params '{}'", stateParams);
hostOrchestrator.runOrchestratorState(stateParams);
}
use of com.sequenceiq.cloudbreak.orchestrator.host.OrchestratorStateParams in project cloudbreak by hortonworks.
the class UpgradeCcmOrchestratorService method createStateParams.
private OrchestratorStateParams createStateParams(Long stackId, String saltState) {
Stack stack = stackService.getByIdWithListsInTransaction(stackId);
Set<InstanceMetaData> instanceMetaDatas = stack.getNotDeletedInstanceMetaDataSet();
Set<Node> allNodes = freeIpaNodeUtilService.mapInstancesToNodes(instanceMetaDatas);
OrchestratorStateParams stateParams = new OrchestratorStateParams();
stateParams.setState(saltState);
stateParams.setPrimaryGatewayConfig(gatewayConfigService.getPrimaryGatewayConfig(stack));
stateParams.setTargetHostNames(allNodes.stream().map(Node::getHostname).collect(Collectors.toSet()));
stateParams.setAllNodes(allNodes);
stateParams.setExitCriteriaModel(new StackBasedExitCriteriaModel(stack.getId()));
return stateParams;
}
use of com.sequenceiq.cloudbreak.orchestrator.host.OrchestratorStateParams in project cloudbreak by hortonworks.
the class UpgradeCcmOrchestratorService method disableInvertingProxyAgent.
public void disableInvertingProxyAgent(Long stackId) throws CloudbreakOrchestratorException {
OrchestratorStateParams stateParams = createStateParams(stackId, DISABLE_INVERTING_PROXY_AGENT_STATE);
LOGGER.debug("Calling disableInvertingProxyAgent with state params '{}'", stateParams);
hostOrchestrator.runOrchestratorState(stateParams);
}
use of com.sequenceiq.cloudbreak.orchestrator.host.OrchestratorStateParams in project cloudbreak by hortonworks.
the class UpgradeCcmOrchestratorService method createStateParams.
private OrchestratorStateParams createStateParams(Long stackId, String saltState) {
Stack stack = stackService.getByIdWithListsInTransaction(stackId);
Set<Node> gatewayNodes = stackUtil.collectGatewayNodes(stack);
OrchestratorStateParams stateParams = new OrchestratorStateParams();
stateParams.setState(saltState);
stateParams.setPrimaryGatewayConfig(gatewayConfigService.getPrimaryGatewayConfig(stack));
stateParams.setTargetHostNames(gatewayNodes.stream().map(Node::getHostname).collect(Collectors.toSet()));
stateParams.setAllNodes(gatewayNodes);
stateParams.setExitCriteriaModel(new ClusterDeletionBasedExitCriteriaModel(stack.getId(), stack.getCluster().getId()));
return stateParams;
}
Aggregations