Difference between revisions of "Amahi Edge"

From Amahi Wiki
Jump to: navigation, search
Line 1: Line 1:
 
Amahi Edge Working Notes
 
Amahi Edge Working Notes
  
Amahi Edge is the developer version of Amahi, with the very latest and greatest code in it. It lives in a branch of the Amahi Git repo.
+
Amahi Edge is the developer version of Amahi, with the very latest and greatest code in it. It lives in a branch of the Amahi Git repo, called
 +
 
 +
  amahi-edge
 +
 
  
 
= How to Get Amahi Edge Running =
 
= How to Get Amahi Edge Running =
Line 7: Line 10:
 
First you need to get the latest git repository (see how on the [[Contribute]]-page)
 
First you need to get the latest git repository (see how on the [[Contribute]]-page)
  
After you've got the latest master branch you need to switch to the amahi-6-devel branch (and tell git to follow it on the remote server):
+
After you've got the latest master branch you need to switch to the amahi-edge branch (and tell git to follow it on the remote server):
  
<code>git checkout amahi-6-devel</code>
+
<code>git checkout amahi-edge</code>
  
The amahi-6-devel code uses a different database for it's data so we need to create one, copy the production data in it and migrate it to the new datamodel:
+
The amahi-edge code uses a different database for it's data so we need to create one, copy the production data in it and migrate it to the new datamodel:
 
* Go to <code>/path/to/git/clone/platform/platform</code>
 
* Go to <code>/path/to/git/clone/platform/platform</code>
* Execute <code>./hda-create-db-and-user amahi_6_devel</code>
+
* Execute <code>./hda-create-db-and-user amahi_devel</code>
 
* Go to <code>/path/to/git/clone/platform/platform/html/script</code>
 
* Go to <code>/path/to/git/clone/platform/platform/html/script</code>
* Execute <code>./db-duplicate hda_production amahi_6_devel</code>
+
* Execute <code>./db-duplicate hda_production amahi_devel</code>
 
* Go to <code>/path/to/git/clone/platform/platform/html</code>
 
* Go to <code>/path/to/git/clone/platform/platform/html</code>
 
* Execute <code>rake db:migrate</code>
 
* Execute <code>rake db:migrate</code>
  
Now we have a working amahi-6-devel branch which can be used to develop features, gadgets, widgets and fix bugs.
+
Now we have a working amahi-edge branch which can be used to develop features, gadgets, widgets and fix bugs.
  
To reach the amahi-6-devel branch you need to go to <code>/path/to/git/clone/platform/platform/html</code> and execute
+
To reach the amahi-edge branch you need to go to <code>/path/to/git/clone/platform/platform/html</code> and execute
  
<code>./script/server amahi_6_devel</code>
+
<code>./script/server</code>
  
 
The development dashboard can be reached with your favorite browser using the link <code>http://ip.addr.of.dev:3000</code>
 
The development dashboard can be reached with your favorite browser using the link <code>http://ip.addr.of.dev:3000</code>
 +
 +
Or simply:
 +
 +
  <code>http://localhost:3000</code>
  
 
To stop the development server, just hit <code>Ctrl+C</code> in the terminal where you started the server.
 
To stop the development server, just hit <code>Ctrl+C</code> in the terminal where you started the server.

Revision as of 20:36, 1 June 2011

Amahi Edge Working Notes

Amahi Edge is the developer version of Amahi, with the very latest and greatest code in it. It lives in a branch of the Amahi Git repo, called

  amahi-edge


How to Get Amahi Edge Running

First you need to get the latest git repository (see how on the Contribute-page)

After you've got the latest master branch you need to switch to the amahi-edge branch (and tell git to follow it on the remote server):

git checkout amahi-edge

The amahi-edge code uses a different database for it's data so we need to create one, copy the production data in it and migrate it to the new datamodel:

  • Go to /path/to/git/clone/platform/platform
  • Execute ./hda-create-db-and-user amahi_devel
  • Go to /path/to/git/clone/platform/platform/html/script
  • Execute ./db-duplicate hda_production amahi_devel
  • Go to /path/to/git/clone/platform/platform/html
  • Execute rake db:migrate

Now we have a working amahi-edge branch which can be used to develop features, gadgets, widgets and fix bugs.

To reach the amahi-edge branch you need to go to /path/to/git/clone/platform/platform/html and execute

./script/server

The development dashboard can be reached with your favorite browser using the link http://ip.addr.of.dev:3000

Or simply:

  http://localhost:3000

To stop the development server, just hit Ctrl+C in the terminal where you started the server.

How to install one Gadget

If you have developed a new gadget or fixed some bugs on an existing one you can install it using:

  • Go to /path/to/git/clone/platform/platform/html
  • Execute rake gadgets:install source=/path/to/the/gadget/source, e.g.
         rake gadgets:install source=../../gadgets/gadget_last_modified_files

When there are errors after installing the gadget you can uninstall it using:

  • Go to /path/to/git/clone/platform/platform/html
  • Execute rake gadgets:uninstall source=/path/to/the/gadget/source

Tips

  • Start with VM with snapshots. Take a snapshot of your VM to begin, in case you have to revert
  • If you do not have a VM, take a snapshot of your development database. You can use ./script/db-duplicate and ./script/db-restore (use with care!)