Jump to: navigation, search

Difference between revisions of "Trying Out Maya"

m (Next Steps)
(Overview)
 
(16 intermediate revisions by 2 users not shown)
Line 1: Line 1:
== Things you'll need ==
+
== Overview ==
  
*  [http://db.apache.org/derby/releases/release-10.2.2.0.cgi 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 well. In addition to that maynstall is undergoing many changes in preparation for p2, the new provisioning effortSo 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.
+
  
== Next Steps ==
+
== 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
 +
 
 +
==  Trying Out Maya ==
  
#  Install the [http://db.apache.org/derby/releases/release-10.2.2.0.cgi Derby Core and UI plug-ins] to your runtime plug-ins directory
 
#*  Download '''derby_core_plugin''' and '''derby_ui_plugin''' (not the derby binary bundles)
 
#*  Place the files in your eclipse/plugins directory
 
 
#  Install the [http://java.sun.com/javase/downloads/index.jsp Sun JRE 1.6] (if not already installed)
 
#  Install the [http://java.sun.com/javase/downloads/index.jsp Sun JRE 1.6] (if not already installed)
 
#*  Note: Needed for testing of Maya when automatic VM distribution is enabled (currently default)
 
#*  Note: Needed for testing of Maya when automatic VM distribution is enabled (currently default)
 
#  Start Eclipse, download from [http://download.eclipse.org/eclipse/downloads/ Eclipse.org] if needed
 
#  Start Eclipse, download from [http://download.eclipse.org/eclipse/downloads/ Eclipse.org] if needed
#*  Note: We've tested with 3.3M6 and M7, you must use a version that includes the new Jetty service
+
#*  Note: We've tested with 3.2.2 as well as 3.3M6+
#  Import Maya's Getting Started team project set (maya-with-derby.psf)
+
#  Import Maya's Getting Started team project set
 +
#*  Download the Team Project Set (right-click Save As...)
 +
#**  For Maya committers: [http://www.eclipse.org/maya/resources/maya-with-derby-committer.psf maya-with-derby-committer.psf]
 +
#**  For anonymous access: [http://www.eclipse.org/maya/resources/maya-with-derby-anon.psf maya-with-derby-anon.psf]
 
#*  Use '''Import > Team > Team Project Set''' and browse to the PSF file
 
#*  Use '''Import > Team > Team Project Set''' and browse to the PSF file
 
#*  You will get build errors until you complete later steps
 
#*  You will get build errors until you complete later steps
Line 35: Line 47:
 
#**  dom4j-1.6.1.jar
 
#**  dom4j-1.6.1.jar
 
#**  jta.jar
 
#**  jta.jar
#*  Once Jars in place, all build errors should go away
+
#*  Once Jars in place, all build errors should go away (if not, do a clean build)
 
#  Start the Derby network server
 
#  Start the Derby network server
#*  Right click in the '''org.eclipse.maya.server.example.db''' project and choose '''Apache Derby > Start 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
 
#  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
 
#*  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''')
 
#*  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
 
#  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'''
 
#*  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
 
#  Start the Maya Web Server
 
#*  Run the server using the launch config '''Maya Server (Win)'''
 
#*  Run the server using the launch config '''Maya Server (Win)'''
 
#  Prepare the Maya Database including initial population  
 
#  Prepare the Maya Database including initial population  
#*  Run using the '''Prepare Maya Database''' launch config
+
#*  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
+
#*  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
 
#  Run the Maya Launcher via Bootstrap
#*  Launch the '''Java Bootstrap''' launch config from the Run... menu
+
#*  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 14:52, 10 January 2008

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.

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

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

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.