Merkatoä 1.1
Installation Manual
Table of Contents
2.1 System Requirements for Merkatoä
2.2 System Requirements for Routux
2.3 Upgrading your Merkatoä
System
3.3.1
Configuring a Cisco Resource
3.3.2
Configuring a Routux Resource
3.3.2
Configuring a Generic Resource
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.
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.
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:
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:
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.
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.
mkdir
/usr/local/merkato
cd
/usr/local/merkato
chown
merkato .
chgrp
merkato .
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.
tar vfxz merkato-1.1.tar.gz
cd
merkato-dist/linux
./configure
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>
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"
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>.
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.
Enter the username under which the server will run [merkato]:
The default here is okay, so hit <Enter>.
Enter the groupname under which the server will run [merkato]:
Enter the port number to which the http server will listen [8505]:
Hit <Enter> to continue.
Enter the Apache JServ port number [9505]:
Press <Enter> again.
Enter the httpd.lock file location [/usr/local/merkato]:
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!
Enter the database server address [1521]:
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
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
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.
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.
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"
If you are using Merkatoä for a Cisco router , please execute the following steps .
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
Enter resource name [generic]:
You should the name you would like the resource to be called.
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
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.
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.
Enter the default seller configuration password [generic]:
Enter the UNITS of resource quantity [Kbps]:
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
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]:
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.
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.
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.
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
Enter resource name [generic]:
You should enter:
routux
Warning: default resource!
Enter resource driver class [ihn.merkato.net.DummyDriver]:
You should enter:
ihn.diffpex.net.CGIDriver
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.
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.
Enter the default seller configuration password [generic]:
Enter the UNITS of resource quantity [Kbps]:
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
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]:
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.
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.
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.
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
Enter resource name [generic]:
Warning: default resource!
Enter resource driver class [ihn.merkato.net.DummyDriver]:
Warning: default resource driver class!
Enter resource driver initialization string [address$interface$src$10000$100000]:
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]:
Enter the default seller configuration password [generic]:
Enter the UNITS of resource quantity [Kbps]:
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
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]:
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>.
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.
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.
tar vfxz routux-1.1.tar.gz
cd routux-dist
./configure
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.
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.
su
Password:
You should enter your root password.
chown root /usr/local/merkato/sbin/tc
chmod 7551 /usr/local/merkato/sbin/tc
exit
Congratulations!!! Routux has been successfully installed. You can continue to Chapter 7: Running Merkato.
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.
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:
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.
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 |