Search in sources :

Example 1 with MonitoringBundle

use of uk.gov.ida.bundles.MonitoringBundle in project verify-hub by alphagov.

the class StubEventSinkApplication method initialize.

@Override
public final void initialize(Bootstrap<StubEventSinkConfiguration> bootstrap) {
    // Enable variable substitution with environment variables
    bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
    GuiceBundle<StubEventSinkConfiguration> guiceBundle = defaultBuilder(StubEventSinkConfiguration.class).modules(new StubEventSinkModule()).build();
    bootstrap.addBundle(guiceBundle);
    bootstrap.addBundle(new ServiceStatusBundle());
    bootstrap.addBundle(new MonitoringBundle());
    bootstrap.addBundle(new LoggingBundle());
}
Also used : SubstitutingSourceProvider(io.dropwizard.configuration.SubstitutingSourceProvider) LoggingBundle(uk.gov.ida.bundles.LoggingBundle) ServiceStatusBundle(uk.gov.ida.bundles.ServiceStatusBundle) EnvironmentVariableSubstitutor(io.dropwizard.configuration.EnvironmentVariableSubstitutor) MonitoringBundle(uk.gov.ida.bundles.MonitoringBundle)

Example 2 with MonitoringBundle

use of uk.gov.ida.bundles.MonitoringBundle in project verify-hub by alphagov.

the class PolicyApplication method initialize.

@Override
public final void initialize(Bootstrap<PolicyConfiguration> bootstrap) {
    // Enable variable substitution with environment variables
    bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
    bootstrap.addBundle(new ServiceStatusBundle());
    bootstrap.addBundle(new MonitoringBundle());
    bootstrap.addBundle(new LoggingBundle());
    bootstrap.addBundle(new IdaJsonProcessingExceptionMapperBundle());
    final InfinispanBundle infinispanBundle = new InfinispanBundle();
    // the infinispan cache manager needs to be lazy loaded because it is not initialized at this point.
    bootstrap.addBundle(infinispanBundle);
    guiceBundle = GuiceBundle.defaultBuilder(PolicyConfiguration.class).modules(getPolicyModule(), new EventEmitterModule(), bindInfinispan(infinispanBundle.getInfinispanCacheManagerProvider())).build();
    bootstrap.addBundle(guiceBundle);
}
Also used : SubstitutingSourceProvider(io.dropwizard.configuration.SubstitutingSourceProvider) IdaJsonProcessingExceptionMapperBundle(uk.gov.ida.hub.policy.exception.IdaJsonProcessingExceptionMapperBundle) LoggingBundle(uk.gov.ida.bundles.LoggingBundle) ServiceStatusBundle(uk.gov.ida.bundles.ServiceStatusBundle) EnvironmentVariableSubstitutor(io.dropwizard.configuration.EnvironmentVariableSubstitutor) MonitoringBundle(uk.gov.ida.bundles.MonitoringBundle) EventEmitterModule(uk.gov.ida.eventemitter.EventEmitterModule) InfinispanBundle(uk.gov.ida.shared.dropwizard.infinispan.util.InfinispanBundle)

Example 3 with MonitoringBundle

use of uk.gov.ida.bundles.MonitoringBundle in project verify-hub by alphagov.

the class SamlEngineApplication method initialize.

@Override
public final void initialize(Bootstrap<SamlEngineConfiguration> bootstrap) {
    // Enable variable substitution with environment variables
    bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
    MDC.clear();
    bootstrap.addBundle(new ServiceStatusBundle());
    bootstrap.addBundle(new MonitoringBundle());
    bootstrap.addBundle(new LoggingBundle());
    bootstrap.addBundle(new IdaJsonProcessingExceptionMapperBundle());
    final InfinispanBundle infinispanBundle = new InfinispanBundle();
    bootstrap.addBundle(infinispanBundle);
    guiceBundle = defaultBuilder(SamlEngineConfiguration.class).modules(new SamlEngineModule(), new CryptoModule(), bindInfinispan(infinispanBundle.getInfinispanCacheManagerProvider())).build();
    bootstrap.addBundle(guiceBundle);
}
Also used : SubstitutingSourceProvider(io.dropwizard.configuration.SubstitutingSourceProvider) IdaJsonProcessingExceptionMapperBundle(uk.gov.ida.hub.samlengine.exceptions.IdaJsonProcessingExceptionMapperBundle) LoggingBundle(uk.gov.ida.bundles.LoggingBundle) ServiceStatusBundle(uk.gov.ida.bundles.ServiceStatusBundle) EnvironmentVariableSubstitutor(io.dropwizard.configuration.EnvironmentVariableSubstitutor) MonitoringBundle(uk.gov.ida.bundles.MonitoringBundle) InfinispanBundle(uk.gov.ida.shared.dropwizard.infinispan.util.InfinispanBundle)

Example 4 with MonitoringBundle

use of uk.gov.ida.bundles.MonitoringBundle in project verify-hub by alphagov.

the class ConfigApplication method initialize.

@Override
public void initialize(Bootstrap<ConfigConfiguration> bootstrap) {
    // Enable variable substitution with environment variables
    bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
    guiceBundle = GuiceBundle.defaultBuilder(ConfigConfiguration.class).modules(new ConfigModule()).build();
    bootstrap.addBundle(guiceBundle);
    bootstrap.addBundle(new ServiceStatusBundle());
    bootstrap.addBundle(new MonitoringBundle());
    bootstrap.addBundle(new LoggingBundle());
    bootstrap.addCommand(new ConfigValidCommand());
}
Also used : SubstitutingSourceProvider(io.dropwizard.configuration.SubstitutingSourceProvider) LoggingBundle(uk.gov.ida.bundles.LoggingBundle) ServiceStatusBundle(uk.gov.ida.bundles.ServiceStatusBundle) EnvironmentVariableSubstitutor(io.dropwizard.configuration.EnvironmentVariableSubstitutor) MonitoringBundle(uk.gov.ida.bundles.MonitoringBundle)

Example 5 with MonitoringBundle

use of uk.gov.ida.bundles.MonitoringBundle in project verify-hub by alphagov.

the class SamlProxyApplication method initialize.

@Override
public final void initialize(Bootstrap<SamlProxyConfiguration> bootstrap) {
    // Enable variable substitution with environment variables
    bootstrap.setConfigurationSourceProvider(new SubstitutingSourceProvider(bootstrap.getConfigurationSourceProvider(), new EnvironmentVariableSubstitutor(false)));
    guiceBundle = defaultBuilder(SamlProxyConfiguration.class).modules(new SamlProxyModule(), new EventEmitterModule()).build();
    bootstrap.addBundle(guiceBundle);
    bootstrap.addBundle(new ServiceStatusBundle());
    bootstrap.addBundle(new MonitoringBundle());
    bootstrap.addBundle(new LoggingBundle());
}
Also used : SubstitutingSourceProvider(io.dropwizard.configuration.SubstitutingSourceProvider) LoggingBundle(uk.gov.ida.bundles.LoggingBundle) ServiceStatusBundle(uk.gov.ida.bundles.ServiceStatusBundle) EnvironmentVariableSubstitutor(io.dropwizard.configuration.EnvironmentVariableSubstitutor) MonitoringBundle(uk.gov.ida.bundles.MonitoringBundle) EventEmitterModule(uk.gov.ida.eventemitter.EventEmitterModule)

Aggregations

EnvironmentVariableSubstitutor (io.dropwizard.configuration.EnvironmentVariableSubstitutor)6 SubstitutingSourceProvider (io.dropwizard.configuration.SubstitutingSourceProvider)6 LoggingBundle (uk.gov.ida.bundles.LoggingBundle)6 MonitoringBundle (uk.gov.ida.bundles.MonitoringBundle)6 ServiceStatusBundle (uk.gov.ida.bundles.ServiceStatusBundle)6 EventEmitterModule (uk.gov.ida.eventemitter.EventEmitterModule)3 InfinispanBundle (uk.gov.ida.shared.dropwizard.infinispan.util.InfinispanBundle)2 IdaJsonProcessingExceptionMapperBundle (uk.gov.ida.hub.policy.exception.IdaJsonProcessingExceptionMapperBundle)1 IdaJsonProcessingExceptionMapperBundle (uk.gov.ida.hub.samlengine.exceptions.IdaJsonProcessingExceptionMapperBundle)1 IdaJsonProcessingExceptionMapperBundle (uk.gov.ida.hub.samlsoapproxy.exceptions.IdaJsonProcessingExceptionMapperBundle)1