Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
1.2.0
-
None
-
None
Description
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:
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()
The results of which could then be input to deployment methods (rather than JSON/YAML files):
Manager.deployProviderConfiguration(session, "my-providers", pc) Manager.deployDescriptor(session, "mycluster", desc)
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.