You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@knox.apache.org by "Kevin Risden (JIRA)" <ji...@apache.org> on 2018/11/07 20:51:00 UTC
[jira] [Updated] (KNOX-1409) Fluid APIs for defining provider
configs and descriptors in Knox Shell
[ https://issues.apache.org/jira/browse/KNOX-1409?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Kevin Risden updated KNOX-1409:
-------------------------------
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:
{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.
was:
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.
> 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
> Priority: Minor
> 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)