This workflow describes how a vHub user may develop, test, troubleshoot, and deploy a new Tool on the vHub site. This workflow assumes the user has developed the tool using the C language; the tool GUI is developed using Rappture. ==Register New Tool== '''1.''' An existing vHub user logs in and accesses the [https://vhub.org/contribute/?task=start Contribution] form. '''2.''' Using the form, the user registers a new tool. In this page, the tool will be called ''toolname''. The Hub creates these items: * tool directory, under /apps/''toolname'' * tool subversion repository * [https://vhub.org/tools/workspace Workspace] access for the user tool status: '''REGISTERED''' ==Upload and Test Basic Tool== '''3.''' The user uploads working code for the new tool. The user compiles and tests the basic tool in the vHub Workspace. * upload options include sftp and [https://vhub.org/support/knowledgebase/tips/webdav webdav] * application space should be organized this way in the user workspace: {{{ ~/apps/toolname/ test/ - useful for testing basic tool code in this phase of dev repo/ - houses the local svn repository (checked-out code version) }}} tool status: '''CREATED''' '''4.''' The user checks out the Subversion directory structure into ~/apps/''toolname''/repo. From the ~/apps/''toolname'' directory: {{{ $ svn checkout https://vhub.org/tools/toolname/svn/trunk repo }}} This command creates the correct directory structure '''TODO: link to details''' for the Tool. ==Create Tool GUI== '''5.''' The user creates a tool GUI using Rappture. From the ~/apps/''toolname''/repo subdirectory: {{{ $ rappture -build }}} This command auto-generates a GUI that the Hub will use as a wrapper for the new Tool. The user must edit the following files so that the tool can run in the Hub: * rappture/tool.xml * src/Makefile * src/main.c '''TODO: link to details''' ==Build and Test Tool and GUI== '''6.''' The user builds and tests the tool: * run ''make'' in src/ directory * test the Tool in the Workspace by running invoke from the ~/repo directory: {{{ $ ./middleware/invoke }}} * fix paths or bugs as needed ==Check Tool and GUI in to Subversion== '''7.''' The user checks working code into the Hub's [http://nanohub.org/resources/3064/download/subversion.pdf Subversion] repository: * add all new files to Subversion, using the command: {{{ $ svn add path1/name1 path2/name2 }}} * Commit all files to the Subversion repository, using the command: {{{ $ svn commit }}} '''8.''' The user clicks/checks "My code has been uploaded" in the [https://vhub.org/contribtool Contribtool] page for the tool. tool status: '''UPLOADED''' ==Admin: Install Tool on Hub== '''9.''' The Hub Admin receives email about the new tool's status change. The admin must Install the tool on vHub. From Contribtool, the Hub Admin: * clicks the "Install" link * selects Install from dropdown, adds comments as needed, and clicks Submit. tool status: '''INSTALLED''' This tool status change flips the symbolic link /apps/''toolname''/dev to point to the most recent revision of the tool. ==Test and Verify Installed Tool== '''10.''' The user recieves email about the tool's status change. The user can visit the tool's Contribtool page and click Launch Tool. Now the Installed tool is running in the Hub's application space. It is not visible to others outside the development team. The user may access /apps/''toolname''/dev to run Installed code from the command line. '''11.''' Next steps: The user may do one of the following in Contribtool: * Approve the tool, if it works properly * After running the workspace, making changes, and checking them into Subversion, the user may Update the code, and ask for it to be (re) Installed. If tool code has been Updated, the Hub Admin receives email about this status change. The Hub Admin executes step 9. '''12.''' If the new tool has been Approved, the Hub Admin receives mail about the tool's status change. The Admin will mark the tool Approved in the Contribtool page, after launching the tool to verify that it runs. From Contribtool, the Hub Admin: * clicks "Publish" link * selects Publish from dropdown, adds comments as needed, and clicks Submit. tool status: '''PUBLISHED''' This status change flips the symbolic link /apps/''toolname''/current to point to the most recent revision of the tool. The tool is now accessible to others on vHub according to the access privileges the user set in Contribtool. ==Maintenance: Update and Test Tool== '''13.''' At any time, the user can make changes to the Tool, check them into the Subversion repository, then visit the Contribtool page to mark the tool as Updated. The Hub Administrator then executes step 9. The User may access /apps/''toolname''/current to run Approved code from the command line. ==References== * [http://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=3&cad=rja&ved=0CDEQFjAC&url=http%3A%2F%2Fhubzero.org%2Fresources%2F156%2Fdownload%2F1.1_Using_Workspaces.ppt&ei=TwVaUPWeOeSn0AHMzIGIAw&usg=AFQjCNGWe16iBIrRmEZWFY6OyMVKhbd4sA&sig2=BHpguFoTwAWMFmnkpQlyjA Using Workspaces (PDF)]