use of com.smoketurner.dropwizard.consul.ConsulFactory in project polaris by ractf.
the class NodeMain method initialize.
@Override
public void initialize(final Bootstrap<NodeConfiguration> bootstrap) {
bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
bootstrap.addBundle(new ConsulBundle<>(getName()) {
@Override
public ConsulFactory getConsulFactory(final NodeConfiguration configuration) {
return configuration.getConsulFactory();
}
});
bootstrap.addBundle(GuiceBundle.builder().modules(new NodeModule()).enableAutoConfig("uk.co.ractf.polaris.consul", "uk.co.ractf.polaris.node.metrics", "uk.co.ractf.polaris.node.runner", "uk.co.ractf.polaris.node.resources", "uk.co.ractf.polaris.node.service").build());
bootstrap.addBundle(new PrometheusBundle());
}
use of com.smoketurner.dropwizard.consul.ConsulFactory in project polaris by ractf.
the class ControllerMain method initialize.
@Override
public void initialize(final Bootstrap<ControllerConfiguration> bootstrap) {
bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
bootstrap.addBundle(new ConsulBundle<>(getName()) {
@Override
public ConsulFactory getConsulFactory(final ControllerConfiguration configuration) {
return configuration.getConsulFactory();
}
});
bootstrap.addBundle(GuiceBundle.builder().modules(new ControllerModule()).enableAutoConfig("uk.co.ractf.polaris.consul", "uk.co.ractf.polaris.host.healthchecks", "uk.co.ractf.polaris.controller.instanceallocation", "uk.co.ractf.polaris.controller.metrics", "uk.co.ractf.polaris.controller.replication", "uk.co.ractf.polaris.controller.resources", "uk.co.ractf.polaris.host.runner", "uk.co.ractf.polaris.controller.scheduler", "uk.co.ractf.polaris.security", "uk.co.ractf.polaris.util").build());
bootstrap.addBundle(new PrometheusBundle());
}
Aggregations