stork logo
Using Stork

Stork's Enduser Utilities - Storkutil

Stork's enduser utilities will help you manage your nodes more easily and efficiently. It can help you organize your nodes, as well as perform package installations and upgrades across all your nodes in a few simple steps. The enduser tarball can be downloaded here.

This page constains a list of storkutil commands and storkutil options. For a general runthrough to get you started using Stork and Storkutil, check the Stork tutorial page.

Storkutil Commands

The following commands can be used in conjunction with storkutil:

General Commands

Genpair:./storkutil.py genpair USERNAME
The genpair commad generates public and privatekeys for the given username. The generated keys will be of the form USERNAME.publickey and USERNAME.privatekey. The privatekey is used to sign your files. The username exsits so that users can recognize each other without having to base interaction solely on public and private keys. Note that after generating a new pair of keys, Stork will ask you whether or not you want these keys to be your default identity:

./storkutil.py genpair foo
Generated foo.privatekey...
Extracted foo.publickey...
Would you like to make 'foo' your default identity? (y/n) >
y
'foo' is now your default identity

./storkutil.py genpair foo
Error: Key files for 'foo' already exist

The genpair command is an important one. Stork will not function until you have generated a pair of keys for use in signing and checking.

Setdefault: ./storkutil.py setdefault USERNAME
If you have already generated a public and private key using genpair, but have not set these keys as your default, or if you wish to change you default, you may use this command to set a pair of keys as the default.

./storkutil.py setdefault foo
Previous Identity: someguy
'foo' is now your default identity

View ./storkutil.py view (tpfile|groups|packages)
View is a command which will display your default tpfile, pacgroup file or pacpackages files, depending on the arguement.

./storkutil.py view tpfile
Viewing: foo.~~.tpfile

TRUSTED PACKAGES FILE
ALLOW package1.tar.gz
ALLOW package2.tar.gz

Trusted Packages Files

Addfile: ./storkutil.py addfile FILE [FILE2] ...
Addfile will add a file to your trusted packages file. If your trusted packages file has not yet been created, then addfile will create it under your default username. The created file will have the form username.~publickey~.tpfile. The ~publickey~ portion will probably be an unrecognizable string of letters and numbers, but your username will be included at the beginning of the prefix.

./storkutil.py addfile package1.tar.gz package2.tar.gz
No tpfile found for foo. Generating new tpfile.
File 'foo.tpfile' successfully signed
File 'foo.tpfile' has been copied to 'foo.~~~.tpfile'
Unembeded trusted packages file 'foo.tpfile' removed.

This script will run whenever Stork fails to find a trusted package file for the default user. It will then continue to the regular package adding script:

Using trustedpackages file './foo.~~~.tpfile'.
Successfully added file 'mypackage.tar.gz'.
File './foo.~~~.tpfile' successfully signed

Removefile: ./storkutil.py removefile FILE [FILE]
Removefile is essentially the opposite of addfile. Removefile will remove a file (or multiple files) from your trusted packages file.

./storkutil.py removefile mypackage.tar.gz
Using trustedpackages file './foo.~~~.tpfile'.
Successfully removed file 'mypackage.tar.gz'.
File './foo.~~~.tpfile' successfully signed
Note that if a tpfile hasn't been created through the addfile command, removefile will, expectedly, fail to run.

Adduser: ./storkutil.py adduser USER USER.publickey (allow|deny|any) AFFECTEDPACKAGES
Adduser allows the user to trust (or distrust) other users explicitly through the tpfile. This is useful when you want to allow a certain user to dictate when updates are necessary (for instance, trusting the Stork user to know what Stork packages are valid).

./storkutil.py adduser someguy someguy.publickey allow \*
Using trustedpackages file './foo.~~~.tpfile'.
Successfully added user 'someguy'.
File './foo.~~~.tpfile' successfully signed

You can also use the * character as a wildcard when allowing packages from users (example: \*.tar.gz). Just be sure to use the shell escape instead of * by itself.

Removeuser: ./storkutil.py removeuser USER Removeuser removes a user from your trusted packages file. Note that if the tpfile has not yet been created through adduser or addfile, removeuser will not execute.

./storkutil.py removeuser someguy
Using trustedpackages file 'foo.~~~.tpfile'.
Successfully removed user 'someguy'.
File 'foo.~~~.tpfile' successfully signed

Extract: ./storkutil.py extract TPFILE NEWFILE The extract command extracts your trusted package information from your TPFile, and stores it in the file provided in the command (NEWFILE). NEWFILE can be manually modified and then signed, as a way to modify your TPFile without the storkutil commands. For information of manually modifying your TPFile, see the TPFile advanced usage page.

./storkutil.py extract foo.publickey.tpfile extractedFile

Sign: ./storkutil.py sign NEWFILE The sign command signs your extracted trusted package file with your default username. Once this file has been signed, you can rename it username.publickey.tpfile and have it act as the TPFile for your username.

./storkutil.py sign foo.publickey.tpfile extractedFile
File 'newFile' successfully signed

Pacman

Pacman is Stork's package management utility, built into Storkutil. Pacman can help you manage your packages across all your nodes. Rather than installing or uninstalling packages on each of your nodes individually, you can assign your nodes to groups and instruct stork to install or remove packages on those groups. Pacman is therefore efficient to use when a package needs to be installed on a large number of nodes. Pacman also allows packages to be automatically updated when the package creator updates them in the repository; this allows Stork to work near autonomously when set up for use. Pacman uses two files; groups and packages. Using storkutil, you can create these two files and upload them. Stork will then distribute these files to your nodes and perform the tasks you assigned.

Pacgroups: ./storkutil.py pacgroups (include|exclude|intersect|remove) DESTINATIONGROUP NODEORGROUP [NODEORGROUP...]
Pacgroups is the first command associated with Pacman. The pacgroups command is used to organize nodes into groups. The DESTINATIONGROUP parameter is the name of the group you wish to create; the NODEORGROUP parameter is the node, or group of nodes, you wish to include (or exclude) in the destination group. You can also use the pacgroups intersect command to include an intersection of two node groups in the destination group. Finally, the pacgroups remove will remove a node or group of nodes from the destination group. You can use the view groups command to view your pacman groups file.

./storkutil.py pacgroups include myGroup foo1.node foo2.node
Using groups file: ./foo.~~~.groups.pacman
File Not Found, Creating New File
File './foo.~~~.groups.pacman' successfully signed

./storkutil.py view groups
Viewing: foo.~~~.groups.pacman

PACMAN GROUP FILE
GROUP: myGroup
INCLUDE: foo1.node
INCLUDE: foo2.node

CoMon: ./storkutil.py comon (include|exlude|intersect|remove) DESTINATIONGROUP "COMONQUERY"
The CoMon command used pacgroups and the CoMon project to organize nodes into groups. Using the command with the proper query will add all of the nodes returned by that query to the destination group. It is suggested that you use the query on the CoMon query page first, because a malformed query will cause CoMon to include all the current PlanetLab nodes. Also note that the query must be surrounded by quotation marks in the command line, or the single '&' characters escape-sequenced.

./storkutil.py pacgroups include myGroup "select='resptime>2'"
Using groups file: ./foo.~~~.groups.pacman
File Not Found, Creating New File
File './foo.~~~.groups.pacman' successfully signed

./storkutil.py view groups
Viewing: foo.~~~.groups.pacman

PACMAN GROUP FILE
GROUP: myGroup
INCLUDE: plnode02.cs.mu.oz.au
INCLUDE: plab4.engr.sjsu.edu
INCLUDE: planetlab-1.fokus.fraunhofer.de

Pacpackages: ./storkutil.py pacpackages (node|group|all) [NODEORGROUPNAME] (install|remove|update) PACKAGE
Pacpackages is the second command associated with Pacman. While pacgroups organizes nodes into groups, pacpackages determines which packages should be installed or removed on which nodes. Pacpackages accepts either a node or the name of a group (the group will have to be made first with pacgroups) to install, remove, or update a package on.

./storkutil.py pacpackages group myGroup install myPackage.tar.gz
Using Package File: ./foo.~~~.packages.pacman
File Not Found, Creating New File
File './foo.~~~.packages.pacman' successfully signed

./storkutil.py view packages
Viewing: foo..packages.pacman
PACMAN PACKAGES FILE
CONFIG ALL:
UPDATE: stork-client
UPDATE: arizona-lib
CONFIG GROUP: myGroup
UPDATE: myPackage.tar.gz

Storkutil Options

The following are the options that can be used with storkutil, organized by type.

Messages

--storkutilsetupcomplete=TRUE/FALSE Whether the setup of this utility was completed properly.

--version Show program's version number and exit

-h, --help Show this help message and exit

-Q, --veryquiet Be very quiet (shorter messages)

-q, --quiet Be quiet

-v, --verbose Be verbose (default)

-V, --veryverbose Be very verbose (useful for debugging)

--ultraverbose Be extremely verbose (might be useful for debugging)

--width=CHARS Set the width of the terminal in characters (default: 80)

--disableerrorreporting Disables sending of error reports to the Stork team (Reports are still generated, just not sent)

File Transfer Options

--transfermethod=PROGRAM Uses this method to transfer files (default ftp, http)

--transfertempdir=PATH Uses this path to temporarily save transfered files (default is /tmp/stork_trans_tmp)

--bittorrenttrackerhost=TRACKERHOST Uses this host name of the tracker server.

--bittorrenttrackerport=TRACKERPORT Uses this number to specify as the tracker port number for torrents.

--bittorrentuploadrate=UPLOADRATE The max upload rate for the bittorrent processes (0 means no limit).

--bittorrentseedlookuptimeout=SEEDLOOKUPTIMEOUT The number of seconds bittorrent should timeout after not finding a seed.

--transuser=USER Uses this user to transfer files (the default is up to the transfer program)

--nesthostname=HOSTNAME Uses this host to transfer files

--nestport=PORT Uses this port to transfer files

Repository Options

--packagemanagers=PACKAGEMANAGERS Uses these programs to manage packages (default rpm, tar)

--tarpackinfo=PATH Uses this path to store tar package info (default is /usr/local/stork/tar_packinfo)

--localpackageinfo=PACKAGEDIR Uses this location of local package information (default /usr/local/stork/var/packageinfo)

--repositorypackagedir=DIR Uses this repository name and location of packages (the switch may appear multiple times)

--repositorypackageinfo=DIR Uses this repository name and location of information about packages (the switch may appear multiple times)

--noupdatepackageinfo Does not attempt to update the package database

TPFiles, Config Files, Keys

--configurationfile=FILE use a different config file (~/.storkutil/storkutil.conf is the default)

--privatekey=PRIVATEKEYLOCATION The location of the private key to use.

--publickey=PUBLICKEYLOCATION The location of the public key to use.

--tpfile=TPFILELOCATION The location of the tpfile to use.

--pacmanfile=PACMANFILE The location of the pacman file to use.

-C FILE, --configfile=FILE Use a different config file (/usr/local/stork/etc/stork.conf is the default)

--noupdateonstart Do not try to download latest custom configuration files and keys from repository upon start of stork.py

--xmlsignaturedtd=FILENAME The DTD file for signatures

--tpdump Dump trusted packages data

--createblank Create a blank trusted packages or pacman files instead of the default

--timestamp=TIMESTAMP Timestamp for added package.

--orderby=ORDERBY Method (default | timestamp) to prioritize packages in referenced trusted packages file.

--tags=TAGS Specify tags when adding package

--trustedpackagesdir=DIRECTORY Uses a different directory to access trusted packages

--trustedpackagesrepository=URL Uses a different repository for trustedpackages files

--trustedpackagesdtd=FILENAME Sets the trustedpackages DTD file

--noupdatetrustedpackages Does not attempt to update the trustedpackages files

--ignoremissingtpfiles Ignores missing trusted packages files

--certificate=STRING Uses a different certificate for downloading conf files from repository.

--repositorypath=STRING Uses a different repository to download configuration files from.

--keytype=KEYTYPE Use this technique to sign files (default is rsa)

--keygen=GENTYPE Use this option to use openssl to generate your public/private keypair (default is genrsa)

--hashtype=HASHTYPE Use this algorithm to generate hashes (default is -sha1)

-u USERNAME, --username=USERNAME Use this username for configuration files

--publickeyfile=file use this public key file to determine which configuration files to use. Recommended: /usr/local/stork/var/keys/[username].publickey

Miscellaneous

--simulatenestfail simulate a nest failure during storknestrpm install
Home Top
powered by planetlab University of Arizona, Computer Science logo