NCCOOS Trac Projects: Top | Web | Platforms | Processing | Viz | Sprints | Sandbox | (Wind)

Sprint Goals

  1. Migrate old SVN projects to new SVN instance
  2. Develop framework to organize existing code
  3. How to use wiki to reference/shortcut/organize/manage SVN

Sprint Tasks

...to meet above goals

  • Overview of wiki formatting
  • Overview/best practices of SVN
  • List available code
  • Decide on components and projects to organize above code
  • start placing code in SVN
  • Start wiki pages to point to code of interest

Available Projects

Top Level project tree

Projects give control over areas of work and responsible people. Each project has a number of components which are deployable source trees within a given project. The following outline is a brain dump of current code pieces that are maintained and stored by Sara, Jesse, and Chris to see how they fit into the framework of Projects. The "production" processes live and run on various computers.

Some possible projects are:

  • Platforms
    • Sara
      • data_acquisition (eVB)
      • daqLib (eVC)
      • data_transfer (eVB)
      • commLib (eVC)
  • Telemetry
  • Repository
  • Data Management change this project name to Data Processing
    • Jesse
      • GDP drifters (via AOML) to Xenia DB (seacoos)
      • CODAR to shapefile (seacoos)
      • QuikSCAT (seacoos)
    • Sara (buoy, tower) (met, ctd, adcp)
      • populate level0 (realtime and manual) (push and get)
      • raw2proc (level0 to level1)
      • proc2ndbc (push fm13 and fm64 to NDBC)
      • proc2latest (provide SEACOOS netCDF of latest data)
      • generate html tables (realtime)
    • Sara (codar) (surface currents)
      • tar2ms.pl (tar monthly CODAR raw spectra and rangefiles and and scp to mass-storage)
      • combine radial sites to total surface currents
      • radials proc2latest (provide SEACOOS netCDF of latest data)
      • totals proc2latest (provide SEACOOS netCDF of latest data)
  • Database
    • nccoos_obs DB

  • Visualization
    • Jesse
      • Chameleon application
      • NCCOOS interactive map application
      • Base mapfiles
      • OGC CGI wrappers
      • OGC mapfiles - parallel to SC feeds
      • Sandbox WMS applications
    • Sara
      • proc2tsplot (last 24 hours, last 7 days, last 30 days timeseries plots)
      • lastest2map (latest obs and various model maps)

SVN and Trac Demonstration

A demostration of how to implement our framework of Projects and code components in SVN and Trac. We will be creating the Platforms repository and project and component daqLib under the Platforms.

Keep in mind that a Trac Project corresponds to an SVN Repository and a Trac Component corresponds to an SVN folder in Repository

Creating Subversion Repository

login as root to coriolis.marine.unc.edu

% ssh root@coriolios.marine.unc.edu
passwd:

% cd /var/srv
% ls
svn trac

View instances of svn on coriolis

% ls svn
nccoos seacoos

Use svnadmin to create and manage repository. Get a list of help commands and help on specific command usage

% svnadmin help
% svnadmin help create

list repositories of nccoos

% ls svn/nccoos
datamgmt portal scratch

Create the SVN repository. NOTE: specify --fs-type fsfs because documentation is incorrect. It is fsfs is not the default.

% svnadmin create --fs-type fsfs /var/srv/svn/nccoos/platforms

Verify newly created SVN repository

% ls svn/nccoos
datamgmt platforms portal scratch
% ls snv/nccoos/platforms
conf dav db format hooks locks README.txt

Change permissions on SVN repository

% cd /var/srv/svn/nccoos
% chmod -R apache:root platforms

Tomorrow we will see how to create the folders for components under SVN if given permission to do so.

Create Trac Project and Compenent

Use initenv command trac-admin to create your project. Answer interactive questions. You will need to know exact path to svn repository that you just created.

% trac-admin /var/srv/trac/nccoos/platforms initenv

Project Name [My Project]: NCCOOS Observing Platforms
Database connection string [sqlite:db/trac.db]> use default
Path to repository [/srv/svn]> /var/srv/svn/nccoos/platforms
Templates directory [/usr/share/trac/templates]> use default
<...more stuff...>
Congratulations!

Verify the created component directory for trac just like with svn

% ls trac/nccoos
datamgmt platforms portal scratch

Configure Trac to recognize the new project

% cd /var/srv/trac/nccoos/platforms/conf
% ls
trac.ini
% vi trac.ini
  • remove all the default stuff
  • insert the following file that is a desired configuration from nccoos/portals project
  • insert ../../portal/conf/trac.ini
  • edit/change all "portal" stuff that was copied to apply for "platforms"

(Note: we need an example or template here)

Copy existing htdocs from portals for logo and facoicon.ico

% cd ../htdocs
% cp -a ../../portal/htdocs/* .

Change permissions recursively on the Trac project directory and files

% cd /var/srv/trac/nccoos
% chmod -R apache:root platforms

What to modify for Apache Server. Edit NCCOOS configuration

% cd /etc/httpd/conf.d
% vi nccoos.conf

duplicate <Location /portal> and change 3 occurences of portals to platforms

Restart Apache now that you have changed a configuration

% service httpd restart
Stopping httpd
Starting httpd ...

Add/Set permissions in dot-access of SVN

% cd /var/srv/svn/nccoos
% ls -a
. .. .access datamgmt platforms portal scratch
% vi .access

insert under [groups] who will work on this code add line "platform-developers = haines" insert under [scratch:/] add line "@platforms-develops = rw"

Allow all developers to create new components

[portal:/] as [platforms:/]
@platforms-developers = rw
cbc = rw
* = r

If want to refine who works on a specific component be specific in .access for example

[platforms:/daqLib]
cbc = rw
haines = rw
* = r

Get the Admin Menu on Trac Webpage for project using trac-admin interactively

% cd /var/srv/trac/nccoos/platforms
% trac-admin /var/srv/trac/nccoos/platforms/

List permissions and get help within Trac

Trac> permission list
Trac> help 
< ... >
permission add <user> <persmission>

Trac> help permission add cbc TRAC_ADMIN
Trac> exit

User cbc can now use web-based admin tools from the Admin menu on the Trac for the Platforms Project