Merkatoä 1.1 Installation Manual


Table of Contents

 

 

1  Introduction   3

2  Before You Start   4

2.1  System Requirements for Merkatoä    4

2.2  System Requirements for Routux   4

2.3  Upgrading your Merkatoä System    5

3  Installing Merkatoä    6

3.1  Pre-installation   6

3.2  Installation   6

3.3  Configuring a Resource   11

3.3.1 Configuring a Cisco Resource  12

3.3.2 Configuring a Routux Resource  16

3.3.2 Configuring a Generic Resource  20

4  Installing Routux   23


1  Introduction

 

This guide will help you get started running the Merkatoä Platform v1.1.  It covers installation, simple administration tasks, and removal of the software.  Please note that this guide is for the Linux version of Merkatoä only, and does not apply to other versions of the software.

 

If you need assistance running the Merkatoä Platform, please contact InvisibleHand Networks, Inc., at 1-800-xxx-xxxx or visit our website at http://www.invisiblehand.net.


2  Before You Start

 

Before you install Merkatoä, there are a few steps you should perform to ensure installation will be successful.  This chapter will cover the hardware and software requirements neccessary for running Merkatoä, with both a Ciscoâ Router and the Linux-based Routux routing software.

 

If you already have a running version of Merkatoä on your system, you can skip directly to Section 2.3:  Upgrading on page xx.

 

2.1  System Requirements for Merkatoä

 

This list details the hardware and software requirements you need to run Merkatoä.  Other systems may work, but might not be supported by InvisibleHand Networks, Inc.  If you are unsure if you system will run Merkatoä, please contact us at 1-800-xxx-xxxx or visit our website at http://www.invisiblehand.net.

 

Hardware:

 

Software:

 

 

2.2  System Requirements for Routux

 

If you will be using your Linux machine as a router as well as a Merkatoä server with the Routux linux-based routing software, you will also need the following:

 

Hardware:

 

Software:

 

 

2.3  Upgrading your Merkatoä System

 

If you are already running Merkatoä and want to upgrade to the latest version, please skip directly to Chapter 5:  Upgrading Merkatoä on page xx.

 


3  Installing Merkatoä

 

3.1  Pre-installation

 

Before you can install Merkatoä, you need to perform the following tasks on your Linux system.  If you don't know how to do this, please ask your Unix system administrator or contact IHN support.

 

  1. Log in as the root (superuser) account.
  2. Create a group called "merkato".
  3. Create a user called "merkato" who belongs to the group "merkato".
  4. Create a directory called "merkato" in the /usr/local directory.

mkdir /usr/local/merkato

  1. Run the following commands:

cd /usr/local/merkato

chown merkato .

chgrp merkato .

 

3.2  Installation

 

Now you are ready to install Merkatoä.  If anything should go wrong, don't panic!   Instead, you can just run the installation again and start over.  If you have any problems, please contact support.

 

Before you begin, make sure you have a merkato-1.1.tar.gz file in the merkato home directory.

 

  1. Uncompress the file using the command:

tar vfxz merkato-1.1.tar.gz

 

  1. Change into the merkato-dist/linux directory

cd merkato-dist/linux

 

  1. Run the configure program

./configure


  1. You will see the following text:

 

Merkato installation. This includes the following:

- A self-contained Java virtual machine (JRE) -- 25M of disk space

- Apache HTTP server and ApacheJServ servlet engine -- 6M

- Merkato documentation -- 6M

- Merkato run-time java binaries and configuration files -- 3M

If you want to save disk space, or already have some of these elements,

consider doing a manual installation. Refer to README.install in this

directory.

 

Enter the root directory for this installation [/usr/local/merkato]:

 

In this case, the default is fine.  If you are using another directory, enter it here.   Otherwise, just press <Enter>

 

  1. Next, you will need to know what the URL buyers will use to log-in to your Merkatoä server. 

 

Enter the home URL for this merkato deployment [http://www.streaminghand.net/merkato]:

 

            In most cases, the correct entry for this is

 

http://www.streaminghand.net/xyz

 

where xyz is the name of your machine.  For example, it might be "crosby"

 

  1. The next question wants to know your Fully Qualified Domain Name of the Merkatoä Server OR the IP address of that server.

 

Enter the fully qualified hostname or IP address of this server [merkato.invisiblehand.net.]:

 

You should type one or the other piece of information here and press <Enter>.


  1. Merkatoä now needs the IP address of the machine running the Routux software.  If you are using a Ciscoâ router instead of Routux, you can safely ignore this question and just hit <Enter>.

 

The special directory /cgi-bin/routux will normally be created if you

install routux on this same server. Access to execute those scripts

should only be allowed from this address.

Enter the numeric IP address of this server [192.168.0.85]:

 

If you are using Routux on the same machine you are installing Merkatoä on, the default will also be okay.  Hit <Enter> to continue.

 

  1. You will now be prompted for the username of the account the software will run under.  In this installation, you should have already set up a user called "merkato" in the group "merkato" for this purpose.

 

Enter the username under which the server will run [merkato]:

 

The default here is okay, so hit <Enter>.

 

  1. The default for the groupname is okay, too, so hit <Enter> again when you see:

 

Enter the groupname under which the server will run [merkato]:

 

  1. The next question tells Merkatoä which port to listen to for incoming http connections.  In almost all cases, the default port, 8505, is fine.

 

Enter the port number to which the http server will listen [8505]:

 

Hit <Enter> to continue.

 

  1. Merkatoä also needs to know which port JServ should listen to.  Again, in most cases, the default is fine.  When you see:

 

Enter the Apache JServ port number [9505]:

 

Press <Enter> again.

 

  1. This question tells Apache where to put its lockfile.  If you are running several instances of Merkatoä on the same machine, you must make sure that each one is using a different location for its lockfile.  If you are running only one instance on this machine, you can use the default and hit <Enter> when you see:

 

Enter the httpd.lock file location [/usr/local/merkato]:


  1. Merkatoä now needs to know which database server to use for accessing account information.  At the moment, most installations should be using the server boss.invisiblehand.net.  When you see the text:

Enter the database server address [boss.invisiblehand.net]:

 

You can use the default and hit <Enter> again.  Don't worry when the installation script returns the following line (it's normal):

 

Warning: default database!

 

  1. In addition, make sure the port the database is running on is correct.  In the case of boss.invisiblehand.net, the default (port 1521) is correct.  Hit <Enter> when you see:

 

Enter the database server address [1521]:

 

  1. The next question determines the default user interface buyers get when they are created.  You'll see the following text:

 

Which XML template would you like buyer agents to have by default:

auctionagent_template.xml          buyer_template.xml

buyer_flowgui_slider_template.xml  buyer_wizard_template.xml

buyer_flowgui_template.xml         seller_template.xml

Template filename (must be in /usr/local/merkato/xml/templates):

 

For most users, IHN recommends the buyer_wizard_template.xml file, as it is the simplest and least confusing interface to provide to users.  In some cases, you might want to use the buyer_template.xml file, which provides the user with greater control and more available information about the auction in progress, at a cost of ease-of-use.  Please remember that this is simply the default interface for the agents, and other interfaces can always be used when you create agents on the command line.

 

Unless you have a good reason to use another template, please enter:

 

buyer_wizard_template.xml


  1. Whenever a new account is created in Merkato, e-mail is sent out to notify an administrator of the creation.  This e-mail, which contains machine configuration settings and general welcome information, can then be forwarded onto the owner of the account by the administrator.

 

This question determines which text file to use as the template for creating these e-mail messages.  The screen will show:

 

Which welcome email template would you like to use for new accounts:

bin/access_welcome.txt  bin/hosting_welcome.txt

Template filename relative to /usr/local/merkato:

 

If you are using Merkatoä to provide bandwidth for downloading information (destination-based allocation of bandwidth), you should enter:

 

     bin/access_welcome.txt

 

If, on the other hand, you are using Merkatoä to provide bandwidth for uploading or serving information (source-based allocation of bandwidth), you should enter:

 

bin/hosting_welcome.txt

 

  1. This question tells Merkatoä the e-mail address of the administrator where all account-creation messages should be sent.  Remember, the administrator must forward these messages on to the owner of the newly-created account.  When you see:

 

Email address where welcome mail will be sent [help@invisiblehand.net]:

 

You should enter in the administrator's e-mail address.

 

When you hit <Enter>, a lot of information will go past the screen as Merkatoä installs itself on your system.  You can safely ignore most of these messages.

 

  1. When the text on the screen stops scrolling, you will see the following:

 

Configuring adminstrative account for this merkato installation.

This is the username/password used for HTTP-authentication in merkato

sysadmin CGIs like account creation and routux monitoring.

Username: merkato

New password:

 

You should now enter in a password for accessing the Merkatoä administration page.  A good password has a combination of uppercase and lowercase letters and numbers.  You will need to enter your password twice for confirmation.

 

3.3  Configuring a Resource

 

Congratulations!!!  You're almost done installing Merkatoä.  The remaining steps tell Merkatoä what type of resource you'd like to use...in the case, it means specifying the type of router that you will use to control bandwidth.  At this point, you have several options.  You must configure at least one resource for your installation.

 

To configure a resource, change to the "/usr/local/merkato/bin" directory and run "./configure-resource.sh"

 

  1. If you are going to use Merkatoä with a Cisco 2600 Router with Weighted Fair Queueing (WFQ), you should follow the instructions in
    Section 3.3.1--Configuring a Cisco Resource on page 12.
  2. If you are going to use Merkatoä with a Routux router, you should follow the instructions in Section 3.3.2--Configuring a Routux Resource on page 16.
  3. If you are going to use Merkatoä for testing purposes and don't need to actually use a router to allocate bandwidth, you should follow the instructions in
    Section 3.3.3--Configuring a Generic Resource on page 20.

 

 


3.3.1 Configuring a Cisco Resource

If you are using Merkatoä for a Cisco router , please execute the following steps .

 

  1. In the configuration script, the next thing you will see on your display is the following text:

 

Resource configuration. A merkato resource needs

- a resource agent to run the market for the resources

- a servlet (resource agent context) in which the resource agent runs.

 

Once a resource is configured, the resource agent is at

http://total-wreck.invisiblehand.net.invisiblehand.net:8505/bx/<RESOURCE_NAME>

 

You can now configure some resources for this Merkato deployment.

You can also do this later using bin/configure-resource.sh

For a list of currently supported resource types, see the documentation.

 

Would you like to configure a resource (y/n)?y

 

            To continnue, you should enter:

 

y

 

  1. You need to give the resource you are configuring a name.  Because you are configuring a Cisco resource, when you see:

 

Enter resource name [generic]:

 

You should the name you would like the resource to be called.

 

  1. The answer to the next question tells Merkatoä which java class to use for communication with the resource.  When you see:

 

Enter resource driver class [ihn.merkato.net.DummyDriver]:

 

You should enter one of the following classes, based on the router you are using.

 

 

Description

Class

2621 CAR (rate-limited)

ihn.diffpex.net.Cisco2621CARHttpDriver

2621 WFQ (rate-guaranteed)

ihn.diffpex.net.Cisco2621CBWFQHttpDriver

2621 CAR w/ routing*

ihn.diffpex.net.CSCO2621CAR_SR

2621 WFQ w/ routing*

ihn.diffpex.net.CSCO2621WFQ_SR

7206 CAR

ihn.diffpex.net.Cisco7206CARHttpDriver

7206 WFQ

ihn.diffpex.net.Cisco7206CBWFQHttpDriver

7507 CAR

ihn.diffpex.net.Cisco7507CARHttpDriver

7507 WFQ

ihn.diffpex.net.Cisco7507CBWFQHttpDriver

 

 

*These classes require an extra parameter in the resource configuration string (see below) to specify the next hop IP address

 

 

  1. The next question asks for a resource configuration string that tells Merkatoä specific information about the router you are using.  The format of the string is "A$B$C$D$E$F$G$H$I$J$K where:

 

A is the IP address of the router

B is the interface where bandwidth will be limited/guaranteed

C is the type of rate limiting/guarantee (src for source-based, dst for destination-based)

D is the speed of the connection to be auctioned in Kbps

E is the speed of the interface in Kbps

F is the speed of the best-effort queue in Kbps

G is the speed of the priority queue in Kbps

H is the type of priority queue (src for source-based priority, dst for destination-based)

I is the IP address of the priority queue

J is a resource agent id...if there is more than one resource agent on the system, each resource should have a unique ID number from 0 to 5.  If there is only one resource agent on the system, this parameter may be left out.

K is the next hop IP address, used only for classes that perform routing.  If K is used, J must be used as well.

 

For example, the string might look like:

192.168.4.10$FastEthernet0/0$dst$1544$100000$64$100$src$192.168.4.9

 

When you see:

 

Warning: default resource driver class!

Enter resource driver initialization string [address$interface$src$10000$100000]:

 

You should enter the string that matches your configuration.


 

  1. The answer to the next question determines the username of the default seller of the resource.  This name can be anything you wish, and will be the initial seller who sets the price of the resource.  As a convention, at IHN we use the machine's name followed by "seller", so if the machine is "merkato.invisiblehand.net" the username of the default seller would be "merkatoseller".  Please note that this username will be used to communicate with the Cisco router, so you must have a username on the router that matches the one you enter here.  When you see:

 

Warning: default resource driver init string !

 

PLEASE READ THE FOLLOWING CAREFULLY!

 

Each resource MUST have a seller associated with it.

If the resource configuration requires authentication, then

the seller's username/passwd will be used.

 

Each resource agent contains a default seller which is created

automatically. At any time, another valid seller can take over by joining

the resource agent and submitting an ASK.

 

Now we configure the default seller for generic

Enter the default seller username [generic]:

 

You should enter in the name you have chosen.

 

  1. You will now be prompted for a password for the above default seller account.  This password must be the same on the router for the user created above as it is here.   Please enter the password when you see:

 

Enter the default seller configuration password [generic]:

 

  1. The next question asks for the default units to be used for the resource you are offering.  Units can be Gigabits per second (Gbps), Megabits per second (Mbps) or Kilobits per second (Kbps).  You should enter one of abbreviations (Gbps, Mbps, or Kbps), or just use the default when you see:

 

Enter the UNITS of resource quantity [Kbps]:


 

  1. The next question asks for the quantity of the resource you will be selling.  This answer is given in the units specified in the previous question.  You will the following text:

 

Enter the QUANTITY of resource to be offered by the default seller [1500]:

 

If you wish to sell a resource of 1544 kilobits per second, enter:

 

1544

 

  1. The answer to this question tells Merkatoä the units of value of the given resource.  This answer can be in $/month, $/day, $/second, $/ms, c/month, c/day, c/second, or c/ms.

 

In most cases, the default answer ($/month) will probably suffice.  You press <Enter> or type a different unit when you see:

 

Enter the UNITS of value [$/month]:

 

  1. The next question asks, in the units given above, what the reserve value of the resource you are selling should be.  Keep in mind that this is not the value it will be sold at, but rather the minimum value of the entire resource.  When you see:

 

Enter the reserve VALUE of the resource to be offered by the default seller [100]:

 

You should enter the minimum price you are willing to accept for the entire resource.

 

  1. That's it.  Unless you want to configure an additional resource, when you see:

 

Would you like to configure a resource (y/n)?

 

Just enter:

 

n

 

Congratulations!!!!  You're finished installing Merkatoä.  You should now proceed to Chapter 7:  Running Merkato on page 23.

 


3.3.2 Configuring a Routux Resource

 

If you are using Merkatoä for testing purposes and don't wish to allocate bandwidth on a router, you can follow these steps to configure a "Generic" resource.  Agents will still be able to bid for bandwidth, but the allocations will not be transmitted to a router. 

 

  1. In the configuration script, the next thing you will see on your display is the following text:

 

Resource configuration. A merkato resource needs

- a resource agent to run the market for the resources

- a servlet (resource agent context) in which the resource agent runs.

 

Once a resource is configured, the resource agent is at

http://total-wreck.invisiblehand.net.invisiblehand.net:8505/bx/<RESOURCE_NAME>

 

You can now configure some resources for this Merkato deployment.

You can also do this later using bin/configure-resource.sh

For a list of currently supported resource types, see the documentation.

 

Would you like to configure a resource (y/n)?y

 

            To continnue, you should enter:

 

y

 

  1. You need to give the resource you are configuring a name.  Because you are configuring a routux resource, when you see:

 

Enter resource name [generic]:

 

You should enter:

 

routux

 


  1. The answer to the next question tells Merkatoä which java class to use for communication with the resource.  When you see:

 

Warning: default resource!

Enter resource driver class [ihn.merkato.net.DummyDriver]:

 

You should enter:

 

ihn.diffpex.net.CGIDriver

 

  1. The next question asks for a resource configuration string that tells Merkatoä specific information about the router you are using.  The format of the string is "A$B$C$D$E$F$G$H$I", where:

 

A is the URL of the Routux scripts (usually "http://yourmachine.yourdomain.com:8505/cgi-bin/routux/" )

B is the interface where bandwidth will be limited

C is the type of rate limiting (src for source-based rate limiting, dst for destination-based)

D is the speed of the connection to be auctioned in Kbps

E is the speed of the interface in Kbps

F is the speed of the best-effort queue in Kbps

G is the speed of the priority queue in Kbps

H is the type of priority queue (src for source-based priority, dst for destination-based)

I is the IP address of the priority queue

 

For example, the string might look like:

http://crosby.invisiblehand.net:8505/cgi-bin/routux/$eth1$dst$1544$100000$64$90000$src$192.168.0.1

 

When you see:

 

Warning: default resource driver class!

Enter resource driver initialization string [address$interface$src$10000$100000]:

 

You should enter the string that matches your configuration.

 


  1. The answer to the next question determines the username of the default seller of the resource.  This name can be anything you wish, and will be the initial seller who sets the price of the resource.  When you see:

 

Warning: default resource driver init string !

 

PLEASE READ THE FOLLOWING CAREFULLY!

 

Each resource MUST have a seller associated with it.

If the resource configuration requires authentication, then

the seller's username/passwd will be used.

 

Each resource agent contains a default seller which is created

automatically. At any time, another valid seller can take over by joining

the resource agent and submitting an ASK.

 

Now we configure the default seller for generic

Enter the default seller username [generic]:

 

You should enter the username of the initial seller.

 

  1. You will now be prompted for a password for the above default seller account.  This can be anything you wish.  Please enter the password when you see:

 

Enter the default seller configuration password [generic]:

 

  1. The next question asks for the default units to be used for the resource you are offering.  Units can be Gigabits per second (Gbps), Megabits per second (Mbps) or Kilobits per second (Kbps).  You should enter one of abbreviations (Gbps, Mbps, or Kbps), or just use the default when you see:

 

Enter the UNITS of resource quantity [Kbps]:

 


  1. The next question asks for the quantity of the resource you will be selling.  This answer is given in the units specified in the previous question.  You will the following text:

 

Enter the QUANTITY of resource to be offered by the default seller [1500]:

 

If you wish to sell a resource of 1544 kilobits per second, enter:

 

1544

 

  1. The answer to this question tells Merkatoä the units of value of the given resource.  This answer can be in $/month, $/day, $/second, $/ms, c/month, c/day, c/second, or c/ms.

 

In most cases, the default answer ($/month) will probably suffice.  You press <Enter> or type a different unit when you see:

 

Enter the UNITS of value [$/month]:

 

  1. The next question asks, in the units given above, what the reserve value of the resource you are selling should be.  Keep in mind that this is not the value it will be sold at, but rather the minimum value of the entire resource.  When you see:

 

Enter the reserve VALUE of the resource to be offered by the default seller [100]:

 

You should enter the minimum price you are willing to accept for the entire resource. 

 

  1. That's it.  Unless you want to configure an additional resource, when you see:

 

Would you like to configure a resource (y/n)?

 

Just enter:

 

n

 

Congratulations!!!!  You're finished installing Merkatoä.  You should now proceed to Chapter 4:  Installing Routux on page 23.


3.3.2 Configuring a Generic Resource

 

If you are using Merkatoä for testing purposes and don't wish to allocate bandwidth on a router, you can follow these steps to configure a "Generic" resource.  Agents will still be able to bid for bandwidth, but the allocations will not be transmitted to a router. 

 

  1. In the configuration script, the next thing you will see on your display is the following text:

 

Resource configuration. A merkato resource needs

- a resource agent to run the market for the resources

- a servlet (resource agent context) in which the resource agent runs.

 

Once a resource is configured, the resource agent is at

http://total-wreck.invisiblehand.net.invisiblehand.net:8505/bx/<RESOURCE_NAME>

 

You can now configure some resources for this Merkato deployment.

You can also do this later using bin/configure-resource.sh

For a list of currently supported resource types, see the documentation.

 

Would you like to configure a resource (y/n)?y

 

            To continnue, you should enter:

 

y

 

  1. You need to give the resource you are configuring a name.  Because you are configuring a generic resource, and the default is "generic", you can hit <Enter> when you see:

 

Enter resource name [generic]:

 

  1. The answer to the next question tells Merkatoä which java class to use for communication with the resource.  For the generic resource, the default is the correct entry.  Press <Enter> when you see:

 

Warning: default resource!

Enter resource driver class [ihn.merkato.net.DummyDriver]:

 


  1. The next question asks for a resource configuration string that tells Merkatoä specific information about the router you are using.  Because you are not using a real router, this string is ignored by the system.  You can hit <Enter> again when you see:

 

Warning: default resource driver class!

Enter resource driver initialization string [address$interface$src$10000$100000]:

 

  1. The answer to the next question determines the username of the default seller of the resource.  This name can be anything you wish, and will be the initial seller who sets the price of the resource.  In this case, the default is fine.  Hit <Enter> when you see:

 

Warning: default resource driver init string !

 

PLEASE READ THE FOLLOWING CAREFULLY!

 

Each resource MUST have a seller associated with it.

If the resource configuration requires authentication, then

the seller's username/passwd will be used.

 

Each resource agent contains a default seller which is created

automatically. At any time, another valid seller can take over by joining

the resource agent and submitting an ASK.

 

Now we configure the default seller for generic

Enter the default seller username [generic]:

 

  1. You will now be prompted for a password for the above default seller account.  This can be anything you wish...with a generic account, the password "generic" can work nicely, as you won't be selling a real resource.  Please enter the password when you see:

 

Enter the default seller configuration password [generic]:

 

  1. The next question asks for the default units to be used for the resource you are offering.  Units can be Gigabits per second (Gbps), Megabits per second (Mbps) or Kilobits per second (Kbps).  You should enter one of abbreviations (Gbps, Mbps, or Kbps), or just use the default when you see:

 

Enter the UNITS of resource quantity [Kbps]:

 


  1. The next question asks for the quantity of the resource you will be selling.  This answer is given in the units specified in the previous question.  You will the following text:

 

Enter the QUANTITY of resource to be offered by the default seller [1500]:

 

If you wish to sell a resource of 1544 kilobits per second, enter:

 

1544

 

  1. The answer to this question tells Merkatoä the units of value of the given resource.  This answer can be in $/month, $/day, $/second, $/ms, c/month, c/day, c/second, or c/ms.

 

In most cases, the default answer ($/month) will probably suffice.  You press <Enter> or type a different unit when you see:

 

Enter the UNITS of value [$/month]:

 

  1. The next question asks, in the units given above, what the reserve value of the resource you are selling should be.  Keep in mind that this is not the value it will be sold at, but rather the minimum value of the entire resource.  When you see:

 

Enter the reserve VALUE of the resource to be offered by the default seller [100]:

 

You should enter the minimum price you are willing to accept for the entire resource.  Since this is a generic resource and is not controlling a real router, you can hit <Enter>.

 

  1. That's it.  Unless you want to configure an additional resource, when you see:

 

Would you like to configure a resource (y/n)?

 

Just enter:

 

n

 

Congratulations!!!!  You're finished installing Merkatoä.  You should now proceed to Chapter 7:  Running Merkato on page 23.


4  Installing Routux

 

This chapter will guide you through the installation of Routux, letting you use a linux machine (even the same one you're running Merkatoä on) as a router.

 

If you are running Merkatoä with a Cisco Router, or are using the "Generic" resource, please skip this chapter and proceed directly to Chapter 7:  Running Merkato

 

Before you begin, make sure you have a routux-1.1.tar.gz file on your system.

 

  1. Uncompress the file using the command:

tar vfxz routux-1.1.tar.gz

 

  1. Change into the routux-dist directory

cd routux-dist

 

  1. Run the configure program

./configure

 

  1. The configuration program will display the following:

 

Routux installation. You should already have an HTTP server

installed and configured.

 

 

The routux control cgi scripts must be installed in the directory

where your HTTP server will find them.

WARNING: you should secure these CGIs by configuring your HTTP

server to restrict by hostname or require authentication before

executing them. 

Enter the cgi-bin directory of your server [/usr/local/merkato/apachegroup/apache/cgi-bin/routux]:

 

Unless you have opted to install Merkatoä in a directory other than /usr/local/merkato, the default should be fine, and you can hit <Enter> to continue.

 

If you did not install Merkatoä in /usr/local/merkato, then enter the correct directory where your HTTP server resides.


  1. Routux also needs to know where to install the traffic control program.  If you installed Merkatoä into the /usr/local/merkato directory, you can hit <Enter> when you see:

 

The routux traffic control program tc must be installed.

Enter the directory where tc will be installed [/usr/local/merkato/sbin]:

 

If you installed Merkatoä into a directory other than /usr/local/merkato, you should type the name of the directory followed by /sbin here.  For example, if you installed Merkatoä into /opt/merkato, you would enter "/opt/merkato/sbin" here.

 

You have now installed Routux on your system.  If you did not run the configuration script as "root", there are a few more steps to perform.  If you did perform the previous steps as root, you can skip to Chapter 7:  Running Merkato.

 

  1. If you did not run the configuration script as root, you need to become root by using the "su" command.  Type:

su

 

  1. When you see the prompt:

 

Password:

 

You should enter your root password.

 

  1. Now you need to run the chown command to change the ownership of the tc program.  Type:

 

chown root /usr/local/merkato/sbin/tc

 

  1. Next, you need to change the permissions of the tc program by typing:

 

chmod 7551 /usr/local/merkato/sbin/tc

 

  1. Finally, you can exit from the root shell.

 

exit

 

Congratulations!!!  Routux has been successfully installed.  You can continue to Chapter 7:  Running Merkato.


5  Running Merkato

 

5.1 Editing the Resource Agent

 

If you want to edit the resource agent already set up on your Merkatoä system, first go to the "Administration" page, and select "Edit Agent".

 

The fields you see are explained below.

 

Context is the resource agent you are currently editing.

 

Identity

Username is the username of the resource agent.  If you are using a Cisco router, this is also the username used to log into the router.

Password is the password of the resource agent.  If you are using a Cisco router, this is also the password used to log into the router.

IP address is the IP address of the router.

Netmask is the netmask of the router.

 

PSP auction rule

randomduration is normally set to "false".  If it is set to “true”, then the bidlist duration is a random value which has an exponential distribution with the mean equal to the given value.

duration is the length of time for the countdown between when no bids have been placed (convergence) and the close of the auction, provided that mustconv is true.  Duration should be set to the smallest possible time it takes an agent to be able to bid twice.  If mustconv is false, this specifies the length of the round.

mustconv is normally set to "true".  If it is set to "false", then duration (specified above) is the length of the round, not the length of the countdown.

bidfee is the initial cost of one bid.  Every time there are maxNBids (see below), bidfee is doubled.

capacity is currently not used.

 

Athenticator

Password file is the file which contains the account names and passwords for the Merkatoä agents.

 

Valuation

qmax is the capacity of the resource you are selling.  To the right of qmax is a field for the units of that number.

 

vmax is the seller's reserve value.  vmax is the minimum value of the total resource you are selling.  To the right of vmax is a field for the units of that number.

 

accountingDriverClass is the Java class used for accounting.

 

accountfile is the name and location of the file used for accounting.  If it is http://HOSTNAME:HTTP_PORT/bx/dbstub then it is local.  If it is http://HOSTNAME:HTTP_PORT/bc/accounting it goes directly to the merkato v1 database, boss.invisiblehand.net

 

hwDriverClass  is the Java class used to communicate with the router.  This should have been set up during the resource configuration stage of installation.

 

hwDevice is the resource string.  This should have been set up during the resource configuration stage of installation.

 

maxNBids is the number of bids that need to take place before the bidfee (see above) is doubled.  This number should be the square of the maximum number of agents you expect to run at one time.  maxNBids makes sure that the auction eventually comes to a close.  However, if maxNBids is too small, then the rounds will end without the buyers converging, and the most efficient allocation of bandwidth will not be achieved.

 

maxBidFee is the upper limit of bidfee.  Once maxBidFee is reached, bidfee will not continue to double.  To the right is a field for the units of this number.

 

maxAccountBalance is the maximum ammount of account balance a player is allowed to have.  To the right is a field for the units of this number.

 

verbose determines the ammount of information printed by the resource agent, in the log and other messages.

 

rememberIds determines if players get to keep their ID numbers when they log out and log back in to the system. 

 

clientTimeout is currently not used.

 

serverTimeout is the time, in miliseconds, to wait while communicating with other software.

 

pause is the minimum time, in miliseconds, between the end of a round and the beginning of the next round.  Time spent allocating the round occurs during this pause, and the next round does not begin until the allocation is complete.  For example, if pause is set to 30000 (30 seconds), and allocating the bandwidth takes 10 seconds, there will be 20 seconds of inactivity, so there is a 30 second pause between the end of the previous round and the beginning of the next round.  If, however, allocating the bandwidth takes 50 seconds, then the next round will begin immediately after the allocation is complete.

 

detailedlog determines whether ASK, BID, and CHARGE information are printed in the log.


5.2 Controlling Round Length

 

A Merkatoä round's timeline looks like the following, provided that mustconv is set to "true":

 

 

 

 

 

 

 

 

 


If mustconv is false, the timeline looks like this:

 

 

 

 

 

 

 


  1. During the "bidding active" period, agents place bids with the resource agent.
  2. During the "duration" period, the resource agent counts down from duration to zero.  If mustconv is true, then at any time during this period, an agent places a new bid, the counter is set back to duration.  Duration should be set to be the smallest possible time it takes an agent to be able to bid twice. 

 

In general, 60 seconds is a good number to use, although with a large number of agents in the garage, a larger number should be used.

 

  1. During the "pause" period, there are three things that occur.  Accouting, which is when Merkatoä communicates with the database to charge the accounts for the bandwidth they have received during the previous round, Allocation, which is where Merkatoä sets the new bandwidth allocations on the router, and Wait,   which is the delay between the end of the allocation and the beginning of the next round.

 

When editing the resource agent, you can control two of these parameters:  duration and pause.  As stated earlier, duration should be set to be the smallest time that it could take an agent to place a bid twice.  If duration is shorter than that period, then the round could end before the different agents converge.  If duration is much longer, then the window for any change made to an agent's bidding strategy or valuation that would cause the countdown to begin again would be extended, and the rounds might never close.

 

Pause determines the ammount of time between the end of the round and the beginning of the next round, and includes the time that accounting and allocation take place.  If the time it takes for accounting and allocation to be performed are longer than the setting of pause, then the next round waits for allocation to complete before starting.

 

By setting pause to a small number, you can ensure that new rounds begin almost immediately after the previous round is completed.  Setting pause to be a larger number allows you to extend the time players hold a particular allocation, without increasing the window of opportunity for new bids to prevent the close of a round.

 

Using duration and pause allows you to control how long you would like rounds to take.

For example, if you'd like rounds to occur roughly every five minutes,  and you know that it takes about three minutes for a round to converge, you can set duration to sixty seconds.  This means that the round will end after four minutes.  If it takes thirty seconds for accounting and allocation, and pause is set to sixty seconds, then the first thirty seconds after the round ends will go towards the accounting and allocation, and the remaining thirty seconds will be wait time.  After that, a new round begins.
5.3 Resource Agent Example

 

Merkato Auction Resource Agent Settings

Context

http://total-wreck.invisiblehand.net:8505/bx/generic

Identity

Username:

Password:

IP address:

Netmask:

PSP auction rule:

 

randomduration

duration

mustconv

bidfee

capacity

Authenticator:

Password file

Linear Valuation:

qmax

vmax

accountingDriverClass

 

accountFile

 

hwDriverClass

 

hwDevice

 

maxNBids

 

maxBidFee

 

maxAccountBalance

 

verbose

 

rememberIds

 

clientTimeout

 

serverTimeout

 

pause

 

detailedlog