Changes between Version 2 and Version 3 of GEMINI/Tutorial/GEC21/GENI_Desktop_and_GEMINI_data/RetrieveData
- Timestamp:
- 10/22/14 09:31:57 (9 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GEMINI/Tutorial/GEC21/GENI_Desktop_and_GEMINI_data/RetrieveData
v2 v3 42 42 These HTTP requests to UNIS can be executed through the browser, a script, or via the command line. For a more detailed explaination of the UNIS RESTful API see [https://github.com/GENI-GEMINI/GEMINI/wiki/UNIS-REST-API]. A user can supply the same HTTP verbs to interact with the MS but remember that the MS is located on the Global Node for a given slice. For a more detailed explaination of the MS RESTful API see [https://github.com/GENI-GEMINI/GEMINI/wiki/MS-REST-API]. If you would like more information about how UNIS represents the individual components of a network see this detailed resource [http://monitor.incntre.iu.edu/docs/]. 43 43 44 If you completed the previous exercise, [http://groups.geni.net/geni/wiki/GEMINI/Tutorial/GEC2 0/GENI_Desktop_and_GEMINI_blipp/ExecuteExperiment], then you should have an Instrumentized slice with a couple of Virtual Machines and a Global Node.44 If you completed the previous exercise, [http://groups.geni.net/geni/wiki/GEMINI/Tutorial/GEC21/GENI_Desktop_and_GEMINI_blipp/ExecuteExperiment], then you should have an Instrumentized slice with a couple of Virtual Machines and a Global Node. 45 45 46 46 [[Image(slice.png)]] … … 51 51 52 52 {{{ 53 $ ssh username@ pcvm2-4.instageni.illinois.edu53 $ ssh username@GN 54 54 > Global Node 55 $ ssh username@ pc2.instageni.illinois.edu-p 3333955 $ ssh username@VM -p 33339 56 56 > Measurement Point 57 $ ssh username@ pc2.instageni.illinois.edu-p 3334057 $ ssh username@VM-0 -p 33340 58 58 > Measurement Point 59 59 }}} … … 74 74 If you're going to be using a command line tool, such as curl, you will need to follow this structure to retrieve information from UNIS. Here, we provide a python script [https://github.com/periscope-ps/unis/blob/master/example/unis_client.py] to help facilitate this process. 75 75 76 If you would like to try a periscope tool that handles your key, cert and slice uuid for you, then you will need to install a dependency on the Global Node. For this example my Global Node is Fedora 15 but if you're using another image you can see more installation instructions here [https://github.com/periscope-ps/periscope/tree/master/peri-js]. 77 78 === Install Dependencies === 79 {{{ 80 $ cd /usr/src 81 $ sudo wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz 82 $ sudo tar -xvzf node-v0.10.28.tar.gz 83 $ cd node-v0.10.28 84 $ sudo ./configure 85 $ sudo make 86 $ sudo make install 87 $ sudo yum install git 88 }}} 76 If you would like to try the GEMINI tool that handles your key, cert and slice uuid for you, then login on the Global Node. For this example the Global Node is running on Fedora 15 but if you're using another image you can see more installation instructions here [https://github.com/periscope-ps/periscope/tree/gemini/peri-js]. 89 77 90 78 === Test Dependencies === … … 94 82 $ npm -v 95 83 > 1.4.9 96 $ git --version97 > git version 1.7.6.598 84 }}} 99 85 100 === Clone Periscope Tool === 101 {{{ 102 $ cd ~ 103 $ git clone https://github.com/periscope-ps/periscope.git 104 $ cd periscope/peri-js/ 105 }}} 106 107 === Install Peri-JS Dependencies === 108 {{{ 109 $ sudo npm install 110 $ sudo npm install -g bower 111 $ bower install 112 }}} 113 114 === Start Peri-JS === 86 === Start GEMINI Framework === 115 87 {{{ 116 88 $ sudo npm start 117 89 }}} 118 90 119 Upon starting this tool you will see the UNIS instance you are connecting to, the MS store instance, and various information about the Global Node. The Peri-JStool provides a RESTful API that represents your subsection of UNIS. You can query this tool using the browser or command line.91 Upon starting this tool you will see the UNIS instance you are connecting to, the MS store instance, and various information about the Global Node. The GEMINI tool provides a RESTful API that represents your subsection of UNIS. You can query this tool using the browser or command line. 120 92 121 1. http:// pcvm2-4.instageni.illinois.edu:42424/api [[BR]]122 2. $ curl pcvm2-4.instageni.illinois.edu:42424/api93 1. http://GN:42424/api [[BR]] 94 2. $ curl GN:42424/api 123 95 124 Either way, when you request this URL you will see a list of routes you can query. These routes accept the same HTTP verbs as the UNIS and MS API's but Peri-JSonly displays the data for your slice.96 Either way, when you request this URL you will see a list of routes you can query. These routes accept the same HTTP verbs as the UNIS and MS API's but GEMINI only displays the data for your slice. 125 97 126 98 === Routes === … … 133 105 GET /api/measurements 134 106 GET /api/measurements/:id 135 POST /api/measurements/:id136 PUT /api/measurements/:id137 DELETE /api/measurements/:id138 107 GET /api/data/:id 139 108 GET /api/links … … 145 114 }}} 146 115 147 1. http:// pcvm2-4.instageni.illinois.edu:42424/api/measurements116 1. http://GN:42424/api/measurements 148 117 149 118 [[Image(cpu_measurement.png)]] … … 153 122 Now, lets step through the process of gathering cpu usage data. 154 123 155 2. http:// pcvm2-4.instageni.illinois.edu:42424/api/metadata124 2. http://GN:42424/api/metadata 156 125 * list of all metadata 157 126 … … 165 134 For the cpu used event type copy the value for the id key and add that value to your route 166 135 167 3. http:// pcvm2-4.instageni.illinois.edu:42424/api/metadata/53a486a7377f972d2e1b8e73136 3. http://GN:42424/api/metadata/:id 168 137 * single metadata object for load min load 169 138 … … 172 141 Replace metadata with data in the URL to get the data associated with the metadata event type 173 142 174 4. http:// pcvm2-4.instageni.illinois.edu:42424/api/data/53a486a7377f972d2e1b8e73143 4. http://GN:42424/api/data/:id 175 144 * actual cpu load data 176 145 … … 181 150 Once you have your data you might like to visualize it to help make discoveries from the data. At this repository, [https://github.com/GENI-GEMINI/UW/blob/master/msplot_python/ms_plot.py] we provide a script to help you with data visualization. 182 151 183 5. http:// pcvm2-4.instageni.illinois.edu:42424/metadata/53a486a7377f972d2e1b8e73152 5. http://GN:42424/metadata/:id 184 153 * simple graph of data 185 154