Serverless Grids

Warning: this applies to 0.6.9 and prior. Needs some revisions for pre-0.7 code.

This tutorial explains how to set up a grid composed of several simulators, possibly running on different machines, by stitching standalones together, and without running extra servers (URM or others). The only other server you need besides OpenSim.exe (the simulator) is either a MySQL or MSSQL server -- the DB.

This hybrid architecture can be setup independent of whether you have Hypergrid enabled or not; however, for simplicity sake, the explanation here uses the pre-packaged configuration StandaloneHypergrid, because it already has all the right connectors enabled. For configurations of non-HG standalones, please ask on the IRC.

NOTE: this works with releases r10869 and above (as of Sep.28)

== Step One: Install a DB server ==

This tutorial does not explain how to do this, but you need a database server running in one of your machines. Please see elsewhere on this wiki, or search on the Web how to do that. You can either use MySQL or MSSQL; this tutorial assumes MySQL, but for MSSQL it's in all identical.

After installing a MySQL server, create an account called "opensim", and give all permissions to that account. For a grid spawning multiple machines, you need to set up this account so that it can access the DB server from other machines. Again, search elsewhere for how to do this, if you don't know.

Before you go any further, make sure this account is properly setup by logging to the DB server from all the machines where you plan to run simulators. If you can't login with the mysql client from those machines, using the opensim account you just created, OpenSimulator also won't be able to. So don't even attempt at proceeding to step two if this doesn't work.

== Step Two: OpenSimulator Configuration ==

For each OpenSimulator simulator instance do this.

As usual, copy OpenSim.ini.example to your own copy of OpenSim.ini. Make whatever changes you usually make to work in HG standalone. You can use your prior copy of OpenSim.ini. Then make the following changes:

userDatabase_plugin = "OpenSim.Data.MySQL.dll" user_source = "Data Source=XXX;Database=opensim;User ID=opensim;Password=YYY;" where XXX = localhost or the name of the machine where you have your MySQL server, if different from the local machine YYY = the password of the opensim account you have created Include-HGStandalone = "config-include/StandaloneHypergrid.ini"
 * 1) Search for "userDatabase_plugin". Set it to
 * 1) Search for "user_source". Set it to
 * 1) In the [Architecture] section, make sure this one is choosen:

Copy config-include/StandaloneCommon.ini.example to config-include/StandaloneCommon.ini, and make the following changes/settings:

StorageProvider = "OpenSim.Data.MySQL.dll" ConnectionString = "Data Source=XXX;Database=opensim;User ID=opensim;Password=YYY;" (see XXX and YYY above)
 * 1) In the [DatabaseService] section, choose MySql instead of the default SQLite:

StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData" ConnectionString = "Data Source=XXX;Database=opensim;User ID=opensim;Password=YYY;"
 * 1) In the [GridService] section, choose the MySql option instead of the default one:


 * 1) In the [Modules] section add NeighbourServices = "RemoteNeighbourServicesConnector"

== Step Three: Region Configuration ==

For each OpenSimulator simulator instance, set up region files as you usually do. Make sure that no two regions are on the same coordinates. If you want the differerent simulators to form a larger contiguous space, place the regions in such a way that they are neighbours.

Step Four: Start Up the Simulators
As the title says, start the simulators. You may want to let each one finish starting up before starting the next one. For different simulators with neighbouring regions, you should see console messages pertaining to "HelloNeighbour", which is an indication that the simulators are finding each other.

Step Five: Login
Your login uri is the normal uri for standalones. That is, http://&lt;one of your simulators&gt;:&lt;http port&gt;

And voila! Insta-scalability without servers.

Notes:

 * Instant messaging does not yet work on these grids. It will soon.