@Override
protected void doAction(Map<InstanceTemplate, ClusterActionEvent> eventMap)
throws IOException {
for (Entry<InstanceTemplate, ClusterActionEvent> entry : eventMap.entrySet()) {
ClusterSpec clusterSpec = entry.getValue().getClusterSpec();
Cluster cluster = entry.getValue().getCluster();
StatementBuilder statementBuilder = entry.getValue().getStatementBuilder();
ComputeServiceContext computeServiceContext =
ComputeServiceContextBuilder.build(getComputeServiceContextFactory(), clusterSpec);
ComputeService computeService = computeServiceContext.getComputeService();
Credentials credentials = new Credentials(
clusterSpec.getClusterUser(),
clusterSpec.getPrivateKey());
try {
LOG.info("Running configuration script");
if (LOG.isDebugEnabled())
LOG.debug("Running script:\n{}", statementBuilder.render(OsFamily.UNIX));
computeService.runScriptOnNodesMatching(