wiki:EclipseSetup
Last modified 7 years ago Last modified on 02/16/13 08:44:42

UDS is composed of a number of projects. Most projects (except .NET ones, and C/C++ Windows parts) have been created using Eclipse 3.7.2 + Pydev, and the project information has been included into the repository.

Here we will try to explain how to use Eclipse to manage different projects included inside UDS.

Packages needed:

  • Eclipse
  • Django (web & database framework)
  • South (migrations)
  • Ovirt python sdk (for ovirt provider)
  • pychart (for server charting)

You have, into UDS repository, the followings proyects, that can be imported inside Eclipse using subclipse.

  • server This is the server part of UDS, what will provide the background and the web part (html and xmlrpc) of UDS. To make this work, follow this steps:
    1. Create new SVN Project, and export it from /trunk/server
    2. Copy src/server/settings.py.sample to src/server/settings.py, and modify it to your needs. You will need a database (Mysql) in order to make UDS run.
    3. Configure PyDev to add your Python 2.7 as interpreter

Now for running UDS from Eclipse, generate a new Run Configuration with this settings:

  • Create new PyDev Django configuration.
  • Give it the name you like (Django Server, for example)
  • Select "uds" project (in case you leaved the name as obtained from repository)
  • Select "src/manage.py" as main module
  • In the "(x)= arguments" tab, enter as program argument: "runserver --noreload IP:PORT"
  • In the interpreter tab, select your python 2.7 (note: i have problems here sometimes, if you have problems, give your python 2.7 interpreter the name "python2.7")
  • Select any other option that you consider, and save it Now you can run the server from Eclipse.

note: UDS is composed also of several background workers. Right now, i use command line (using "python manage.py taskManager" with --start, --stop or both) to run background workers (it will daemonize itself and exit), if someone gets it working in an "easy way", please, email it to me or incude it here :-)