This design is intended to address the following issues:
KNOX-177@jira: Simplify service deployment contributor implementation
This issue stems from what is currently expected of a
ServiceDeploymentContributor in its
Basically each service deployment contributor is expected to build its own filter chain.
This is currently done by making calls to
While this provides a great deal of flexibility for each service to define a custom chain we have found that this isn't commonly necessary.
Furthermore it makes if very difficult if not impossible to introduce new provider/filters without impacting all services.
This design will provide an abstraction to the service deployment contributors that can create either a default or specifically configured chain of providers/filters.
The goal is to support a pattern in service deployment contributors that looks like this:
The over all context into which the method above fits into the deployment infrastructure is shown in the sequence diagram below.
The method below shows a more complete example of a contributeService method as it might be implemented for WebHDFS.
This is a sketch of how topology files would need to be extended to support the external chain definitions.
See table below for details on the new elements introduced.
Note: I don't really like the names for provider-ref and chain-ref but I can't come up with anything better.
Details on the new elements within the topology are described below.
This defines a new chain structure and configuration for use by services. There will be a "built-in" chain named "default".
Specifies the name of the chain so that it can be referenced by services.
References a configured or default provider. May repeat.
A required role of a provider to be included in the chain.
An optional name of a specific provider for the given role.
Optional config parameters to augment the provider's configuration.
Selects a specific chain to use for the service. May repeat.
Specifies the name of the chain to use for the service. Default is "default"
Optional parameters to augment the chain and provider configuration.
A role name to disambiguate which provider the param is intended.
Configuration parameters used by the service. May repeat.
This shows the new method
contributeChain() that would be added to the DeploymentContext interface.
The existing contributeFilter method would be deprecated.
This is actually a point worth further discussion.
Is there a use case where a service might want to define a chain this way?
This shows the relevant portions of the existing, unmodified ServiceDeploymentContributor interface.
This shows the relevant portions of the existing, unmodified ProviderDeploymentContributor interface.