Kevin Lai (klai@hp.com)
2/14/2004
This manual describes the usage of the Tycoon market-based distributed resource allocation system. The User's Manual is for people who just want to run jobs on a Tycoon system. The Administrator's Manual is for people who want to contribute hosts to a Tycoon system or want to administrate an entire Tycoon system.
The Tycoon packages must have been installed on your Linux machine before you can use this Quick Start guide (see Administering a Client in the Administrator's Guide). The following steps walk through a new user setting up her bank account and one host account and starting to run on that host.
asmith@host> ssh-keygen -t dsa
asmith@host> tycoon user setup alice.smith@hp.com asmith ~/.ssh/id_dsa.pub
asmith@host> tycoon get_host_list
asmith@host> tycoon host create_account 1.2.3.4 10
asmith@host> scp -r my_program 1.2.3.4:
asmith@host> ssh asmith@1.2.3.4
asmith@1.2.3.4> su
root@1.2.3.4> yum install gcc
asmith@host> tycoon host get_status 1.2.3.4 balance interval
asmith@host> tycoon host fund 1.2.3.4 10 10000
Tycoon programs are configured using a series of files containing Python code that sets various variables. Tycoon programs use specific variables to configure themselves. For example, the variable ``BankHostName'' contains the host name of the bank.
The configuration files can contain any Python code, including import statements. These files are executed to obtain the configuration variables. Files that are executed later can override the values set by files that are executed earlier. In some cases, a configuration variable that is set earlier requires a configuration value set by a later file. The configuration system runs two passes to provide this ability. The earlier variable must be set to a string with a string formatting mapping key of the same name as the later variable. For example, this allows NonceFileName to use the value of UserName, even though UserName is set later:
NonceFileName = "~/.tycoon/%(UserName)s/nonce"
In addition, the dictionary variable SecondPassOptions must have a key with the same name as the earlier variable set to True:
SecondPassOptions['NonceFileName'] = True
The specific set of configuration files used varies from program to program, but in general, there is a non-program-specific file name (``tycoon.conf'') and a program-specific file name (e.g., ``tycoon_dist_auc.conf'') and there is a system-wide file system path (``/etc'') and a user-specific path (``~/.tycoon''). The files are executed in the following order:
Users interact with Tycoon through a software agent. A simple agent simply allows a user to manually control how his currency and jobs are distributed across hosts. More sophisticated agents automate some of these tasks. The only agent currently available is a simple agent.
The basic agent allows users to manually set the amounts spent at different hosts. Users can then manually log into those hosts using SSH. Also, users must manully fund their host accounts again as the funds are depleted.
The basic agent is installed as ``/usr/bin/tycoon''. Its system-wide configuration option are in ``/etc/tycoon.conf''. User-specific configuration options are in ``~/.tycoon/tycoon.conf''. Described below are the user-specific options that users must set:
tycoon -config_path "('./', '~/.tycoon')" ...
To run the basic agent:
tycoon [options] get_host_list | bank | host
This command will use the user-specific options described above.
The following sections describe the subcommands in more detail.
tycoon get_host_list [fields]
This prints out a list of all the hosts in the system. If the fields are not specified, then a commonly useful set is printed. If fields is ``all'', then all the fields are printed. You can reduce the amount of data printed by specifying fields. For example to only print out the machines' Mhz, IP address, and price history, use
tycoon get_host_list "cpu_info[cpu MHz]" ip_address price_history
All of the bank commands implicitly operate on the user's bank account. The commands also have an administrative form that allows the administrator perform operations on user's accounts. This form is
tycoon -oUserName=bank_admin bank admin <command> <command args> <account_name>
For example, to check Bob's balance, do the following:
asmith@host> tycoon -oUserName=bank_admin bank admin get_balance bob.johnson@hp.com
The following are the bank commands.
tycoon bank get_balance
This prints out the user's current bank balance.
tycoon bank create_account <account_name> <initial_deposit> <account_public_key_file_name>
The initial deposit is necessary in case the bank has reached a preset maximum number of accounts, n. If the initial deposit of the new account is more than the balance of at least one of the existing accounts, then the account with the smallest balance is evicted and the account is created. Otherwise, the creation of the new account is rejected.
tycoon bank transfer <recipient> <amount>
tycoon bank get_history
This gets a list of a user's recent transactions from the bank. This can be used to reconcile disputes about transfers.
tycoon bank delete_account <account_name>
This deletes the specified bank account. The funds in the account disappear, so use this command with caution.
All of the host commands take a host_names parameter. This can be a single host name or IP address or a list of them enclosed in double quotes and separated by spaces (e.g. ``1.2.3.4 w.x.y.z''), or simply a pair of double quotes, which means to use all of the machines in a cluster.
tycoon host create_account <host_names> <initial_deposit>
tycoon host fund <host_names> <fund_amount> <funding_interval>
This funds the user's account at the specified host. The specified funds are transferred to the host's account. The remote auctioneer is notified that all of the user's funds at the remote host are to be spent over the specified interval.
tycoon host set_interval <host_names> <interval>
This sets the spending interval for the user's account at the specified host. The remote auctioneer is notified that all of the user's funds at the remote host are to be spent over the specified interval. Note that this operation is faster than ``host fund'', so it is better to use this if you are not adding funds.
tycoon host refund <host_names> <fund_amount>
This refund money from the user's account at the specified host. To refund all the funds, specify "all" as the fund amount.
tycoon host get_status <host_names>
This gets the status of the user's account at the remote machine. This is mainly useful to see what funds are left there.
tycoon host delete_account <host_names>
This deletes the user's account on the remote machine. This deletes all of the user's files there and refunds the remaining funds.
XXX List error messages here
This document was generated using the LaTeX2HTML translator Version 2002-2-1 (1.70)
Copyright © 1993, 1994, 1995, 1996,
Nikos Drakos,
Computer Based Learning Unit, University of Leeds.
Copyright © 1997, 1998, 1999,
Ross Moore,
Mathematics Department, Macquarie University, Sydney.
The command line arguments were:
latex2html -split 0 -show_section_numbers users_manual.tex
The translation was initiated by Kevin Lai on 2005-03-01