Dynomite Manager Configuration
Dynomite-manager leverages Guice to reduce repetition and in favor of a more readable configuration. The registration of the listener takes place in the web.xml. InjectedWebListener is the logical place where the injectors are created and configured.
Functional Areas
Configuration | Interface | Description |
---|---|---|
Properties | IConfiguration | system level configuration can be passed. It leverages a file, or Archaius. |
Application | IAppsInstanceFactory | create, delete, update etc. instance level operations like application name, instance ID, hostname, IP address, Rack, attached Volumes and Tokens. This information can be stored in an external location. |
Storage | IStorageProxy | storage related functionalities like warm up, healthcheck, taking disk snapshot etc. |
Environment | InstanceDataRetriever | receive information about Rac, public hostname, public IP, Instance ID and type. Mainly these are reported by the environment. |
Fast Properties | IConfigSource | configuration source, internally at Netflix we use Archaius. |
Default Implementation
binder().bind(IConfiguration.class).to(DynomitemanagerConfiguration.class);
binder().bind(ProcessTuner.class).to(FloridaStandardTuner.class);
binder().bind(IAppsInstanceFactory.class).to(CassandraInstanceFactory.class);
binder().bind(SchedulerFactory.class).to(StdSchedulerFactory.class).asEagerSingleton();
binder().bind(ICredential.class).to(IAMCredential.class);
binder().bind(IFloridaProcess.class).to(FloridaProcessManager.class);
binder().bind(IStorageProxy.class).to(RedisStorageProxy.class);
binder().bind(InstanceDataRetriever.class).to(AwsInstanceDataRetriever.class);
However, one can implement the interfaces based on their deployment and environment. The following implementations are provided:
- DynomitemanagerConfiguration contains the default configuration properties. Properties inherently use Archaius configuration.
- FloridaStandardTuner contains the configuration to be written in the dynomite.yml file. More information about the yml file can be found in the Dynomite repo.
- CassandraInstanceFactory provides an implementation in Cassandra for token management. The configuration of the Cassandra cluster is defined in the DynomitemanagerConfiguration
- StdSchedulerFactory is the standard Quartz scheduler implementation.
- IAMCredential credentials provided by the AWS and instance credentials provider.
- FloridaProcessManager is the administrative process for Dynomite (start, stop, write-only etc.)
- RedisStorageProxy handles the Redis storage level. The implementations for Redis is complete, further storage deployments can be added in storage package
- AwsInstanceDataRetriever provides information about the instance from AWS. Implementations for VPC and local deployments are provided in the config package. For running Dynomite Manager locally in your system, you can use LocalInstanceDataRetriever.
- SimpleDBConfigSource provides an interface to store and retrieve configuration information using SimpleDB. Further implementations on how to use
Host Supplier
One can provide its own host supplier. In this case the config.isEurekaHostSupplierEnabled()
must return false.
There are two exemplar host suppliers in the corresponding package. One based on Eureka and one based on a locally provided host supplier.
How to Use Configuration source:
Properties inherently use Archaius configuration.
But you can use any of the above methods to supply properties whichever way you would like. (e.g. Dynomitemanager.properties or System properties)
Another way to provide your properties is by using dynomitemanager{version}.jar in your web container and then implementing IConfiguration interface.