zeroflag opened a new pull request, #835:
URL: https://github.com/apache/knox/pull/835

   ## What changes were proposed in this pull request?
   
   Adding a command to knoxcli that can generate a topology descriptor from a 
list of URLs.
   
   Usage:
   
   ```
   Create Knox topology descriptor file for one service
   Options are as follows: 
   --service-urls-file (required) path to a text file containing service urls 
   --service-name (required) the name of the service, such as WEBHDFS, IMPALAUI 
or HIVE 
   --descriptor-name (required) name of descriptor to be created 
   --provider-name (required) name of the referenced shared provider 
   --output-dir (optional) output directory to save the descriptor file 
   --force (optional) force rewriting of existing files, if not used, command 
will fail when the configs files with same name already exist. 
   ```
   
   ## How was this patch tested?
   ```bash
   cat /tmp/urls.txt
   
   http://url1.site:5000
   http://url2.site:5000
   ```
   
   ```bash
   $ bin/knoxcli.sh generate-descriptor --service-urls-file /tmp/urls.txt 
--service-name IMPALAUI --provider-name pam.json --descriptor-name impalads.json
   
   Descriptor impalads.json was successfully saved to 
/Users/attilamagyar/development/test/.
   ```
   
   
   ```bash
   cat impalads.txt
   
   {
     "name" : "impalads",
     "provider-config-ref" : "pam",
     "services" : [ {
       "params" : { },
       "name" : "IMPALAUI",
       "urls" : [ "http://url1.site:5000";, "http://url2.site:5000"; ]
     } ]
   }
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@knox.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to