ROBUST

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(An Example Conversion From UGRM To URM)
Line 194: Line 194:
 
Bring up URM. Bring up regions.
 
Bring up URM. Bring up regions.
  
==Moving the Grid Server to ROBUST==
+
==Moving the Grid Server to its own ROBUST shell ==
 +
 
 +
Alternatively, if you have a large grid, you may want to run the grid service in its own ROBUST shell. If so, do this:
  
 
* Copy OpenSim.GridServer.ini.example to your own copy
 
* Copy OpenSim.GridServer.ini.example to your own copy
Line 202: Line 204:
 
* Start AI and M as usual
 
* Start AI and M as usual
 
* Start your sims
 
* Start your sims
 +
 +
If you keep the grid server listening to the port you had before you don't need to change any other configuration files.

Revision as of 07:20, 28 September 2009

Contents

Redesigned OpenSim Basic Universal Server Technology (R.O.B.U.S.T.)

Concepts

R.O.B.U.S.T. (ROBUST) leverages the system of in and out connectors and services that was developed for the Hypergrid and OpenSim. It replaces OGS1 with a modular architecture that can be easily extended using core and 3rd party modules.

R.O.B.U.S.T. (ROBUST) is a flexible server shell that can load the same modules already used by regions. This allows for nearly 100% code reusability and great flexibility.

The R.O.B.U.S.T. (ROBUST) server loads "in" connectors as specified in the configuration file. These connectors then load the required processing and storage modules and/or "out" connectors. Through this architecture, each R.O.B.U.S.T. server can run any or all grid services, and/or act as a proxy for grid services.

Configuration

The server reads a configuration file at startup, which defaults to the name of the assembly with .ini appended. The default name for the R.O.B.U.S.T. (ROBUST) server is OpenSim.Server.exe, therefore the default configuration file is OpenSim.Server.ini. An OpenSim.Server.ini.example file is provided with the OpenSim kit.

; * The startup section lists all the connectors to start up in this server
; * instance. This may be only one, or it may be the entire server suite.
; * Multiple connectors should be seaprated by commas.
; *
; * These are the IN connectors the server uses, the in connectors
; * read this config file and load the needed OUT and database connectors
; *
[Startup]
ServiceConnectors = "OpenSim.Server.Handlers.dll:AssetServiceConnector,OpenSim.Server.Handlers.dll:InventoryServiceInConnector"   

; * This is common for all services, it's the network setup for the entire
; * server instance
; *
[Network]
port = 8003

; * As an example, the below configuration precisely mimicks the legacy
; * asset server. It is read by the asset IN connector (defined above)
; * and it then loads the OUT connector (a local database module). That,
; * in turn, reads the asset loader and database connection information
; *
[AssetService]
LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService"
DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll"
AssetLoaderArgs = "assets/AssetSets.xml"
StorageProvider = "OpenSim.Data.MySQL.dll"
ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=grid;"

; * This configuration loads the inventory server modules. It duplicates
; * the function of the legacy inventory server
; *
[InventoryService]
LocalServiceModule = "OpenSim.Services.InventoryService.dll:InventoryService"
UserServerURI = "http://127.0.0.1:8002"
SessionAuthentication = "false"
StorageProvider = "OpenSim.Data.MySQL.dll"
ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=grid;"

Command Line Arguments

  • -inifile
Specify the location of the .ini file to read instead of the default
  • -console
Specify console type, one of basic, local or rest
  • -logfile
Specify the logfile this server will log to
  • -prompt
Override the server prompt

Configuration File

Section [Startup]

  • ServiceConnectors
Comma separated list of service IN connectors. The format of each entry is <dllname>:<classname>. If a dll contains only one suitable class, the class name can be omitted.
  • Prompt
Override the server prompt
  • Console
Specify console type, one of basic, local or rest
  • Logfile
Specify the logfile this server will log to

Section [Network]

  • Port
Set the network port to listen on. All services will run on this port.

Connector Configurations

These configurations are provided by the connector modules and are not an integral part of the R.O.B.U.S.T. server. Documentation to all possible options can be found in the documentation of the connector. This manual only lists the options present in the sample configuration file.

Section [AssetService]

  • LocalServiceModule [Connector option]
A module specification (<dll>:<class>) that provides the services for this connector
  • DefaultAssetLoader [Service option]
A dll containing the asset loader to use for loading the default asset set
  • AssetLoaderArgs [Service option]
Path to load assets from (for the file system asset loader)
  • StorageProvider [Service option]
Dll containing the database provider code
  • ConnectionString [Service option]
Connection string to be passed to the database provider

Section [InventoryService]

  • LocalServiceModule [Connector option]
A module specification (<dll>:<class>) that provides the services for this connector
  • UserServerURI [Connector option]
URI to reach the user server at
  • SessionAuthentication [Connector option]
Authenticate inventory sessions (default false!)
  • StorageProvider [Service option]
Dll containing the database provider code
  • ConnectionString [Service option]
Connection string to be passed to the database provider

Additional connectors may need additional sections to be added.

Alternate Configuration Files

To run R.O.B.U.S.T. as separate processes, emulatig the legacy servers, you can copy the server executables to the names of the legacy servers:

cp OpenSim.Server.exe OpenSim.Grid.AssetServer.exe
cp OpenSim.Server.exe.config OpenSim.Grid.AssetServer.exe.config
cp OpenSim.Server.ini OpenSim.Grid.AssetServer.ini

Then, modify OpenSim.Grid.AssetServer.ini to read:

[Startup]
ServiceConnectors = "OpenSim.Server.Handlers.dll:AssetServiceConnector"   

[Network]
port = 8003

[AssetService]
LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService"
DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll"
AssetLoaderArgs = "assets/AssetSets.xml"
StorageProvider = "OpenSim.Data.MySQL.dll"
ConnectionString = "Data Source=localhost;Database=grid;User ID=grid;Password=grid;"

Now, when you run OpenSim.Grid.AssetServer.exe, it will act like the legacy asset server it replaces.

You can do the same for all other supported services.

This method is working fine as a replacement of the old Asset & Inventory servers, BUT : In the 2 following files :

OpenSim.Grid.AssetServer.exe.config
OpenSim.Grid.InventoryServer.exe.config

You have to update the log filename : from "OpenSim.log" to "OpenSim.Grid.AssetServer.log" & "'OpenSim.Grid.InventoryServer.log".

Just because there is a conflict accessing the logfile ( write ) ... So, if you don't do that modification, your OpenSim.exe won't start. ( Linux / Mono 2.4.2 )

An Example Conversion From UGAIM To UGRM

Converting from UGAIM to UGRM:

Kudos to diva and Melanie_t for helping and tolerating me (smxy).

My initial setup:

Full HG-enabled, Internet-accessible, Grid Mode system, using MySQL and split over two servers.

UGAIM and MySQL 5.0 run in separate 32-bit CentOS 5.3 Xen VMs on a 64-bit CentOS 5.3 system.
Each region runs in its own instance of OpenSim.exe on a 32-bit Windows XP SP3 Home system.
OSWI runs on the Windows system too.


Bring down the regions. Bring down UGAIM.

Then, the port for the inventory server needs to be changed from 8004 to 8003 in a number of places:

OpenSim.ini: "inventory_server_url" - For all regions and the UGRM server.
GridCommon.ini: "InventoryServerURI" - For all regions and the UGRM server.
UserServer_Config.xml: "default_inventory_server" - For the UGRM server.

In the MySQL database, in the "users" table, the userInventoryURI field needs to be updated for all users.

In OSWI's config file, update "$userInventoryURI".

AssetServer_Config.xml and InventoryServer_Config.xml can be deleted from the UGRM server.

On the UGRM server, copy OpenSim.Server.ini.example to OpenSim.Server.ini and edit it, changing the "ConnectionString" entries appropriately, in the [AssetService] and [InventoryService] sections.

Bring up UGRM. Bring up regions.


Semi-unrelated Note: According to Melanie_t, any of the UGRM servers can be restarted independently, without needing to restart the other three. However, if you restart the UserServer, you must issue the command "register" (without the quotes) at the MessagingServer console, afterwards.

An Example Conversion From UGRM To URM

Note: The code to do this is not in trunk yet, but is expected to be there very soon. I'll remove this note as soon as it hits trunk.

Converting from UGRM to URM:

This is a continuation of my "UGAIM to UGRM" example above. Eventually, I will merge the two examples.

Bring down the regions. Bring down UGRM.

Then, the port for the grid server needs to be changed from 8001 to 8003 in a number of places:

OpenSim.ini: "grid_server_url" - For all regions and the URM server.
UserServer_Config.xml: "default_grid_server" - For the URM server.
MessagingServer_Config.xml: "default_grid_server" - For the URM server.

On the URM server, save a copy of OpenSim.Server.ini. Copy OpenSim.Server.ini.example to OpenSim.Server.ini. Edit it to reflect any changes you made in the previous version. Then edit the "ConnectionString" entry, appropriately, in the [GridService] section.

GridServer_Config.xml can be deleted from the URM server.

Bring up URM. Bring up regions.

Moving the Grid Server to its own ROBUST shell

Alternatively, if you have a large grid, you may want to run the grid service in its own ROBUST shell. If so, do this:

  • Copy OpenSim.GridServer.ini.example to your own copy
  • Edit it and change it so that it uses your regular Database and the usual Grid Server port
  • Start U, then start the grid server like this:
$ OpenSim.Server.exe -inifile=OpenSim.GridServer.ini -logfile=/some/path/to/some/file
  • Start AI and M as usual
  • Start your sims

If you keep the grid server listening to the port you had before you don't need to change any other configuration files.

Personal tools
General
About This Wiki