Friday, August 17, 2012

How to run Airavata with New Sling Registry API

Step 1 (Apply Patch)


Apply one of following patches to Airavata if it is not already added. 

Patch-1: Only adds Sling Registry API and updates dependencies. 
Patch-2: Adds Sling Registry API, updates dependencies and modifies all references.

Note: To run Airavata with new API, Patch 2 should be applied.  

Step 2 (Download Sling Launchpad)


Download Sling launchpad 7.0 from here. Or you can get source from here and build it yourself.

Now you have 3 options.
  1. Use Sling Launchpad with its internal Jackrabbit repository.
           - To do this, you can simply skip Step 3 and 5.
  2. Use a new external Jackrabbit repository.
           - To do this, you need to run a separate Jackrabbit server. Then, a Jackrabbit repository directory will be created. You can use this folder for next step. Make sure to stop the Jackrabbit server.
  3. Use an existing external Jackrabbit repository.
           - If you already have a Jackrabbit repository directory, you can use it for next step. 

Step 3 (Configure External Repository)


Go to external Jackrabbit repository directory. Modify its repository.xml by replacing its Security configuration element by following.

<Security appName="Jackrabbit">
     <SecurityManager class="org.apache.jackrabbit.core.DefaultSecurityManager" workspaceName="security">
     </SecurityManager>
     <AccessManager class="org.apache.sling.jcr.jackrabbit.server.impl.security.PluggableDefaultAccessManager">
     </AccessManager>
     <LoginModule class="org.apache.sling.jcr.jackrabbit.server.impl.security.PluggableDefaultLoginModule">
          <param name="anonymousId" value="anonymous"/>
          <param name="adminId" value="admin"/>
     </LoginModule>
</Security>


Step 4 (Start Sling Server)


Start Sling Launch pad in port 8081.

java -jar org.apache.sling.launchpad-7-standalone.jar -p 8081

Step 5 (Configure Sling Server)


  1. Go to http://localhost:8081/system/console/configMgr 
    • Give admin:admin as username:password if asked.
  2. Go to row Apache Sling Embedded JCR Repository
  3. Click on org.apache.sling.jcr.jackrabbit.server.SlingServerRepository.########
  4. Configure Configuration File, Repository Home and Repository Name as follows.
    • Configuration File: Jackrabbit Repository.xml path 
      • Eg. /home/.../jackrabbit/repository.xml
    • Repository Home: Jackrabbit home path
      • Eg. /home/.../jackrabbit/
    • Embedded JCR Repository Name: 'jackrabbit'
  5. Restart Launchpad

Step 6 (Start Airavata)


Now you can start Airavata server & XBaya, and continue.

4 comments:

Heshan Suriyaarachchi said...

Hi Bhathiya,

I'm going through your patches now. It's better if you not have the repository.properties and xbaya.properties modified in the patch2. Those can be added as configuration instructions. We don't want to make any changes for now with the default behavior of Airavata.

Can you add these to the jira and post the link here. Without you agreeing that your work should be released under Apache licence, I can not apply this to the trunk. You will be asked to give your consent when you submit a patch through the jira.

Thanks,
Heshan

Heshan Suriyaarachchi said...

Hi Bhathiya,

I posted some observations on the jira [1]. Please, respond to it.

[1] - https://issues.apache.org/jira/browse/AIRAVATA-338

Thanks,
Heshan

Bhathiya Jayasekara said...

Hi Heshan,

Instructions are updated in Step 2. I will update JIRA.

Thanks.

Unknown said...

ざんとは何です