Ghub Tool Development Workflow
Search
- Version 9
- by (unknown)
- Version 10
- by (unknown)
Deletions or items before changed
Additions or items after changed
1 | 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. | |||
---|---|---|---|---|
2 | ||||
3 | For more details about how to develop and deploy a tool on the Hub, refer to [https://vhub.org/explore/topics/CreateaHubToolwithRapptureBuilder Create a Hub Tool with Rappture Builder]. | |||
4 | ||||
5 | ==Register New Tool== | |||
6 | '''1.''' An existing vHub user logs in and accesses the [https://vhub.org/contribute/tools/register Contribution] form. | |||
7 | ||||
8 | '''2.''' Using the form, the user registers a new tool. In these instructions, the tool is called ''toolname''. | |||
9 | ||||
10 | The Hub creates these items for the new tool: | |||
11 | * tool directory, under /apps/''toolname'' | |||
12 | * tool subversion repository | |||
13 | * [https://vhub.org/tools/workspace Workspace] access for the user | |||
14 | ||||
15 | tool status: '''REGISTERED''' | |||
16 | ||||
17 | ==Upload and Test Basic Tool== | |||
18 | '''3.''' The user uploads working code for the new tool onto the Hub server. The tool is just a program that accepts inputs and generates outputs. The user compiles and tests this basic tool in the vHub Workspace. | |||
19 | * upload options include sftp and [https://vhub.org/support/knowledgebase/tips/webdav webdav] | |||
20 | * application space should be organized this way in the user workspace: | |||
21 | {{{ | |||
22 | ~/apps/toolname/ | |||
23 | test/ - useful for testing basic tool code | |||
24 | in this phase of dev | |||
25 | repo/ - houses the local svn repository | |||
26 | (checked-out code version) | |||
27 | }}} | |||
28 | ||||
29 | tool status: '''CREATED''' | |||
30 | ||||
31 | '''4.''' From the Workspace, the user checks out the Subversion directory structure into ~/apps/''toolname''/repo. From the ~/apps/''toolname'' directory: | |||
32 | {{{ | |||
33 | $ svn checkout https://vhub.org/tools/toolname/svn/trunk repo | |||
34 | }}} | |||
35 | This command creates the [https://vhub.org/topics/Hubtooldirectorystructure correct directory structure] for the tool. | |||
36 | ||||
37 | ==Create Tool GUI== | |||
38 | '''5.''' From the Workspace, the user [https://vhub.org/topics/CreateaHubToolwithRapptureBuilder#rappture-builder creates] a tool GUI using Rappture. From the ~/apps/''toolname''/repo subdirectory: | |||
39 | ||||
40 | {{{ | |||
41 | $ rappture -build | |||
42 | }}} | |||
43 | ||||
44 | This command auto-generates a GUI that the Hub will use as a wrapper for the new tool. | |||
45 | ||||
46 | The user must [https://vhub.org/topics/CreateaHubToolwithRapptureBuilder#edit edit] the following files so that the tool can run in the Hub: | |||
47 | * rappture/tool.xml | |||
48 | * src/Makefile | |||
49 | * src/main.c | |||
50 | ||||
51 | ==Build and Test Tool and GUI== | |||
52 | '''6.''' From the Workspace, the user builds and tests the tool: | |||
53 | * run ''make'' in src/ directory | |||
54 | ||||
55 | * test the tool in the Workspace by running invoke from the ~/repo directory: | |||
56 | ||||
57 | {{{ | |||
58 | $ ./middleware/invoke | |||
59 | }}} | |||
60 | ||||
61 | * fix paths or bugs as needed | |||
62 | ||||
63 | ==Check Tool and GUI in to Subversion== | |||
64 | '''7.''' From the Workspace, the user checks working code into the Hub's [http://nanohub.org/resources/3064/download/subversion.pdf Subversion] repository, from the ~/repo/ directory: | |||
65 | ||||
66 | * add all new files to Subversion, using a command like: | |||
67 | {{{ | |||
68 | $ svn add path1/filename1 path2/filename2 | |||
69 | }}} | |||
70 | * Commit all files to the Subversion repository, using the command: | |||
71 | {{{ | |||
72 | $ svn commit | |||
73 | }}} | |||
74 | ||||
75 | '''8.''' The user clicks/checks "My code has been uploaded" in the [https://vhub.org/contribtool Contribtool] page for the tool. | |||
76 | ||||
77 | tool status: '''UPLOADED''' | |||
78 | ||||
79 | ==Admin: Install Tool on Hub== | |||
80 | - | '''9.''' The Hub Admin receives email about the new tool's status change. The admin must Install the tool on vHub |
+ | '''9.''' The Hub Admin receives email about the new tool's status change. The admin must Install the tool on vHub as follows:
|
81 | ||||
82 | - | * |
+ | * in Contribtool, click the "Install" link for the tool
|
83 | - | * |
+ | * in the Workspace, compile the tool in src/ and verify the executable
|
84 | + | * in Contribtool, select Install from the dropdown, add comments as needed, and click Submit.
|
||
85 | ||||
86 | tool status: '''INSTALLED''' | |||
87 | ||||
88 | This tool status change flips the symbolic link /apps/''toolname''/dev/ to point to the most recent revision of the tool. | |||
89 | ||||
90 | ==Test and Verify Installed Tool== | |||
91 | ||||
92 | '''10.''' The user receives email about the tool's status change. Now the Installed tool can be run in the Hub's application space. It is not visible to others outside the development team. | |||
93 | ||||
94 | To run the Installed tool, the development user may: | |||
95 | * visit the tool's Contribtool page and click Launch Tool. | |||
96 | * use the Workspace command line to access /apps/''toolname''/dev and issue the ''invoke'' command. | |||
97 | ||||
98 | '''11.''' Using Contribtool, the user may do one of the following: | |||
99 | * Approve the tool, if it works properly | |||
100 | * 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. | |||
101 | If tool code has been Updated, the Hub Admin receives email about this status change. The Hub Admin executes step 9. | |||
102 | ||||
103 | '''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: | |||
104 | ||||
105 | * clicks the "Publish" link | |||
106 | * selects Publish from the dropdown, adds comments as needed, and clicks Submit. | |||
107 | ||||
108 | tool status: '''PUBLISHED''' | |||
109 | ||||
110 | This status change flips the symbolic link /apps/''toolname''/current/ to point to the most recent revision of the tool. | |||
111 | ||||
112 | The tool is now accessible to others on vHub according to the access privileges the user set in Contribtool. | |||
113 | ||||
114 | ==Maintenance: Update and Test Tool== | |||
115 | '''13.''' At any time, the user can access the Workspace to make changes to the tool and check them into the Subversion repository. The user should then visit the Contribtool page to mark the tool as Updated. The Hub Administrator then executes step 9. | |||
116 | ||||
117 | To run and test the tool from the Workspace command line, the user may access: | |||
118 | * /apps/''toolname''/dev to run Installed code | |||
119 | * /apps/''toolname''/current to run Approved code | |||
120 | ||||
121 | The user may consult the [https://vhub.org/explore/topics/Hubtooldirectorystructure#user-session ~/data/] subdirectories, sessions/ and results/, to assist in troubleshooting. | |||
122 | ||||
123 | ==References== | |||
124 | * [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)] |