Jump to: navigation, search

Difference between revisions of "Orion/How Tos/Setup Orion Client Hosted Site on OrionHub"

< Orion‎ | How Tos
(Setting up the Site: formatting, mention dojo1.5.1 since 1.5.0 doesn't seem to be available anymore)
Line 4: Line 4:
 
To run something like the embedded editor example, you would need to host the orion editor, the rest of the orion client core code, and dojo.   
 
To run something like the embedded editor example, you would need to host the orion editor, the rest of the orion client core code, and dojo.   
  
When hosting a site from your orionhub account, you cannot expect to make calls to the orionhub server to do things like retrieve files in your workspace.  This is because of the "same domain" restriction.  Hosted sites are located at *username.orionhub.org*, whereas the user's workspace server is running on *orionhub.org*. However, this set up can still be very useful for running Orion client components such as the editor, outliner, content assist, custom dojo applications, etc.
+
When hosting a site from your orionhub account, you cannot expect to make calls to the orionhub server to do things like retrieve files in your workspace.  This is because of the "same domain" restriction.  Hosted sites are located at '''username.orionhub.org''', whereas the user's workspace server is running on '''orionhub.org'''. However, this setup can still be very useful for running Orion client components such as the editor, outliner, content assist, custom dojo applications, etc.
  
 
To set up such a site, you need to do the following:
 
To set up such a site, you need to do the following:
Line 10: Line 10:
 
* Log in to Orionhub
 
* Log in to Orionhub
 
* Click on the "Repositories" link in the top of the navigator page.
 
* Click on the "Repositories" link in the top of the navigator page.
* On the repositories page, there is a button on the right hand side for cloning a git repository. Clone the repository at http://git.eclipse.org/gitroot/e4/org.eclipse.orion.client.git.
+
* On the repositories page, there is a button on the right hand side for cloning a git repository. Click it, and when asked for a Repository URL, use <tt>'''http://git.eclipse.org/gitroot/e4/org.eclipse.orion.client.git'''</tt>
 
* Once the clone is complete, use the associated link button and link the clone to a folder called "orion-client" in the workspace.
 
* Once the clone is complete, use the associated link button and link the clone to a folder called "orion-client" in the workspace.
* From the navigator, import the dojo 1.5 zip file to "dojo/dojo-release-1.5.0" folder in workspace
+
* From the navigator, create a new folder "dojo" in the workspace, and use the Zip Import feature to import the [http://download.dojotoolkit.org/release-1.5.1/dojo-release-1.5.1.zip dojo 1.5.1 zip file] into it.
** You should now have folders like dojo/dojo-release-1.5.0/{dojo, dijit, dojox}
+
** You should now have a folder structure like the following:
* Click on the "Sites" link at the top of the navigator page to create a running site.
+
*** dojo/dojo-release-1.5.1/dojo
** Mount the paths as follows
+
*** dojo/dojo-release-1.5.1/dijit
 +
*** dojo/dojo-release-1.5.1/dojox
 +
* Click on the "Sites" link at the top of the navigator page to create a new site.
 +
** Mount the paths as follows:
 
<pre>
 
<pre>
 
===========================================================================================
 
===========================================================================================
Line 22: Line 25:
 
  /orion-client/bundles/org.eclipse.orion.client.core/static |  /
 
  /orion-client/bundles/org.eclipse.orion.client.core/static |  /
 
  /orion-client/bundles/org.eclipse.orion.client.editor/web  |  /editor
 
  /orion-client/bundles/org.eclipse.orion.client.editor/web  |  /editor
  /dojo/dojo-release-1.5.0                                   |  /org.dojotoolkit/
+
  /dojo/dojo-release-1.5.1                                   |  /org.dojotoolkit/
 
===========================================================================================
 
===========================================================================================
  
Line 30: Line 33:
  
 
</pre>
 
</pre>
* Launch the site, and point your browser at /examples/embeddededitor.html
+
* Launch the site, and point your browser at http://<yoursite>.orionhub.org:8080/examples/embeddededitor.html

Revision as of 17:59, 4 May 2011

The site definition feature in Orion allows you to map folders in your workspace to a site definition, so that you can host a site within Orion. What's really cool about this is that you can use this feature to host sites from your Orion hub account. For example, there is a hosted site running the Orion embedded editor example at http://mamacdon.orionhub.org:8080/examples/embeddededitor.html.

Setting up the Site

To run something like the embedded editor example, you would need to host the orion editor, the rest of the orion client core code, and dojo.

When hosting a site from your orionhub account, you cannot expect to make calls to the orionhub server to do things like retrieve files in your workspace. This is because of the "same domain" restriction. Hosted sites are located at username.orionhub.org, whereas the user's workspace server is running on orionhub.org. However, this setup can still be very useful for running Orion client components such as the editor, outliner, content assist, custom dojo applications, etc.

To set up such a site, you need to do the following:

  • Log in to Orionhub
  • Click on the "Repositories" link in the top of the navigator page.
  • On the repositories page, there is a button on the right hand side for cloning a git repository. Click it, and when asked for a Repository URL, use http://git.eclipse.org/gitroot/e4/org.eclipse.orion.client.git
  • Once the clone is complete, use the associated link button and link the clone to a folder called "orion-client" in the workspace.
  • From the navigator, create a new folder "dojo" in the workspace, and use the Zip Import feature to import the dojo 1.5.1 zip file into it.
    • You should now have a folder structure like the following:
      • dojo/dojo-release-1.5.1/dojo
      • dojo/dojo-release-1.5.1/dijit
      • dojo/dojo-release-1.5.1/dojox
  • Click on the "Sites" link at the top of the navigator page to create a new site.
    • Mount the paths as follows:
===========================================================================================
 Workspace path                                             |   Mount at
===========================================================================================
 /orion-client/bundles/org.eclipse.orion.client.core/static |   /
 /orion-client/bundles/org.eclipse.orion.client.editor/web  |   /editor
 /dojo/dojo-release-1.5.1                                   |   /org.dojotoolkit/
===========================================================================================

Note: although the workspace paths are the important bit, you have to enter them in the 
Target column as suffixes of "X" and "Y", where X and Y are the shortnames of your 
orion-client and dojo projects.

  • Launch the site, and point your browser at http://<yoursite>.orionhub.org:8080/examples/embeddededitor.html