20 | | = Configure and Initialize Services:Configure Omni = |
21 | | {{{ |
22 | | #!html |
23 | | |
24 | | <table border="0"> |
25 | | <tr> |
26 | | <td> <img border="0" src="http://trac.gpolab.bbn.com/gcf/attachment/wiki/Omni/omni-pic.png?format=raw" alt="Omni Client" width="100"/> <br/> |
27 | | </td> |
28 | | <td> <pre> </pre> </td> |
29 | | |
30 | | <td> Omni is a tool that will help you reserve resources in GENI, using your GENI |
31 | | credentials. The first step is to load into Omni your information. |
32 | | Omni uses a configuration file, and there is a script that will automatically generate the file with |
33 | | some default options and place it in the default place of `~/.gcf/`. |
34 | | </td> |
35 | | <td> <pre> </pre> </td> |
36 | | </tr> |
37 | | </table> |
38 | | }}} |
39 | | |
40 | | {{{ |
41 | | #!html |
42 | | |
43 | | <table border="0"> |
44 | | <tr> |
45 | | |
46 | | <td> |
47 | | Follow these steps: |
48 | | <ol> |
49 | | <li> In the GENI Portal, go to the `Profile` Tab. </li> |
50 | | <li> Scroll all the way to the end of the page, to the section titled ''Configure omni'' </li> |
51 | | <li> Click on the ''customized configuration data'' link </li> |
52 | | <li> If this is the <b> first time </b> you do this: |
53 | | <ol type="a"> |
54 | | <li> Press the <b> generate an SSL Cert</b> link </li> |
55 | | <li> Make sure you choose the first option </li> |
56 | | </ol> |
57 | | <li> In the next page, make sure you choose as your project, the project you just joined and click the ''Download omni bundle'' button, and select to save it.</li> |
58 | | <li> Open a terminal window </lo> |
59 | | <li> Run: <ul><li><code> omni-configure.py -f portal </code></li></ul> </li> |
60 | | </ol> |
61 | | </td> |
62 | | <td> <pre> </pre> </td> |
63 | | <td> <img border="0" src="http://groups.geni.net/geni/attachment/wiki/GENIExperimenter/Graphics/generate_cert.png?format=raw" alt="Generate SSL cert" width="300"/> |
64 | | </td> |
65 | | <td> <pre> </pre> </td> |
66 | | </tr> |
67 | | </table> |
68 | | }}} |
69 | | |
70 | | |
71 | | The output should look like: |
72 | | {{{ |
73 | | geni@GEC16-Tutorials:~$ omni-configure.py -f portal |
74 | | {'portal_bundle': '~/Downloads/omni-bundle.zip', 'verbose': False, 'cert': '~/.ssl/geni_cert', 'framework': 'portal', ' |
75 | | configfile': '~/.gcf/omni_config', 'plkey': '~/.ssh/geni_pl_key', 'prkey': '~/.ssh/geni_key', 'pick_project': False} |
76 | | INFO:omniconfig:Using configfile: /home/geni/.gcf/omni_config |
77 | | INFO:omniconfig:Using portal bundle /home/geni/Downloads/omni-bundle.zip |
78 | | INFO:omniconfig:Private key stored at: /home/geni/.ssh/geni_key |
79 | | INFO:omniconfig:Wrote omni configuration file at: /home/geni/.gcf/omni_config |
80 | | geni@GEC16-Tutorials:~$ omni-configure.py -f portal |
81 | | }}} |
82 | | |
83 | | == Look around the omni_config file == |
84 | | Open the file `~/.gcf/omni_config` using either vim or emacs. Close to the top of the file you will see two parameters called `default_cf` and `users`. Your username should be at least listed in the user section. Look for the sections in the file that are named `[pgch]` and `[<username>]`. |
85 | | |
86 | | In the `[<username>]` section, the information need for logging-in to reserved compute resources are provided. It includes your unique user URN and a public key that would be uploaded to the hosts that you reserve. |
87 | | |
88 | | In the `[pgch]` section you configure Omni to use your personal information. The cert and the key attribute point to files that we have manually downloaded from the portal. |
89 | | |
90 | | Another interesting section to look at is the `[aggregate-nicknames]` sections. Flack already knows the URL for all the AMs and present you a list of AMs to choose from using a short, descriptive name. In Omni a user is required to pass the URL for each call to the GENI AM API. In this section the user gets a chance to provide short descriptive names to the URLs that are easier to memorize and use. |
91 | | |
92 | | == Test Omni setup == |
93 | | In order to test that our configuration is correct, you can issue a `getversion` |
94 | | command. For this step we have used ProtoGENI's AM, but you can use any |
95 | | Aggregate Manager(AM). |
96 | | i. In the terminal type: |
97 | | {{{ |
98 | | omni.py getversion -a ig-gpo |
99 | | }}} |
100 | | In GENI each AM can be contacted using a specific URL. In order to make it |
101 | | easier to talk to AMs, Omni uses nicknames; i.e. it maps each URL into an easy |
102 | | to remember nickname. Nicknames are defined in each user's omni_config file. |
103 | | |
104 | | For the rest of the tutorial we are going to use aggregate nicknames. |
105 | | |
106 | | = Obtain Resources = |
107 | | In this step we are going to setup a sample GENI experiment, in order to |
108 | | get familiarized with most of the Omni commands. |
109 | | |
110 | | == Create and renew a slice == |
111 | | The first thing to do when preparing to run a GENI experiment is to create a |
112 | | slice. |
113 | | i. To create a slice type, use as `<slicename>` omniXXX, where XXX are your initials. : |
114 | | {{{ |
115 | | omni.py createslice <slicename> |
116 | | }}} |
117 | | ii. To verify that your slice has been created and in general to keep track of |
118 | | your slices, use the `listmyslices`. You can figure out your username under the `Profile` tab. Type: |
119 | | {{{ |
120 | | omni.py listmyslices <username> |
121 | | }}} |
122 | | iii. Renew your slice. To extend the lifetime of your slice type: |
123 | | {{{ |
124 | | omni.py renewslice <slicename> YYYYMMDD |
125 | | }}} |
126 | | |
127 | | == Reserve resources, a.k.a create a sliver == |
128 | | The next step in a GENI experiment is to actually reserve resources. For this |
129 | | experiment we are going to use the Aggregate manager of ProtoGENI in Utah. |
130 | | i. In Omni in order to see what each AM offers you can use the |
131 | | `listresources` command. Type: |
132 | | {{{ |
133 | | omni.py listresources -a pg-utah -o |
134 | | }}} |
135 | | The `-o` option will save the output to a file. The filename is chosen by Omni and printed as part of the output. The output will look like : |
136 | | {{{ |
137 | | geni@GEC16-Tutorials:~$ omni.py listresources -a pg-utah -o |
138 | | INFO:omni:Loading config file /home/geni/.gcf/omni_config |
139 | | INFO:omni:Using control framework portal |
140 | | INFO:omni:Substituting AM nickname pg-utah with URL https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0, URN unspecified_AM_URN |
141 | | INFO:omni:Saving output to a file. |
142 | | INFO:omni:Substituting AM nickname pg-utah with URL https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0, URN unspecified_AM_URN |
143 | | INFO:omni:Listed advertised resources at 1 out of 1 possible aggregates. |
144 | | INFO:omni:Substituting AM nickname pg-utah with URL https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0, URN unspecified_AM_URN |
145 | | INFO:omni: (PG log url - look here for details on any failures: https://www.emulab.net/spewlogfile.php3?logfile=4f418118189f457f2b1e0cbd2c304584) |
146 | | INFO:omni:Writing to 'rspec-www-emulab-net-protogeniv2.xml' |
147 | | INFO:omni: ------------------------------------------------------------ |
148 | | INFO:omni: Completed listresources: |
149 | | |
150 | | Options as run: |
151 | | aggregate: ['pg-utah'] |
152 | | framework: portal |
153 | | output: True |
154 | | project: SampleClass |
155 | | |
156 | | Args: listresources |
157 | | |
158 | | Result Summary: Queried resources from 1 of 1 aggregate(s). |
159 | | Wrote rspecs from 1 aggregate(s) to 1 file(s) |
160 | | Saved listresources RSpec at 'unspecified_AM_URN' (url 'https://www.emulab.net:12369/protogeni/xmlrpc/am/2.0') to file rspec-www-emulab-net-protogeniv2.xml; (PG log url - look here for details on any failures: https://www.emulab.net/spewlogfile.php3?logfile=4f418118189f457f2b1e0cbd2c304584) |
161 | | INFO:omni: ============================================================ |
162 | | }}} |
163 | | In the last line of the output Omni will tell you the name of the file that output is saved at. In the example above this would be `rspec-www-emulab-net-protogeniv2.xml`. Open the file that Omni saved and just take a look to see how an advertisement RSpec looks like. |
164 | | In order to see only available resources type |
165 | | {{{ |
166 | | omni.py listresources -a pg-utah --available -o |
167 | | }}} |
168 | | i. To be able to reserve resources you will need to craft a request rspec. |
169 | | For this example we have created the rspec for you, use this rspec URL :[[BR]] |
170 | | http://www.gpolab.bbn.com/experiment-support/HelloGENI/hellogeni.rspec . Type : |
171 | | {{{ |
172 | | omni.py createsliver -a pg-utah <slicename> <rspec_url> |
173 | | }}} |
174 | | |
175 | | i. Look at your reserved resources. Type: |
176 | | {{{ |
177 | | omni.py listresources -a pg-utah <slicename> |
178 | | }}} |
179 | | i. Extend the lifetime of your sliver: |
180 | | {{{ |
181 | | omni.py renewsliver -a pg-utah <slicename> YYYYMMDD |
182 | | }}} |
183 | | i. Check the status of your resources. Type: |
184 | | {{{ |
185 | | omni.py sliverstatus -a pg-utah <slicename> |
186 | | }}} |
187 | | The `sliverstatus` command reports the status of your overall GENI slice. When |
188 | | the status is ready we are ready to continue to the next step. |
| 20 | = STEPS FOR SETTING UP = |