Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

These are the tools we have pretty much settled on as a team.  For ease and consistency of development please try to remain on these tools and discuss with the team before introducing competing technologies.

Developer Software Tools

  • Operating System: what ever floats your boat.
  • IDE: Eclipse commonly used and free
  • Wiki / Issue Tracker / Code Browsing and Reviewing / Automated Builds: we have a Jira Studio subscription  (Nicole Deflaux and Mike Kellen as admins)
  • Code versioning: Subversion, hosted by Atlassian as part of our Jira Studio subscription
  • Build System: Maven
  • Build repository manager: see Sage's hosted Artifactory service see jFrog website for info (John Hill and Mike Kellen as admins)

Profilers

Code Coverage

We have been approved for free licenses to use Clover (Atlassian Code Coverage tool) for Eclipse. To install the Clover plug-in for eclipse you can use the update site http://update.atlassian.com/eclipse/clover

...

MONqrDkXrjMnJciwRtLBAEGFOmnBGjNmbRRWECCaUafBQo
mi2Kehqg3mIlkHdhHlTejumx2KzaGJQIsBkyJf66uTXT7W
NPQQsvpRQnqmPnrRpQPSunQNrOQnnRqMNovXXwssmXtvsW
vSttxsuurRqopnmomUUnovrnuoummmmmUUnovrnuoummmm
mUUJXdbW2flkbqtlohpUUnmmmm

Java Libraries

At this point we don't have any strict licensing requirements, however to maintain flexibility we have to be careful about licenses for software we choose to incorporate into our system.  The best licenses are open source licenses without copy-left provisions (e.g. Apache License) that give us maximal flexibility in what we later do with the code base.  Some strong copy-left licenses (e.g. GPL) would impose licensing requirements on us (e.g. force us to use GPL ourselves) if we chose to redistribute the code base at a later date. For now, we should just be aware of the mix of licenses incorporated into our projects, and have a bias for open source, non-copy left licenses.

Subversion

Developer branches

http://svnbook.red-bean.com/en/1.1/ch04s02.html#svn-ch-4-sect-2.1

For general SVN info see the SVN book

Moving files and directories

The eclipse plugin for svn generally does a decent job moving files and directories. See also http://svnbook.red-bean.com/en/1.1/re18.html

...

When in doubt, make a developer branch and try it there first.http://svnbook.red-bean.com/en/1.1/ch04s02.html#svn-ch-4-sect-2.1

Developer branches

Want to make a drastic change and run it by the team before merging it to trunk? Want to check in broken code? Make a branch and do it there.

Resources

How to Set Up Merge Tracking

  1. Download svnmerge.py
  2. Make a branch directory for yourself (you'll only need to do this once)
    Code Block
    
    svn mkdir https://sagebionetworks.jira.com/svn/PLFM/branches/deflaux
    
  3. Make a new branch from trunk
    Code Block
    
    svn copy https://sagebionetworks.jira.com/svn/PLFM/trunk https://sagebionetworks.jira.com/svn/PLFM/branches/deflaux/automatedIntegrationTesting
    
  4. Have both trunk and your new branch on your local hard drive, this assumes you already have trunk checked out in directory ~/platform
    Code Block
    
    cd ~/platform
    svn update trunk
    svn checkout https://sagebionetworks.jira.com/svn/PLFM/branches/deflaux/automatedIntegrationTesting
    
  5. Initialize merge tracking
    Code Block
    
    cd trunk
    svnmerge.py init ../automatedIntegrationTesting
    svn commit -F svnmerge-commit-message.txt
    cd ../automatedIntegrationTesting
    svnmerge.py init ../trunk
    svn commit -F svnmerge-commit-message.txt
    

How to merge

Merge from trunk to your branch

Best Practice: merge changes from trunk to your branch every morning Monday through Friday. This reduces the pain later when you want to merge from your branch to trunk.

  1. Ensure the branch is working and committed to SVN.
  2. To see what branches are available for importing, use this command from the branch distribution:
    Code Block
    
    python svnmerge.py avail
    
    • One of the results should be '/PLFM/trunk'.
  3. import the changes from trunk into the branch:
    Code Block
    
    python svnmerge.py merge -S /PLFM/trunk
    
  4. Resolve conflicts, compile, test and commit EVERYTHING in the branch.

Merge from your branch to trunk

  1. Go to an up-to-date local distribution of trunk.
  2. From the trunk distribution use the 'avail' command (above) to find the branch of interest.
  3. Use the following command to find the revision(s) of interest:
    Code Block
    
    python svnmerge.py avail -S <your branch>
    
  4. Import the changes from the branch into trunk:
    1. For all changes
      Code Block
      
      python svnmerge.py merge -S <your branch>
      
    2. For particular changes
      Code Block
      
      python svnmerge.py merge -r <your revisions comma separated> -S <your branch>
      
  5. Resolve conflicts, compile, test and commit.

Elastic Bamboo

We currently have MySQL running on our Elastic Bamboo host for the purposes of integration testing. This is accomplished by the customise-extras.sh shell script which is run at boot time for the hosts.

If you want to import a database dump, install Crowd, etc., here is how to modify that script:

  1. Log onto the currently running elastic instance (or spawn one if none are running). http://confluence.atlassian.com/display/BAMBOO/Accessing+an+Elastic+Instance
    • Note that the ssh key is on fremont:/work/platform/PasswordsAndCredentials/AtlassianAccountAWSCredentials/elasticbamboo.pk
    • Note that if you want to log onto the AWS console, Mike's username and password is on fremont:/work/platform/PasswordsAndCredentials/AtlassianAccountAWSCredentials/Mike'sPassword
  2. From the shell try out the commands you want to run at boot time
  3. Run you build and make sure it works
  4. Check your changes to customize-extras.sh into source control PLFM/trunk/tools/bamboo/bin/customise-extras.sh
  5. On the bamboo host, overwrite /mnt/bamboo-ebs/bin/customise-extras.sh with your updated script.
  6. Follow these instructions to create snapshot and configure bamboo to use it Updating your EBS snapshot
  7. Shutdown the host, and kick off a new build. This should start a new bamboo host that will run your updated script.
  8. Make sure the build passes!

For more information, see:

Tools To Know About

Pretty-Print JSON

...