Project

General

Profile

Actions

AMI Eclipse Quick Start Guide » History » Revision 1

Revision 1/57 | Next »
Amber Herold, 01/22/2010 02:48 PM


AMI Eclipse Quick Start Guide

1. Get the Eclipse executable

  1. AMI has a preconfigured version available at [ ... ]
  2. Copy it to ...
  3. Double click the eclipse executable to open. If using a machine that was setup with the AMI kickstart program, you will need to update [...]

2. Create a Workspace and get the MyAMI code from Subversion

  1. Double click the eclipse executable found in the eclipse directory.
  2. When it opens, it will prompt you to choose a workspace. This workspace will be the directory that the code you want to work on will live in. A good workspace is /home/[your tsri user name]/amiworkspace.
  3. From the menu, select Window->Open Perspective->SVN Repository Exploring. This will open a view labeled SVN Repositories.
  4. Go to File->New->Repository Location.
  5. In the URL field type: http://emg.nysbc.org/svn/myami to get the Appion and Leginon code.
  6. Press the Finish button at the bottom of the dialog. A new repository will appear in the SVN Repositories view.
  7. Click on the arrow next to the repository icon to view the trunk, branches and tags associated with the repository.
  8. Click on the trunk to highlight it. Right click and select Checkout. This will get the code from the repo and put it in your workspace. When the operation completes, you will find a myami directory under amiworkspace in your home directory.

3. Configure your Development Environment

There are 2 types of development that you will most often do with the MyAMI code, Python for core processing and PHP for the web interface.

1. Setup the Python environment

  1. Go to Window->Preferences->PyDev->Editor->Interpreter – python. Press the Auto Config button then press OK.

2. Setup the PHP environment

There are two ways to view the web applications that you are developing in your home directory. If you are developing on a machine that does not have a local Apache server, you can use the Cronus3 web server.

1. How to use Cronus3 to view your web app

  1. Open a terminal and go to your home directory $ cd ~
  2. If is does not exist, create a directory called ami_html/ and cd to it $ mkdir ami_html/ $cd ami_html
  3. Create a symbolic link to the web app directory in your workspace. $ ln -s /home/[username]/amiworkspace/myami/myamiweb
  4. Try to browse to the project in a web browser ( http://cronus3/~username/myamiweb ). You should see an error because config.php failed to open.

2. Create your config files

IMPORTANT: Never check your local copy of the config files into Subversion. We don't want to share our database user information with the world.

3. How to use your local Apache server to view your web app

  1. Make sure you are logged in as root. ($ su)
  2. Make sure apache is installed. There should be a /etc/init.d/httpd on your machine. Start apache with $ /etc/init.d/httpd start.
  3. Point a web browser to http://localhost/ and make sure you see the apache test page.

How to add a new project that is not in SVN

  1. Open Eclipse
  2. Select the perspective icon on top right corner and chose Resource.
  3. Select File -> Add new project
  4. chose the type of project
  5. enter project name and click next

Updated by Amber Herold almost 15 years ago · 1 revisions