Changes between Version 18 and Version 19 of HowTo/WriteInstallScript


Ignore:
Timestamp:
09/25/12 16:23:45 (12 years ago)
Author:
nriga@bbn.com
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowTo/WriteInstallScript

    v18 v19  
    5151}}}
    5252
     53After you write your script make sure it is executable by doing:
     54{{{
     55chmod +x <script>
     56}}}
     57
    5358This is an example of a script that installs some packages, download and install a software, change some parameters and reboot the node in the end.
    5459{{{
     
    99104In order for the Aggregate Manager to find and run the install script, you will need to upload your script in a web server that is publicly available. Most institution provide this service to their users. However if you don't have access in a web server in order to upload your script, you can setup a web server in GENI. Please follow [wiki:#InstallaWebServerinPlanetLab these instructions] about setting up a web server in a PlanetLab node.
    100105
     106After you have ensured access to a web server, follow these simple steps:
     107   * For ProtoGENI you should place your script in a compressed file. Do :
     108   {{{
     109   tar cvfz install-script.tar.gz <script>
     110}}}
     111   * Upload your file to your webserver. Make sure you have access to the file by pointing a browser at your file and ensuring that you can download it.
     112
    101113= 2. Test your script =
    102114Before you add the script to your RSpec and automate the setup of your experiment, make sure that your test script works. In ProtoGENI the user-software is usually downloaded and installed
     
    121133}}}
    122134   * modify the default port by running the following commande where <NEW_PORT> is the port you want to use:
    123    {{{
     135 {{{
    124136sudo sed 's/^Listen 80$/Listen <NEW_PORT>/' /etc/httpd/conf/httpd.conf > httpd.conf ; sudo mv httpd.conf /etc/httpd/conf/httpd.conf
    125137}}}
    126138   * start the web server :
    127    {{{
     139 {{{
    128140sudo /sbin/service httpd start
    129141}}}
    130142       If you get an error someone else might be using the port you used, change it again by using the following command where <OLD_PORT> is the port you used in the previous command:
    131     {{{
     143  {{{
    132144sudo sed 's/^Listen <OLD_PORT>$/Listen <NEW_PORT>/' /etc/httpd/conf/httpd.conf > httpd.conf ; sudo mv httpd.conf /etc/httpd/conf/httpd.conf
    133145}}}