172 | | == d. Install Script == |
173 | | |
174 | | Launch Flack for your slice, and import the RSpec `4node-v1.rspec` we just saved. |
175 | | |
176 | | Click '''Import''' and select '''Import from file''' from the pull-down list, then select `4node-v1.rspec` from the location where you have just saved to, and confirm it. You will see the four-node topology on your canvas, and each node has been configured to have the custom image. |
177 | | |
178 | | [[Image(GENIExperimenter/Tutorials/SystematicExprCaseStudy/SmallTopo/DesignSetup:import-rspec-from-file.png)]] |
179 | | |
180 | | Now, we are ready to add an install script by editing the node property. For each node, click [[Image(GENIExperimenter/Tutorials/SystematicExprCaseStudy/SmallTopo/DesignSetup:info.jpg)]] to see the node information. By clicking [[Image(GENIExperimenter/Tutorials/SystematicExprCaseStudy/SmallTopo/DesignSetup:add-service-btn.png)]], we are able to add a service that usually refers to an install script. In this tutorial, we will add an install script called `xorp_autostart.tar.gz`, by entering the link ''http://www.gpolab.bbn.com/exp/sysexpr/xorp_autostart.tar.gz'', and the install path is set as ''/local''. By clicking [[Image(GENIExperimenter/Tutorials/SystematicExprCaseStudy/SmallTopo/DesignSetup:add-exe-serv-btn.png)]], we can add the commend that execute the install script. In the execute box, we enter `/bin/bash /local/xorp_autostart/start-xorp.sh`, and the shell type is `sh`. |
181 | | |
182 | | [[Image(GENIExperimenter/Tutorials/SystematicExprCaseStudy/SmallTopo/DesignSetup:node-install-service.png)]] |
183 | | |
184 | | Once we added the service and the execute service in Flack, apply the changes and submit the VM reservation request, the OSPF configuration file will be automatically created and the XORP will be started at `router-1` once it is initialized. |
185 | | |
186 | | Repeat the same procedures for the other three routers (i.e., `router-2`, `router-3`, `router-4`), and then '''submit''' the request. When all resources are ready, '''Save''' the RSpec as `4node-v2.rspec` at this stage, we will load this RSpec in the next step to get the same setup. (You can download a sample RSpec for `4node-v2.rspec` at [http://www.gpolab.bbn.com/exp/sysexpr/rspec-for-wiki/4node-v2.rspec here]) |
187 | | |
188 | | Setting up the install script will automate installation or configuration process at every node's postboot stage, and we do not need to login to every node to run `start-xorp.sh` manually. |
189 | | |
190 | | = 2. Impact to Request RSpec = |
191 | | |
192 | | Whenever we make a change to node information or link information in Flack, the user request RSpec is modified accordingly. In other words, we can rely on Flack to easily modify the request RSpec. |
193 | | |
194 | | Now let's take a look at how the steps [wiki:GENIExperimenter/Tutorials/SystematicExprCaseStudy/InstallSoftware#a4.VerifyInstaGENICustomImage Load a Custom Image] and [wiki:GENIExperimenter/Tutorials/SystematicExprCaseStudy/SmallTopo/DesignSetup#e.InstallScript Adding Install Scripts] will modify the request RSpec. For instance, before adding the custom image and install scripts, the RSpec describing `router-1` was like: |
195 | | |
196 | | {{{ |
197 | | <node client_id="router-1" component_manager_id="urn:publicid:IDN+instageni.stanford.edu+authority+cm" component_id="urn:publicid:IDN+instageni.stanford.edu+node+pc3" component_name="pc3" exclusive="false"> |
198 | | <vnode name="pcvm3-3" xmlns="http://www.protogeni.net/resources/rspec/ext/emulab/1"/> |
199 | | <location latitude="37.43" longitude="-122.17" country="US"/> |
200 | | <interface client_id="xen-0:if0"> |
201 | | <ip address="192.168.1.1" netmask="255.255.255.0" type="ipv4"/> |
202 | | <flack:interface_info addressBound="true" bound="false"/> |
203 | | </interface> |
204 | | <interface client_id="xen-0:if1"> |
205 | | <ip address="192.168.4.2" netmask="255.255.255.0" type="ipv4"/> |
206 | | <flack:interface_info addressBound="true" bound="false"/> |
207 | | </interface> |
208 | | <flack:node_info x="150" y="407" unbound="true"/> |
209 | | </node> |
210 | | }}} |
211 | | |
212 | | First, when we added the custom image (see [wiki:GENIExperimenter/Tutorials/SystematicExprCaseStudy/InstallSoftware#a4.VerifyInstaGENICustomImage Load a Custom Image]), a new tag `<sliver>` will be added to `router-1`'s RSpec, which is |
213 | | |
214 | | {{{ |
215 | | <sliver_type name="emulab-xen"> |
216 | | <disk_image url="https://www.instageni.clemson.edu/image_metadata.php?uuid=5417bcef-224e-11e4-aa5a-000000000000"/> |
217 | | </sliver_type> |
218 | | }}} |
219 | | |
220 | | |
221 | | Secondly, when we added the install scripts (see [wiki:GENIExperimenter/Tutorials/SystematicExprCaseStudy/SmallTopo/DesignSetup#e.InstallScript Adding Install Scripts]), a new tag `<service>` will be added to `router-1`'s RSpec, which is |
222 | | {{{ |
223 | | <services> |
224 | | <execute command="/bin/bash /local/xorp_autostart/start-xorp.sh" shell="sh"/> |
225 | | <install install_path="/local" url="http://www.gpolab.bbn.com/exp/sysexpr/xorp_autostart.tar.gz"/> |
226 | | </services> |
227 | | }}} |
228 | | |
229 | | This indicates that we can add custom image and postboot scripts by directly modifying the request RSpec, this is helpful when we have a larger topology. |
230 | | |
231 | | |
232 | | |
233 | | |
234 | | = 3. Script to Capture Routing Table Periodically = |
235 | | |
236 | | |
237 | | In this tutorial, one metric we would like to evaluate is how often the routing table will be updated when there is a link/node failure. To emulate a link failure, we can disable the virtual interfaces, and to emulate a virtual router failure, we can stop the XORP process at the virtual router. A short script (downloaded from [http://www.gpolab.bbn.com/exp/sysexpr/xorp_run.tar.gz here] is available to be loaded as an install script. |
238 | | |
239 | | Delete any existing resources or create a new slice, '''LOAD''' the RSpec `4node-v2.rspec`, and add a new install service to every node in Flack. Now, the service portion for each node becomes to |
240 | | {{{ |
241 | | <services> |
242 | | <execute command="/bin/bash /local/xorp_autostart/start-xorp.sh" shell="sh"/> |
243 | | <install install_path="/local" url="http://www.gpolab.bbn.com/exp/sysexpr/xorp_autostart.tar.gz"/> |
244 | | <install install_path="/local" url="http://www.gpolab.bbn.com/exp/sysexpr/xorp_run.tar.gz"/> |
245 | | </services> |
246 | | }}} |
247 | | |
248 | | After adding the new install script to every node, send the resource reservation request. When all nodes are ready to login, we save the new modified RSpec as `4node-v3.rspec`. (You can download a sample RSpec for `4node-v3.rspec` at [http://www.gpolab.bbn.com/exp/sysexpr/rspec-for-wiki/4node-v3.rspec here]) |
249 | | |
250 | | In the next step, we will add two end hosts to current four-node topology, so now we can delete existing resources from the current slice. |
251 | | |
252 | | = 4. Add End Hosts and Install `iperf` = |
| 172 | |
| 173 | |
| 174 | = 2. Add End Hosts and Install `iperf` = |