Changes between Version 2 and Version 3 of GEMINI/Tutorial/GEC21/GENI_Desktop_and_GEMINI_data/RetrieveData


Ignore:
Timestamp:
10/22/14 09:31:57 (5 years ago)
Author:
mkeele@indiana.edu
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GEMINI/Tutorial/GEC21/GENI_Desktop_and_GEMINI_data/RetrieveData

    v2 v3  
    4242These 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/].
    4343
    44 If you completed the previous exercise, [http://groups.geni.net/geni/wiki/GEMINI/Tutorial/GEC20/GENI_Desktop_and_GEMINI_blipp/ExecuteExperiment], then you should have an Instrumentized slice with a couple of Virtual Machines and a Global Node.
     44If 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.
    4545
    4646[[Image(slice.png)]]
     
    5151
    5252{{{
    53 $ ssh username@pcvm2-4.instageni.illinois.edu
     53$ ssh username@GN
    5454 > Global Node
    55 $ ssh username@pc2.instageni.illinois.edu -p 33339
     55$ ssh username@VM -p 33339
    5656 > Measurement Point
    57 $ ssh username@pc2.instageni.illinois.edu -p 33340
     57$ ssh username@VM-0 -p 33340
    5858 > Measurement Point
    5959}}}
     
    7474If 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.
    7575
    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 }}}
     76If 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].
    8977
    9078=== Test Dependencies ===
     
    9482$ npm -v
    9583 > 1.4.9
    96 $ git --version
    97  > git version 1.7.6.5
    9884}}}
    9985
    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 ===
    11587{{{
    11688$ sudo npm start
    11789}}}
    11890
    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-JS tool provides a RESTful API that represents your subsection of UNIS. You can query this tool using the browser or command line.
     91Upon 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.
    12092
    121 1. http://pcvm2-4.instageni.illinois.edu:42424/api [[BR]]
    122 2. $ curl pcvm2-4.instageni.illinois.edu:42424/api
     931. http://GN:42424/api [[BR]]
     942. $ curl GN:42424/api
    12395
    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-JS only displays the data for your slice.
     96Either 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.
    12597
    12698=== Routes ===
     
    133105GET /api/measurements
    134106GET /api/measurements/:id
    135 POST /api/measurements/:id
    136 PUT /api/measurements/:id
    137 DELETE /api/measurements/:id
    138107GET /api/data/:id
    139108GET /api/links
     
    145114}}}
    146115
    147 1. http://pcvm2-4.instageni.illinois.edu:42424/api/measurements
     1161. http://GN:42424/api/measurements
    148117
    149118[[Image(cpu_measurement.png)]]
     
    153122Now, lets step through the process of gathering cpu usage data.
    154123
    155 2. http://pcvm2-4.instageni.illinois.edu:42424/api/metadata
     1242. http://GN:42424/api/metadata
    156125  * list of all metadata
    157126
     
    165134For the cpu used event type copy the value for the id key and add that value to your route
    166135
    167 3. http://pcvm2-4.instageni.illinois.edu:42424/api/metadata/53a486a7377f972d2e1b8e73
     1363. http://GN:42424/api/metadata/:id
    168137  * single metadata object for load min load
    169138
     
    172141Replace metadata with data in the URL to get the data associated with the metadata event type
    173142
    174 4. http://pcvm2-4.instageni.illinois.edu:42424/api/data/53a486a7377f972d2e1b8e73
     1434. http://GN:42424/api/data/:id
    175144  * actual cpu load data
    176145
     
    181150Once 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.
    182151
    183 5. http://pcvm2-4.instageni.illinois.edu:42424/metadata/53a486a7377f972d2e1b8e73
     1525. http://GN:42424/metadata/:id
    184153  * simple graph of data
    185154