Chapter 2. Tutorial

The following steps walk through a new user setting up her bank account and one host account and starting to run on that host.

  1. You must have an ssh public key to use Tycoon. If you already have one, skip to Step 3. Otherwise, you must create one. For example, Alice Smith running on her workstation “alicehost” would type the following and then hit return at all the prompts:

    [asmith@alicehost ~]# ssh-keygen -t dsa
    

    You should see something like:

    
    Generating public/private dsa key pair.
    Enter file in which to save the key (/home/asmith/.ssh/id_dsa):
    Created directory '/home/asmith/.ssh'.
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    Your identification has been saved in /home/asmith/.ssh/id_dsa.
    Your public key has been saved in /home/asmith/.ssh/id_dsa.pub.
    The key fingerprint is:
    1a:5e:d6:0b:0f:5a:61:98:ed:3f:d4:26:fa:65:62:50 asmith@alicehost.hpl.hp.com
    
    
  2. Put whatever ssh keys you want to use to log into Tycoon machines in “~/.ssh/authorized_keys”. If you just created an ssh public key, then do the following:

    [asmith@alicehost ~]# cat .ssh/id_dsa.pub
    >> .ssh/authorized_keys
    [asmith@alicehost ~]# chmod 600 .ssh/authorized_keys
    

  3. Setup your tycoon configuration with your email address, the account name that you would like to use on remote machines, and your ssh public key. For example, Alice would type:

    [asmith@alicehost ~]# tycoon user setup alice.smith@hp.com asmith ˜/.ssh/id_dsa.pub
    

    You should see something like:

    
    Generating keys ...
    p,q
    
    h,g
    
    x,y
    
    
    
    [Note]Note

    This command just creates some configuration files in ~/.tycoon, so if you make a mistake, removing that directory will clear all state and allow you to start over.

  4. Send the email address you specified in step 2 and your bank account public key to your Tycoon system administrator. Your bank account public key is in ˜/.tycoon/user_name/bank_account_public_key.

  5. Get the list of machines with their speed and current total bids. Alice would type the following:

    [asmith@alicehost ~]# tycoon get_host_list
    

    You should see something like:

    
    IP Address
    ----------
    1.2.3.4
    1.2.3.5
    1.2.3.6
    ...
    
    
  6. Create accounts on the machines you want. Alice would type the following command to create an account on host providinghost1 and transfer 10 credits:

    [asmith@alicehost ~]# tycoon host create_account providinghost1 10
    

    You should see something like:

    
    Creating host account(s) (may take several minutes)...
    1.2.3.4 SSH port number: 11111
    1.2.3.4 has booted.
    1.2.3.4 created account with initial deposit of 1
    
    

    Note your SSH port number. You will use this port number to log into and copy files to your host account. This port will usually be the same across different host accounts, but this is not guaranteed.

  7. Copy programs to the new account. Alice would type the following commands to copy the directory my_program to providinghost1:

    [asmith@alicehost ~]# tycoon_scp -r my_program providinghost1:
    

    You should see something like:

    
    my_program                                    100% 10660     10KB/s   00:00
    
    

    tycoon_scp automatically determines the user's ssh port number on the providing host. It is otherwise the same as the standard scp client. If you prefer to use a different scp client, then simply remember to use the port number specified when you created the host account.

  8. Log into the new new account. Alice would type the following commands to log into her account on providinghost1:

    [asmith@alicehost ~]# tycoon_ssh asmith@providinghost1
    

    You should see something like:

    
    Last login: Mon May  9 14:35:33 2005 from alicehost
    [asmith@providinghost1 ~]$ 
    
    

    As with tycoon_scp, tycoon_ssh automatically determines the user's ssh port number on the providing host. It is otherwise the same as the standard ssh client.

  9. You may need to install software in your remote account. You can login and use the yum program. Alice would use this command to install gcc:

    [asmith@alicehost ~]# tycoon_ssh root@providinghost1 yum -y install gcc
    

    You should see something like:

    
    Setting up Install Process
    Setting up Repos
    Reading repository metadata in from local files
    Resolving Dependencies
    ...
    Installed: gcc.i386 0:3.4.3-22.fc3
    Dependency Installed: cpp.i386 0:3.4.3-22.fc3 glibc-devel.i386
    0:2.3.5-0.fc3.1 glibc-headers.i386 0:2.3.5-0.fc3.1
    glibc-kernheaders.i386 0:2.4-9.1.87
    Complete!
    
    
    [Note]Note

    This command needs to contact Internet package repositories to download software, which it cannot do behind some firewalls.

  10. At some point, you may find that you need to run faster or have run out of money. You can add more money to your host accounts. Alice would type this to transfer 10 more credits to 1.2.3.4.

    [asmith@alicehost ~]# tycoon host fund providinghost1 10
    

    You should see something like:

    
    1.2.3.4 funded 10.