Changes between Version 12 and Version 13 of GEMINI/Tutorial/GEC20/GENI_Desktop_and_GEMINI_data/RetrieveData
- Timestamp:
- 06/20/14 16:28:16 (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GEMINI/Tutorial/GEC20/GENI_Desktop_and_GEMINI_data/RetrieveData
v12 v13 56 56 If one of the machines asks for a password your ssh keys may not be in place. Visit [https://portal.geni.net/secure/profile.php] and click SSH Keys to download your keys. 57 57 58 Now lets login to the Global Node. Your command prompt should be similar to "[username@GN0]" for confirmation. There are a few important files to note on this machine. The file {{{ /usr/local/etc/node.info }}} contains information about your slice and what services it's using. This file can be found on any Global Node as it is created during the Instrumentation process. The file {{{ /usr/local/etc/certs/unis-proxy.pem }}} is the key, cert used to query the UNIS API, which is also created during the Instrumentation process. 58 Now lets login to the Global Node. Your command prompt should be similar to "[username@GN0]" for confirmation. There are a few important files to note on this machine. [[BR]] 59 60 * The file {{{ /usr/local/etc/node.info }}} contains information about your slice and what services it's using. This file can be found on any Global Node as it is created during the Instrumentation process. [[BR]] 59 61 60 When making a request to the UNIS API you will need to supply your key, cert and also the UUID of your slice so that you only see your subsection of UNIS. The slice UUID can be found in the node.info with the following format, auth_uuid=fc028e53-cfbf-463d-9bf3-d26c35333b10. 62 * The file {{{ /usr/local/etc/certs/unis-proxy.pem }}} is the key, cert used to query the UNIS API, which is also created during the Instrumentation process. 63 64 When making a request to the UNIS API you will need to supply your key, cert and also the UUID of your slice so that you only see your subsection of UNIS. The slice UUID can be found in the "node.info" file with the following format, "auth_uuid=fc028e53-cfbf-463d-9bf3-d26c35333b10". 61 65 62 66 * For example, to query all the nodes on your slice: GET /nodes?properties.geni.slice_uuid=fc028e53-cfbf-463d-9bf3-d26c35333b10 … … 64 68 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. Fortunately, we provide a python script [https://github.com/periscope-ps/unis/blob/master/example/unis_client.py] to help facilitate this process. 65 69 66 If you would like to try a 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].70 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]. 67 71 68 Install Dependency [[BR]]72 Install Dependency's [[BR]] 69 73 {{{ cd /usr/src }}} [[BR]] 70 74 {{{ sudo wget http://nodejs.org/dist/v0.10.28/node-v0.10.28.tar.gz }}} [[BR]] … … 75 79 {{{ sudo make install }}} [[BR]] 76 80 81 {{{ sudo yum install git }}} 82 83 Test Dependency's [[BR]] 84 {{{ node -v }}} [[BR]] 85 v0.10.28 [[BR]] 86 {{{ npm -v }}} [[BR]] 87 1.4.9 [[BR]] 88 {{{ git --version }}} [[BR]] 89 git version 1.7.6.5 90 91 Clone Periscope Tool [[BR]] 92 {{{ cd ~ }}} [[BR]] 93 {{{ git clone https://github.com/periscope-ps/periscope.git }}} [[BR]] 94 {{{ cd periscope/peri-js/ }}} 95 96 Install Peri-JS Dependency's [[BR]] 97 {{{ sudo npm install }}} 98 {{{ sudo npm install -g bower }}} 99 {{{ bower install }}} 100 101 Start Peri-JS [[BR]] 102 {{{ sudo npm start }}} 103 104 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 is RESTful API itself that represents your subsection of UNIS. You can query this tool using the browser or command line. 105 106 Browser: http://pcvm2-4.instageni.illinois.edu:42424/api [[BR]] 107 Curl: curl pcvm2-4.instageni.illinois.edu:42424/api 108 109 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 display the data for your slice. 110 77 111 [[BR]]