use of org.apache.whirr.ClusterSpec in project whirr by apache.
the class HadoopTaskTrackerClusterActionHandler method afterConfigure.
@Override
protected void afterConfigure(ClusterActionEvent event) throws IOException, InterruptedException {
ClusterSpec clusterSpec = event.getClusterSpec();
// TODO: wait for TTs to come up (done in test for the moment)
LOG.info("Completed configuration of {} role {}", clusterSpec.getClusterName(), getRole());
// TODO: List task trackers + url to their WEB UI?
}
use of org.apache.whirr.ClusterSpec in project whirr by apache.
the class DruidMySQLClusterActionHandler method beforeBootstrap.
@Override
protected void beforeBootstrap(ClusterActionEvent event) throws IOException {
ClusterSpec clusterSpec = event.getClusterSpec();
Configuration conf = getConfiguration(clusterSpec);
addStatement(event, call("configure_hostnames"));
// installed/run via apt-get
addStatement(event, call("install_mysql"));
}
use of org.apache.whirr.ClusterSpec in project whirr by apache.
the class ElasticSearchHandler method beforeConfigure.
@Override
protected void beforeConfigure(ClusterActionEvent event) throws IOException {
ClusterSpec spec = event.getClusterSpec();
Cluster cluster = event.getCluster();
event.getFirewallManager().addRule(Rule.create().destination(cluster.getInstancesMatching(role(ROLE))).port(HTTP_CLIENT_PORT));
handleFirewallRules(event);
Configuration config = ElasticSearchConfigurationBuilder.buildConfig(spec, cluster);
addStatement(event, call("retry_helpers"));
addStatement(event, ElasticSearchConfigurationBuilder.build("/tmp/elasticsearch.yml", config));
addStatement(event, call("configure_elasticsearch", config.getStringArray("es.plugins")));
}
use of org.apache.whirr.ClusterSpec in project whirr by apache.
the class ElasticSearchConfigurationBuilderTest method testDefaultConfigAwsEC2.
@Test
public void testDefaultConfigAwsEC2() throws Exception {
Configuration baseConfig = new PropertiesConfiguration();
baseConfig.addProperty("whirr.provider", "aws-ec2");
baseConfig.addProperty("es.plugins", "lang-javascript, lang-python");
ClusterSpec spec = ClusterSpec.withTemporaryKeys(baseConfig);
Configuration config = ElasticSearchConfigurationBuilder.buildConfig(spec, null);
assertThat(config.getStringArray("es.plugins"), is(new String[] { "lang-javascript", "lang-python", "elasticsearch/elasticsearch-cloud-aws/1.5.0" }));
assertThat(config.getString("es.discovery.type"), is("ec2"));
}
use of org.apache.whirr.ClusterSpec in project whirr by apache.
the class GangliaMetadClusterActionHandler method beforeConfigure.
@Override
protected void beforeConfigure(ClusterActionEvent event) throws IOException, InterruptedException {
ClusterSpec clusterSpec = event.getClusterSpec();
Cluster cluster = event.getCluster();
// FIXME: the ganglia port is only opened so the ganglia xml dump can be checked in GangliaServiceTest
event.getFirewallManager().addRule(Rule.create().destination(role(GANGLIA_METAD_ROLE)).ports(HTTP_PORT, GANGLIA_META_PORT));
handleFirewallRules(event);
Configuration config = getConfiguration(clusterSpec);
String configureFunction = getConfigureFunction(config);
// Call the configure function.
String metadHost = cluster.getInstanceMatching(role(GANGLIA_METAD_ROLE)).getPrivateIp();
addStatement(event, call("retry_helpers"));
addStatement(event, call(configureFunction, "-m", metadHost));
}
Aggregations