Hi Bryan,
I am trying to answer your this question: 
- Is there a way to start the admin tool from an IDE? (assuming you havethe 
back end database setup)
>>> I am using Eclipse IDE for the development purpose and these are the steps 
>>> that I follow to run Admin tool using Eclipse. At a first glance it seems 
>>> very much changes but it's one time changes so I don't mind doing this and 
>>> also it saves lot of time in development if Admin tool is configured in our 
>>> favorite IDE. So here are the complete steps :   
   - Clone incubator-ranger from here
   - run maven build using this command: mvn clean compile package install 
assembly:assembly -e
   - Import incubator-ranger into eclipse
   - Now you have to configure the database. And as you said that we can assume 
that you already have database setup.
   - Now open this file from your IDE: 
security-admin/src/main/resources/conf.dist/ranger-admin-site.xml. Update this 
file with your database configuration. You need to change the following 
properties:
   
   - ranger.jpa.jdbc.url   

   - ranger.jpa.jdbc.user   

   - ranger.jpa.jdbc.password   

   - ranger.jpa.audit.jdbc.url   

   - ranger.jpa.audit.jdbc.user   

   - ranger.jpa.audit.jdbc.password   

   
   - Next open security-admin/src/main/webapp/WEB-INF/web.xml. In this file 
change this line WEB-INF/classes/conf/security-applicationContext.xml   ---> 
WEB-INF/classes/conf.dist/security-applicationContext.xml. You will find this 
line in this context: <context-param> 
<param-name>contextConfigLocation</param-name>
   - [OPTIONAL]: If you want to see logs into your IDEs console then change 
<param-value>/WEB-INF/log4j.xml</param-value> ---> 
<param-value>/WEB-INF/log4j.dev.xml</param-value>
   - Next open security-admin/src/main/webapp/META-INF/applicationContext.xml. 
In this file you have to update bean with id="propertyConfigurer". Here make 
this change:
   
   - <value>classpath:ranger-admin-default-site.xml</value> ---> 
<value>classpath:conf.dist/ranger-admin-default-site.xml</value>
   - <value>classpath:ranger-admin-site.xml</value> ---> 
<value>classpath:conf.dist/ranger-admin-site.xml</value>
   
   - [OPTIONAL]: In my case I had to comment out below dependency in 
security-admin/pom.xml.
                <dependency>                    
<groupId>org.springframework</groupId>                    
<artifactId>spring</artifactId>                    
<version>${springframework.spring.version}</version>                
</dependency>   
   - At last, don't forget to add dependency of database connector in 
security-admin/pom.xml.
   - After this all is done, you can simply deploy security-admin-web as a 
normal java web application on tomcat server in eclipse.

@Bryan - Do Let me know if you find any difficulty in following these 
steps.@Rangers - Please let me know if anyone of you feel that any of the above 
step is misplaced or wrong or completely missing. 
Warm Regards,Tushar J Dudhatra****************************E: 
[email protected]

Please do not print this email unless it is absolutely necessary. 

    On Tuesday, March 29, 2016 12:43 AM, Bryan Bende <[email protected]> wrote:
 

 If anyone is interested I created a project for taking the
ranger-admin.tar.gz from the target directory and deploying it with Vagrant:

https://github.com/bbende/apache-ranger-vagrant

Some of the scripting could probably be a better, but it seems to be
getting the job done for now.

-Bryan


On Tue, Mar 22, 2016 at 3:19 PM, Bryan Bende <[email protected]> wrote:

> Thanks Madhan.
>
> The sample application looks very helpful, and I'm sure I'll have more
> questions once I dig a bit deeper :)
>
> Thanks,
>
> Bryan
>
> On Tue, Mar 22, 2016 at 12:59 PM, Madhan Neethiraj <[email protected]>
> wrote:
>
>> Bryan,
>>
>> A sample application and a Ranger plugin to add Ranger authorization to
>> this application were added recently (
>> https://issues.apache.org/jira/browse/RANGER-881). This will help
>> understand the details of adding Ranger authorization to an application.
>>
>> Please go through README.txt (
>> https://git1-us-west.apache.org/repos/asf?p=incubator-ranger.git;a=blob;f=ranger-examples/README.txt),
>> review the sources and let me know if you have any questions.
>>
>>
>> Hope this helps.
>>
>> Madhan
>>
>>
>>
>>
>> On 3/21/16, 10:23 PM, "Madhan Neethiraj" <[email protected] on
>> behalf of [email protected]> wrote:
>>
>> >Hi Bryan,
>> >
>> >Welcome to Apache Ranger! Glad you already have the build going with
>> Maven and loaded Ranger projects into your IDE. Now to your questions:
>> >
>> >>> - Is it possible to run Ranger on OSX, or does it require linux?
>> >Ranger Admin a web application hosted by an embedded Tomcat server. It
>> should be possible to run it in any OS where Tomcat runs, including Mac OS.
>> However, the packaged scripts for various tasks (like install/configure, DB
>> schema creation, start/stop) are available for Linux environments. Running
>> on other OS environment might require OS specific updates - like the on you
>> found about grouped command. Many developers use virtual machines for
>> deployments during development.
>> >
>> >>> - After you have run the setup once, if you make code changes and
>> rebuild, is there a shortcut for deploying these changes? rather than
>> running setup again.
>> >Running setup.sh again is probably the easiest way. It simply recreates
>> the configuration and overwrites the bits. If you have changes to specific
>> jar/.js/.html/.class file, you can try replacing the file in a deployed
>> environment; but no scripts are available to support such updates.
>> >
>> >
>> >>> - Is there a way to start the admin tool from an IDE? (assuming you
>> have the back end database setup)
>> >It should be possible; I guess this would require setting up of various
>> configuration files. However, many developers use a separate VM to deploy
>> Ranger Admin (and other Hadoop processes where Ranger plugins run); in such
>> case, setup.sh does necessary setting up of configuration files.
>> >
>> >Rangers - if any of you have details on running Ranger Admin via an IDE,
>> please share.
>> >
>> >Thanks,
>> >Madhan
>> >
>> >
>> >
>> >
>> >On 3/21/16, 10:41 AM, "Bryan Bende" <[email protected]> wrote:
>> >
>> >>Hello,
>> >>
>> >>I'm trying to setup a local development environment for Ranger and was
>> >>looking for some recommendations...
>> >>
>> >>I have forked the code, built with Maven, and imported into my IDE. My
>> >>questions are more about running what I have built. It looks like the
>> >>documentation says to do the following:
>> >>
>> >>- Copy target/ranger-0.6.0-admin.tar.gz somewhere and extract it
>> >>- Configured install.properties
>> >>- Run setup.sh
>> >>
>> >>Questions
>> >>
>> >>- Is it possible to run Ranger on OSX, or does it require linux?
>> >>
>> >>I ran setup.sh on my laptop (OSX) but ran into: /setup.sh: line 934:
>> >>groupadd: command not found  so I'm thinking this was intended for linux
>> >>
>> >>- After you have run the setup once, if you make code changes and
>> rebuild,
>> >>is there a shortcut for deploying these changes? rather than running
>> setup
>> >>again.
>> >>
>> >>- Is there a way to start the admin tool from an IDE? (assuming you have
>> >>the back end database setup)
>> >>
>> >>I'm interested to hear the workflow that others use for developing, and
>> >>sorry if these questions have been asked/answered before.
>> >>
>> >>Thanks,
>> >>
>> >>Bryan
>>
>>
>


  

Reply via email to