Changes between Version 18 and Version 19 of HowTo/WriteInstallScript
- Timestamp:
- 09/25/12 16:23:45 (12 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
HowTo/WriteInstallScript
v18 v19 51 51 }}} 52 52 53 After you write your script make sure it is executable by doing: 54 {{{ 55 chmod +x <script> 56 }}} 57 53 58 This 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. 54 59 {{{ … … 99 104 In 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. 100 105 106 After 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 101 113 = 2. Test your script = 102 114 Before 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 … … 121 133 }}} 122 134 * modify the default port by running the following commande where <NEW_PORT> is the port you want to use: 123 135 {{{ 124 136 sudo sed 's/^Listen 80$/Listen <NEW_PORT>/' /etc/httpd/conf/httpd.conf > httpd.conf ; sudo mv httpd.conf /etc/httpd/conf/httpd.conf 125 137 }}} 126 138 * start the web server : 127 139 {{{ 128 140 sudo /sbin/service httpd start 129 141 }}} 130 142 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 {{{ 132 144 sudo sed 's/^Listen <OLD_PORT>$/Listen <NEW_PORT>/' /etc/httpd/conf/httpd.conf > httpd.conf ; sudo mv httpd.conf /etc/httpd/conf/httpd.conf 133 145 }}}