Hello all,<br><br>I am working on a utility to modify configuration files called swiftconfig. This is still in the early stages, so there is a lot of room for changes and new ideas. I believe there is some overlap between this project and what some other students will be doing this summer, so if anyone would like to work with me on this, please feel free.<br>
<br>I envision swiftconfig as a simple text-based configuration program. It will be written in Perl and use the curses library for easier editing. It should hopefully make swift configuration a little easier and prevent silly mistakes like typos in xml which could keep swift from running. Everything that can be done within the editor should also be able to be done directly from the command line. This should make it easier to expand upon in the future. For example, a web or GUI based application could be written fairly quickly that would only need to call swiftconfig with the correct command line options.<br>
<br>There are three files swiftconfig can modify: tc.data, sites.xml, and auth.defaults.<br><br>The options for transformation mode include <br> <br> -host # Host name<br> -name # Translation name<br>
-path # Path to executable<br> -profile # Profile arguments, defaults to null<br> -tcfile # Location of tc file. If not specified, find tc.data based on location of swift<br> -overwrite # If a duplicate is found, overwrite the old entry without prompting<br>
<br>Since platform and installation status are no longer used, they will default to INTEL32::LINUX and INSTALLED.<br>Here is an example of swiftconfig in transformation mode.<br><br>$ swiftconfig -host localhost -name wc -path /usr/bin/wc<br>
<br>tc.data should then have the line:<br>localhost wc /usr/bin/wc INSTALLED INTEL32::LINUX null<br><br>If there is already an entry with the name wc, it should prompt the user to answer yes/no if the user wants to overwrite it (unless -overwrite is given)<br>
<br>For sites.xml, swiftconfig should allow the user to use existing examples or specify their own. Here are the options:<br><br> -template # Use existing commented example for defaults (skynet, teraport, etc)<br>
-entry # Name of new entry (pool handle)<br> -gridftp # Specify gridftp url<br> -jobuniverse # Specify jobmanager universe<br> -joburl # Specify jobmanager url<br> -jobmajor # Specify jobmanager major value<br>
-jobminor # Specify jobmanager minor value<br> -directory # Work directory<br> -exprovider # Execution provider<br> -exmanager # Execution job manager<br> -exurl # Execution url<br>
-remove # Remove (comment out) an entry from sites.xml<br><br>So, for example suppose a user has the following entry in sites.xml by default:<br><br><!--<br> <pool handle="teraport" ><br> <gridftp url="gsiftp://<a href="http://tp-grid1.uchicago.edu">tp-grid1.uchicago.edu</a>" /> <br>
<jobmanager universe="vanilla" url="<a href="http://tp-grid1.uchicago.edu/jobmanager-pbs">tp-grid1.uchicago.edu/jobmanager-pbs</a>" major="2" /><br> <workdirectory >/home/tiberius/scratch/SWIFT-WORK</workdirectory><br>
</pool><br>--><br><br>The command:<br><br>$ swiftconfig -template teraport<br><br>Which would uncomment that from sites.xml as is. The user could also modify just a part of it:<br><br>$ swiftconfig -template teraport -directory /tmp<br>
<br>That should modify only the workdirectory and leave everything else the same.<br><br>To create your own config, use -entry instead of -template<br><br>$ swiftconfig -entry mynetwork -gridftp ftp.foo -exprovider gt4 (.. and so on)<br>
<br>The final mode of swiftconfig is for auth.log in ssh configurations.<br><br> -auth # Set to auth mode<br> -sshhost # Name of remote ssh host<br> -sshmode # Either password or passphrase<br> -sshuser # SSH username<br>
-sshpassword # SSH password<br> -sshpassphrase # SSH passphrase<br> -sshkey # Location of SSH key<br><br>Any other ideas or suggestions on how swiftconfig should work are welcome.<br><br>David<br><br>