RU beehive logo ITEC dept promo banner
ITEC 345
2014fall
ibarland

homelectshws
D2Lbreeze (snow day)

deterlab-startup-instructions
deterlab startup
hw prelude

Due: 2014.Sep.16 (Tue) 23:59

You may work on this assignment individually, or with one partner. See step VI #2 below, for what you need to submit.

It is your responsibility to complete the work on time. Be aware that if you wait until the last minute, deterlab machines may not be available for you! I strongly advise starting on the hw over the weekend, to make sure you can wade through the details of accessing your deterlab machine.

Overview

This document contains (only) instructions for starting up your deterlab machine; the “real” homework instructions, to be carried out on that machine, are at treasure/info hunt.

deterlab.net is a site which allows you to create virtual personal machines and even entire networks. They call such machines/networks an “experiment”. There are four main steps you'll follow (with detailed instructions below): Overview

  1. Log in to deterlab.net and set up your virtual machine (your experiment).
  2. From your local machine, use a putty (or, from mac/linux, a terminal window) to ssh to deterlab's public server users.deterlab.net.
  3. Finally, from that public server, you'll ssh to the individual machine you created in step I, and follow the instructions in treasure/info hunt [see D2L].
  4. Transfer your answer-file back to your local machine, submit it on D2L, and shut down the deterlab experiment.

Detailed instructions

  1. Find the email you got from deterlab.net (you might need to check your spam folder). Note that your deterlab username will be of the form ru245zz, where zz will be two lower-case letters (e.g.ru245ap”).

    The email contains a link which will bring you to a page to set up your deterlab password.

    Warning: Do not lose your password; I will deduct 2pts from your score, if I have to manually re-set your deterlab account! Also, don't use your RU password, or any other sensitive password, on deterlab; I and other administrators might be able to access them.

    Once you have logged in to deterlab.net, do update your profile's Full Name (but you don't need to complete the address, phone#, etc.)

  2. Starting the deterlab experiment.
    (If deterlab is down for routine maintenance, I suggest you momentarily skip to part V, and prepare by figuring out exactly what you'll type when reach Vb.)
    1. Download (that is, save-to-disk) the file linux_deterlab_intro.ns.
    2. Select Open Experimentation > Begin an Experiment (screenshot below)
    3. Fill out the fields as follows:
      1. Select Project: ITEC2451.
      2. Group: Default Group.
      3. Name: yourRUUsername (e.g. ibarland) This is used (only) in setting up a name for your virtual machine. In all other places on deterlab, when it asks for a username, deterlab wants your deterlab username, something like ru245zz.
      4. Description: something like “itec345 hw - linux intro”2.
      5. Your NS file: Upload the linux_deterlab_intro.ns file that you just downloaded in step II.1.
      6. Swapping:
        • Idle-swap: 1 hour. (The default is 4 hours, but we are among the kinder, gentler, more polite citizens of Deterlab).
        • Max Duration: 8 hours.
        • Linktest Option: Skip Linktest.
        Note that after either of these limits, your “experiment is swapped out” automatically.
      7. Swap In Immediately: leave this box unchecked for now.
      8. Click Submit.
    4. Wait for a while as Deterlab finds pre-loads your experiment. You are shown a pane "Working ..." where logging messages scroll by; it will finish with “Experiment ITEC245/yourUserId has been successfully created!” This should only take about a minute.

    5. Swap In Your Experiment:
      My DeterLab > Experiments > [your name, in EID list] > Swap Experiment In > Confirm.
      This step can can easily take five minutes or more; be patient while deterlab finds an open machine and and configures it. It should finish with “Swap Success!”.

      If you get the message “*** Admission Control: ITEC245/ITEC245 has too many nodes allocated!”, all of the machines available for our class are being used. Wait for other students finish and terminate their experiments, and try again. Be sure to start soon enough, that you'll be able to finish along with your classmates!

      Important: If you are working on the homework but are going to leave for an hour or more (say, to class or dinner), please swap out your experiment (the same way you swapped it in, above). The virtual machine servers are in tight use.

    6. Go to Experimentation > Active Experiment List
    7. Click on your name in the “EID” field
    8. Click on the Details tab. You should see something similar to this (here, the name of the experiment is RULinux; it will be a bit different for you). If you don't see this, be sure you really did wait a few minutes for the swap-in to complete.
    9. Look for the “Qualified Name” of the virtual machine created for you. In this example screenshot it is: node0.RULinux.ITEC245.isi.deterlab.net. You'll need to ssh to this machine below, so I suggest copy/pasting it.
  3. Log in to the deterlab public server (from campus/home):
    Use ssh to log in to users.deterlab.net. Use your Deterlab username/password.

    Using ssh: If you never remotely logged in to a machine using SSH, don’t panic. Well, panic just a little, and then read on:

    Note that when sshing to a new machine, you'll get a message similar to:
    The authenticity of host some.host.name can't be established.
    ECDSA key fingerprint is so:me:lo:ng:he:xa:ha:sh:co:de.
    Are you sure you want to continue connecting (yes/no)?
    
    Answer yes (and ssh will log something like: Warning: Permanently added some.host.name (ECDSA) to the list of known hosts.). This is all fine.

  4. Log in to your experiment (from users.deterlab.net):
    From users.deterlab.net, ssh into the virtual machine, whose name you copy/pasted in step I.9. That is, something like ssh ru245zz@node0.RULinux.ITEC245.isi.deterlab.net
    Congratulations; you are now the proud part-time leaser of a free Linux machine. Note that the terminal window you are looking at is the third of a layer: that shell on your virtual machine is being run from inside the shell on users.deterlab.net, which is being run from inside putty (or Terminal).
    (Um... Which is being run from your login of the your local machine's OS, which is being run from the GUI manager of your local machine.3) So when you finally finish, you'll wrap up by exiting all three layers.
  5. At last, you can begin! The exact tasks you need to do are in deterlab-hunt.html [see D2L].
    1. The document starts with some Linux info (much is review; some is new material but isn't needed for the hw (e.g. screen); some is new material that is needed for the hw (e.g. find/locate).
    2. Then, follow the three tasks (treasure hunt, etc.). This should leave you with a tarball (a .tar.gz or .tgz file) in your home directory, on the virtual machine.
  6. Now you just need to submit the answer file, and shut everything down.
    1. We need to copy your answer file from the machine you were working on, back to your RU H: drive.
      1. You'd reasonably think that we need to transfer the file from your virtual machine (which is not accessible to the general web) to the gateway users.deterlab.net. However, you don't actually need to: Much like your H: drive is mounted onto whatever RU computer you log in to, similarly your virtual machine's home directory was the same as your users.deterlab.net's home directory. So your tarball is already in the home directory of the gateway machine, you don't need to do anything for this step, yay!
      2. We'll copy the file from users.deterlab.net to your local machine. From your local machine, 4 using scp (Mac/Linux terminal — “secure copy”), e.g. scp ru245zz@users.deterlab.net:myAnswerFile.tar.gz myLocalCopy.tar.gz, or WinSCP (download for windows; it has a gui interface like putty).
        Note:Although the deterlab-authored instructions mention using pscp, WinSCP is easier to use.
    2. After having a local copy of your file ruUsername-unix-intro.tar.gz, you might want to make a copy of it and uncompress the copy (but keeping the original, compressed version), just to double-check it contains your top_secret directory with its contents. Be sure that you have used exactly the filenames asked for!
    3. Now you can submit that your file ruUsername-unix-intro.tar.gz (containing the top_secret directory (local) tarball file to the D2L dropbox, and print a hardcopy of (just) answers.txt to turn in in the next class (one hardcopy per team).

      If working with a partner, you must each must submit to D2L -- the same file (albeit with different filenames: use just your username, not your partner's). Remember that your answers.txt will contain both of your names, in that case.

    4. If you haven't already, you can log out of your virtual machine (type exit), and then out of the shell on users.deterlab.net, and then shut down putty.
    5. Although your experiment will eventually swap out by itself, it's good karma to swap it out5 as soon as you're done, freeing up resources for your classmates and other students across the country.

    6. Before you can start future deterlab projects, you'll want to Terminate the experiment (not just swap it out). You can do this at any point after you've submitted your homework, though you can wait until after it's been graded, if you like.

1 Yes, I know we're in ITEC345, but the RU's deterlab account was created a while back….      

2This “description” field is for the Deterlab administrators to let me know if any experiment has gone rogue. Since I'm only using deterlab for one class, it won't be too hard for me to figure out what project they might be referring to.      

3 And I guess the your local hardware is running in The Universe, as is your brain, which also has a terminal-window into said Universe. Or, if you're a fan of The Matrix, your brain's terminal window is getting input some other machine.      

4You certainly could run scp to transfer from another machine to your own computer; this would require knowing your own computer’s IP address (as from www.whatsmyip.org/). Also, your machine's OS needs to be configured to accept incoming ssh connections, and a client needs to be running and listening to the port. (On a Mac, a client is running by default, but you might need to visit System Preferences > Sharing > Remote Login, to make sure a firewall isn’t rejecting all incoming ssh attempts. Of course, allowing this on your machine opens yourself up to attack, if they can find/guess an account name and password on your machine.)
For all these reasons, I recommend running scp on your local machine, as in the main instructions.      

5 You swap the experiment out the same way you swapped it in: via the right-hand-side menu in Experimentation > Active Experiment List > EID > yourUserName > Details > Experiment Options.      

homelectshws
D2Lbreeze (snow day)


©2014, Ian Barland, Radford University
Last modified 2014.Sep.11 (Thu)
Please mail any suggestions
(incl. typos, broken links)
to ibarlandradford.edu
Rendered by Racket.