use of com.hubspot.mesos.client.UserAndPassword in project Singularity by HubSpot.
the class SingularityServiceModule method configure.
@Override
public void configure(Binder binder) {
SingularityConfiguration configuration = getConfiguration();
binder.install(new SingularityMainModule(getConfiguration(), lbClientClass.orElseGet(() -> configuration.getLoadBalancerUri() != null ? BaragonLoadBalancerClientImpl.class : NoOpLoadBalancerClient.class)));
binder.install(new SingularityDataModule(getConfiguration()));
binder.install(new SingularitySchedulerModule());
binder.install(new SingularityResourceModule(getConfiguration().getUiConfiguration()));
binder.install(new SingularityTranscoderModule());
binder.install(new SingularityHistoryModule());
binder.install(dbModuleProvider.apply(getConfiguration()));
binder.install(new SingularityMesosModule());
binder.install(new SingularityZkMigrationsModule());
binder.install(new SingularityJerseyModule());
MesosConfiguration mesosConfiguration = getConfiguration().getMesosConfiguration();
if (mesosConfiguration.getMesosUsername().isPresent() && mesosConfiguration.getMesosPassword().isPresent()) {
binder.install(new SingularityMesosClientModule(new UserAndPassword(mesosConfiguration.getMesosUsername().get(), mesosConfiguration.getMesosPassword().get())));
} else {
binder.install(new SingularityMesosClientModule());
}
// API Docs
getEnvironment().jersey().register(SingularityOpenApiResource.class);
binder.install(new SingularityEventModule(getConfiguration().getWebhookQueueConfiguration()));
}
Aggregations