== 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 == [http://trac.nccoos.org 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 * [http://trac.nccoos.org/datamgmt 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) * [http://trac.nccoos.org/portal Web Portal] * [http://trac.nccoos.org/scratch Sandbox] == 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 }}} Add/Set permissions in dot-access of SVN {{{ % cd /var/srv/svn/nccoos % ls -a . .. .access datamgmt platforms portal scratch % vi .access }}} insert line under {{{[groups]}}} who will work on this code {{{ platform-developers = haines }}} insert line under {{{[scratch:/]}}} {{{ @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 you can be very specific in .access, for example {{{ [platforms:/daqLib] cbc = rw haines = rw * = r }}} Now we are ready to create folders and submit code to SVN. See the section on committing code to SVN and creating component folders if given permission to do so. But first we need to set up the Trac project and component. == Create Trac Project and Component == 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 }}} 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 Trac> help permission add cbc TRAC_ADMIN Trac> exit }}} == Apache Server == You will need to make some changes to the Apache server configuration and restart the http daemon. Edit NCCOOS configuration {{{ % cd /etc/httpd/conf.d % vi nccoos.conf }}} duplicate {{{}}} and change 3 occurences of {{{portals}}} to {{{platforms}}} Restart Apache now that you have changed a configuration {{{ % service httpd restart Stopping httpd Starting httpd ... }}} User cbc can now use web-based admin tools from the Admin menu on the Trac for the [http://trac.nccoos.org/platforms/ Platforms Project] == Committing Code to Subversion == http://subversion.tigris.org/ Tortoise SVN Book http://svnbook.red-bean.com/ pg 21 Subversion Architecture Diagram Lock-Modify-Unlock Model can do this in SVN, but it is not cool. Copy-Modify-Merge Model is the way SVN operates and is optimistic. Components * Trunk - main code housed here * Branches - under development - not production * Tags - ID a release level of revisions in trunk === Windows using Tortoise === * Right click on folder * Import in Tortoise menu * http://svn.nccoos.org/scratch/daqlib * UID and PW (same as trac) * Adding files bit by bit * rev # increase on a repos. basis * in SVN now * Create working copy - SVN checkout * right click and choose Checkout * pick local space to save * Head Revision - OK * green checkmark - uptodate * don't F with .svn folder * Make changes as needed * Can commit single changed file or container folder * Tortoise update to ensure that files have not changed since Checkout * Export to deploy - just like CO but no bookeeping