Difference between revisions of "Trying Out Maya"

From Eclipsepedia

Jump to: navigation, search
(Next Steps)
(Overview)
 
(31 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Things you'll need ==
+
== Overview ==
  
*  [http://db.apache.org/derby/integrate/plugin_howto.html Apache Derby Core and UI plugins]
+
'''NOTE: These instructions are out of date. The maya project has recently had a name change, now maynstall. So the repositories have changed as wellIn addition to that maynstall is undergoing many changes in preparation for p2, the new provisioning effort. So this page does not have the correct information  availableFor instance the dependency to hibernate has been removed.  
* [http://sourceforge.net/project/showfiles.php?group_id=40712&package_id=127784&release_id=498399 Hibernate 3.2.3]
+
'''
* 1.6 JRE
+
*  Team Project Set
+
*  Eclipse 3.3 M6 (at least M6)
+
  
Note:
+
The following instructions highlight how to try out Maya.  At this time, Maya does not have a formal "release" available however we understand that certain developers may wish to setup Maya to begin experimenting how it could work in their environmentThe follow steps are designed to use a local Derby database and include example plugins that have a local update site run to expose the Maya features and plugins as needed.  In addition, a set of JUnit tests are used to populate the database including configuring default profiles and scanning standard update sites.  Once you experiment with this configuration, you can deviate from these steps including registering additional update sites and potentially switching to use other database technologies.
The Derby ui plugin is not required but makes it easier to use Derby in eclipseAlso the steps that are outlined here will be using the ui plugin.
+
  
 +
== The Environment ==
  
== Next Steps ==
+
You will use the following components in trying out Maya.
(More to come - Just an outline)
+
  
# add the derby core and ui plugins to your plugins directory
+
* '''Eclipse'''
install the JRE
+
**  To build and run the database, update site, and Maya server
#  Start eclipse
+
*  '''Maya Server'''
#  Import team project set  
+
**  To expose the web services needed for Maya to operate
Create a plugin that contains the hibernate and supporting jars
+
**  To host the local update site for testing (in this example)
#*  Export every package
+
*  '''Derby DB'''
#*  Add to classpath
+
**  To store the meta information for Maya to perform provisioning
#*  Add to binary build
+
*  '''Maya Javastrap'''
#  Add this newly created plugin to the launch config for Maya server (Win)
+
**  A Java implementation of Maya's bootstrap to initiate provisioning
Add the apache derby nature to the org.eclipse.maya.server.example.db project
+
*  '''Maya Launcher'''
#*  right click choose add nature
+
**  Run by the bootstrap and allows selection of profile to be executed
Start derby
+
 
#*  right click and choose start Derby Network server…
+
==  Trying Out Maya ==
Run maya.sql
+
 
#*  Right click choose run with interactive ij ….
+
Install the [http://java.sun.com/javase/downloads/index.jsp Sun JRE 1.6] (if not already installed)
Zip 1.6.0 JRE and place in JRE folder
+
#*  Note: Needed for testing of Maya when automatic VM distribution is enabled (currently default)
#*  navigate to the directory where there is folders like bin, lib and some other files add create a zip file just containing those files
+
#  Start Eclipse, download from [http://download.eclipse.org/eclipse/downloads/ Eclipse.org] if needed
#*  Place that in the JRE folder for your os in the org.eclipse.maya.server.example.db plugin
+
#*  Note: We've tested with 3.2.2 as well as 3.3M6+
#  Build update site
+
#  Import Maya's Getting Started team project set
#*  Open the site.xml click build site
+
#* Download the Team Project Set (right-click Save As...)
#  Start server
+
#*For Maya committers: [http://www.eclipse.org/maya/resources/maya-with-derby-committer.psf maya-with-derby-committer.psf]
#*  Run the server using the launch config
+
#*For anonymous access: [http://www.eclipse.org/maya/resources/maya-with-derby-anon.psf maya-with-derby-anon.psf]
#  Run AllTests as junitTest Plugin (Depending on bandwidth this could take a while)
+
#*  Use '''Import > Team > Team Project Set''' and browse to the PSF file
#*  Right click select run as JUnit Plugin Test
+
#*  You will get build errors until you complete later steps
#  Run launcher
+
#  Add [http://sourceforge.net/project/showfiles.php?group_id=40712&package_id=127784&release_id=498399 Hibernate] Jars to '''org.eclipse.maya.server.example.hibernate''' project
#*  tun the JavaStrap launch config
+
#* Place Hibernate files in the '''org.eclipse.maya.server.example.hibernate/lib''' folder. 
 +
#*  Copy Jars from the downloaded hibernate zip's top-level directory:
 +
#** hibernate3.jar
 +
#*  Copy Jars from the downloaded hibernate zip's lib directory:
 +
#** antlr-2.7.6.jar
 +
#*asm.jar
 +
#** asm-attrs.jar
 +
#**  c3p0-0.9.1.jar
 +
#**  cglib-2.1.3.jar
 +
#**  commons-collections-2.1.1.jar
 +
#**  dom4j-1.6.1.jar
 +
#**  jta.jar
 +
#*  Once Jars in place, all build errors should go away (if not, do a clean build)
 +
#  Start the Derby network server
 +
#*  Run the server using the launch config '''Derby Network Server'''
 +
#  Create zip file of the Sun 1.6.0 JRE and place in JRE folder
 +
#*  On Windows navigate to the directory where there is folders like '''bin & lib''' and some other files and create a zip file just containing those files
 +
#*  Place that in the JRE folder for your os in the '''org.eclipse.maya.server.example.db''' plug-ins (Note: the file must be named '''jre_1.6.0.zip''')
 +
#**  For Windows, place the file at '''org.eclipse.maya.server.example.db/jre/win/jre_1.6.0.zip'''
 +
#**  For Linux, place the file at '''org.eclipse.maya.server.example.db/jre/linux/jre_1.6.0.zip'''
 +
#  Build Update Site for the Maya software
 +
#*  Open the '''site.xml''' located in the '''update_site''' folder of the '''org.eclipse.maya.server.example.db''' project click '''Build All'''
 +
#*  Note: Under Eclipse 3.3M7 you may receive an error building the update site, typically this can be ignored
 +
#  Start the Maya Web Server
 +
#*  Run the server using the launch config '''Maya Server (Win)'''
 +
# Prepare the Maya Database including initial population
 +
#* Run using the '''Initialize Maya Database''' launch config
 +
#*  Part of preparation includes running update site sync which can take 10-60 minutes depending on network connection.  Subsequent runs of the update site sync will run significantly faster as it will only retrieve incremental changes
 +
#  Run the Maya Launcher via Bootstrap
 +
#*  Launch the '''Maya Javastrap''' launch config from the Run... menu
 +
#*  When prompted for a user name and password, specify '''user''' / '''pass''' or '''admin''' / '''admin'''
 +
 
 +
== What to Try Next ==
 +
 
 +
*  '''Distributed Testing'''
 +
**  Even though you are testing with Maya running on a local Derby DB, this setup will allow you to test from a remote system.  Since the meta information cached in the Derby DB includes the base URL to update sites, the Maya plugins and features will be referenced based on the hostname of the test server.  In environments where WINS is configured, you should be able to modify the '''Maya Javastrap''' to have the hostname of the server specified under VM arguments as '''-Dmaya.host=<hostname>'''.  If you do not have WINS configured, you will need to specify '''-Dmaya.host=<a.b.c.d>''' where a.b.c.d is the server's IP address.  Please note that while you can set the Maya hostname for testing, typically the native bootstrap you would deploy would be installed and configured ready for a given server.  Note: If the server's IP address or name changes, you may need to re-run '''Initialize Maya Database''' which will dump the tables and re-create from scratch.
 +
*  '''Create Additional Profiles'''
 +
**  At this time, the user interface is not quite complete for administrating profiles.  If you would like to test creating a new profile, create a derivative of the '''AddJavaPorfile.java''' test case.  You can create as many profiles as you like.  Please note that for purposes of simplifying the examples, we are using a simple user and group mechanism.  If you need to test profiles allocated to specific groups, modify the '''org.eclipse.maya.server.example.user/users/users.xml''' file or provide an alternate implementation of those functions tied to your own authentication system.
 +
 
 +
== Database Maintenance ==
 +
 
 +
Once you've created the Maya database, you may want to periodically run the '''Rescan Update Sites''' launch configuration.  This will have Maya go out and verify that all of the features exposed on the registered update sites are stored within Maya's meta cache.  In addition, for this Derby-based usage of Maya, the database itself will have information including the machine's hostname to be used as the web site for the Maya plugins exposed by the update site.  In a full installation these files would be hosted on a stable server, though in this setup, since the hostname of the machine could change, you may need to re-initialize the database if certain configuration changes occur.

Latest revision as of 15:52, 10 January 2008

Contents

[edit] Overview

NOTE: These instructions are out of date. The maya project has recently had a name change, now maynstall. So the repositories have changed as well. In addition to that maynstall is undergoing many changes in preparation for p2, the new provisioning effort. So this page does not have the correct information available. For instance the dependency to hibernate has been removed.

The following instructions highlight how to try out Maya. At this time, Maya does not have a formal "release" available however we understand that certain developers may wish to setup Maya to begin experimenting how it could work in their environment. The follow steps are designed to use a local Derby database and include example plugins that have a local update site run to expose the Maya features and plugins as needed. In addition, a set of JUnit tests are used to populate the database including configuring default profiles and scanning standard update sites. Once you experiment with this configuration, you can deviate from these steps including registering additional update sites and potentially switching to use other database technologies.

[edit] The Environment

You will use the following components in trying out Maya.

  • Eclipse
    • To build and run the database, update site, and Maya server
  • Maya Server
    • To expose the web services needed for Maya to operate
    • To host the local update site for testing (in this example)
  • Derby DB
    • To store the meta information for Maya to perform provisioning
  • Maya Javastrap
    • A Java implementation of Maya's bootstrap to initiate provisioning
  • Maya Launcher
    • Run by the bootstrap and allows selection of profile to be executed

[edit] Trying Out Maya

  1. Install the Sun JRE 1.6 (if not already installed)
    • Note: Needed for testing of Maya when automatic VM distribution is enabled (currently default)
  2. Start Eclipse, download from Eclipse.org if needed
    • Note: We've tested with 3.2.2 as well as 3.3M6+
  3. Import Maya's Getting Started team project set
    • Download the Team Project Set (right-click Save As...)
    • Use Import > Team > Team Project Set and browse to the PSF file
    • You will get build errors until you complete later steps
  4. Add Hibernate Jars to org.eclipse.maya.server.example.hibernate project
    • Place Hibernate files in the org.eclipse.maya.server.example.hibernate/lib folder.
    • Copy Jars from the downloaded hibernate zip's top-level directory:
      • hibernate3.jar
    • Copy Jars from the downloaded hibernate zip's lib directory:
      • antlr-2.7.6.jar
      • asm.jar
      • asm-attrs.jar
      • c3p0-0.9.1.jar
      • cglib-2.1.3.jar
      • commons-collections-2.1.1.jar
      • dom4j-1.6.1.jar
      • jta.jar
    • Once Jars in place, all build errors should go away (if not, do a clean build)
  5. Start the Derby network server
    • Run the server using the launch config Derby Network Server
  6. Create zip file of the Sun 1.6.0 JRE and place in JRE folder
    • On Windows navigate to the directory where there is folders like bin & lib and some other files and create a zip file just containing those files
    • Place that in the JRE folder for your os in the org.eclipse.maya.server.example.db plug-ins (Note: the file must be named jre_1.6.0.zip)
      • For Windows, place the file at org.eclipse.maya.server.example.db/jre/win/jre_1.6.0.zip
      • For Linux, place the file at org.eclipse.maya.server.example.db/jre/linux/jre_1.6.0.zip
  7. Build Update Site for the Maya software
    • Open the site.xml located in the update_site folder of the org.eclipse.maya.server.example.db project click Build All
    • Note: Under Eclipse 3.3M7 you may receive an error building the update site, typically this can be ignored
  8. Start the Maya Web Server
    • Run the server using the launch config Maya Server (Win)
  9. Prepare the Maya Database including initial population
    • Run using the Initialize Maya Database launch config
    • Part of preparation includes running update site sync which can take 10-60 minutes depending on network connection. Subsequent runs of the update site sync will run significantly faster as it will only retrieve incremental changes
  10. Run the Maya Launcher via Bootstrap
    • Launch the Maya Javastrap launch config from the Run... menu
    • When prompted for a user name and password, specify user / pass or admin / admin

[edit] What to Try Next

  • Distributed Testing
    • Even though you are testing with Maya running on a local Derby DB, this setup will allow you to test from a remote system. Since the meta information cached in the Derby DB includes the base URL to update sites, the Maya plugins and features will be referenced based on the hostname of the test server. In environments where WINS is configured, you should be able to modify the Maya Javastrap to have the hostname of the server specified under VM arguments as -Dmaya.host=<hostname>. If you do not have WINS configured, you will need to specify -Dmaya.host=<a.b.c.d> where a.b.c.d is the server's IP address. Please note that while you can set the Maya hostname for testing, typically the native bootstrap you would deploy would be installed and configured ready for a given server. Note: If the server's IP address or name changes, you may need to re-run Initialize Maya Database which will dump the tables and re-create from scratch.
  • Create Additional Profiles
    • At this time, the user interface is not quite complete for administrating profiles. If you would like to test creating a new profile, create a derivative of the AddJavaPorfile.java test case. You can create as many profiles as you like. Please note that for purposes of simplifying the examples, we are using a simple user and group mechanism. If you need to test profiles allocated to specific groups, modify the org.eclipse.maya.server.example.user/users/users.xml file or provide an alternate implementation of those functions tied to your own authentication system.

[edit] Database Maintenance

Once you've created the Maya database, you may want to periodically run the Rescan Update Sites launch configuration. This will have Maya go out and verify that all of the features exposed on the registered update sites are stored within Maya's meta cache. In addition, for this Derby-based usage of Maya, the database itself will have information including the machine's hostname to be used as the web site for the Maya plugins exposed by the update site. In a full installation these files would be hosted on a stable server, though in this setup, since the hostname of the machine could change, you may need to re-initialize the database if certain configuration changes occur.