Changes between Initial Version and Version 1 of GENIEducation/SampleAssignments/InstallScripts/Procedure


Ignore:
Timestamp:
10/20/14 14:39:59 (9 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • GENIEducation/SampleAssignments/InstallScripts/Procedure

    v1 v1  
     1[[PageOutline]]
     2
     3= How to write install scripts =
     4In this tutorial you are going to learn how to automate the customization of your node with install scripts.
     5In this example you can learn how to automate:
     6  a. the installation of a webserver
     7  b. the installation of the click router software
     8
     9Pick one and stick to it throughout this exercise
     10
     11== Step1. Reserve a minimum topology ==
     12In the first step you reserve the minimum topology you need in order to manually install and test your software.
     13In our case this is just a single VM for both (a) and (b).
     14
     15Reserve a VM in your EG rack.
     16
     17== Step2. Manually install your software ==
     18Once your VM is up, login and manually install your software.
     19
     20Find out your operating system:
     21{{{
     22lbs_release -a
     23}}}
     24To figure out the kernel version run:
     25{{{
     26uname -r
     27}}}
     28
     29=== Step2a. Manually install a webserver ==
     30You can read more about installing a webserver here:
     31https://help.ubuntu.com/lts/serverguide/httpd.html
     32
     33Essentially to install do:
     34{{{
     35sudo apt-get install apache2
     36}}}
     37
     38Try and visit your web server.
     39
     40Customize the server anyway you want.
     41
     42Where would you put the welcome page of your server?
     43
     44=== Step2b. Manually install the click router ===
     45Follow instructions here:
     46http://www.read.cs.ucla.edu/click/download
     47
     48== Step3. Write your script ==
     49Once you are happy with the configuration of your node, write a script that will automate this process.
     50Look here for instructions: http://groups.geni.net/geni/wiki/HowTo/WriteInstallScript
     51
     52To see a history of what you have done in your node do:
     53{{{
     54history
     55}}}
     56
     57Once you are happy with your script, make sure you have tested it, make a tar file of it:
     58{{{
     59 tar xvfz <tar name> <script name>
     60}}}
     61
     62== Step4. Upload your script to a web server ==
     63If you have a dropbox account you can just upload the compressed (tar.gz) script to Dropbox and get the public URL.
     64
     65If not ask us for help.
     66
     67== Step5. Debug ==
     68Now that you have the script is a public place you can modify your rspec to download and install it in a new node.
     69
     70Reserve a node and check that it worked. It probably haven't:-)
     71
     72On IG look here for where to find logs:
     73http://www.protogeni.net/wiki/ServicesFaq
     74
     75On EG check the neuca logs at:
     76/var/log/neuca/neuca-agent.log
     77
     78See why it failed, fix it, upload it and try again
     79
     80If it worked, congrats! You wrote you first install script!
     81