Phil Zampino created KNOX-1409:
----------------------------------
Summary: Fluid APIs for defining provider configs and descriptors
in Knox Shell
Key: KNOX-1409
URL: https://issues.apache.org/jira/browse/KNOX-1409
Project: Apache Knox
Issue Type: Improvement
Components: KnoxShell
Affects Versions: 1.2.0
Reporter: Phil Zampino
Fix For: 1.2.0
While there is no support for managing provider configs and descriptors using
Knox Shell, deploying these artifacts requires that they already be defined
(it's really just a file upload like the Admin API).
It will be better to have fluid APIs for defining these artifacts in KnoxShell.
Something like the following:
{code:java}
ProviderConfiguration pc =
ProviderConfiguration.create("my-providers")
.addProvider("authentication","ShiroProvider").enabled(true)
.addProvider("authorization","AclsAuth").setParam("acl.mode","OR")
.build()
Descriptor desc =
Descriptor.create("mycluster")
.setProviderConfiguration("default-providers")
.addService("NAMENODE")
.addService("RESOURCEMANAGER")
.addService("WEBHDFS").addParam("discovery-nameservice", "ns1")
.setDiscoveryAddress("http://ambarihost:8080")
.setDisoveryCluster("MyCluster")
.setClusterUser("admin")
.setClusterPasswordAlias("mycluster.pwd")
.build(){code}
The results of which could then be input to deployment methods (rather than
JSON/YAML files):
{code:java}
Manager.deployProviderConfiguration(session, "my-providers", pc)
Manager.deployDescriptor(session, "mycluster", desc){code}
The implementation of the deployment methods will be responsible for converting
the objects into temporary JSON files to be uploaded to the Knox instance via
the Admin API.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)