Simplify database setup and remove migration problems by moving all sqlite config-include settings to a separate file for standalone

Update information in StandaloneCommon.ini.example to reflect this
Remove ISharedRegionModule interfaces from all SimianGrid connector classes temporarily since this stopped standalone from working (due to absence of AssetURI settings, etc.).
Solution here may be to create separate region module connectors as done by local/grid/hypergrid so that loading can be controlled via include files
Or otherwise work out how to stop these modules from being loaded for all OpenSim invocations
slimupdates
Justin Clark-Casey (justincc) 2010-03-12 20:29:17 +00:00
parent 7d738156fa
commit aad17e7513
14 changed files with 43 additions and 22 deletions

View File

@ -46,7 +46,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
/// Connects to the SimianGrid asset service
/// </summary>
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class SimianAssetServiceConnector : IAssetService, ISharedRegionModule
public class SimianAssetServiceConnector : IAssetService
{
private static readonly ILog m_log =
LogManager.GetLogger(

View File

@ -44,7 +44,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
/// Connects authentication/authorization to the SimianGrid backend
/// </summary>
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class SimianAuthenticationServiceConnector : IAuthenticationService, ISharedRegionModule
public class SimianAuthenticationServiceConnector : IAuthenticationService
{
private static readonly ILog m_log =
LogManager.GetLogger(

View File

@ -48,7 +48,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
/// Connects avatar appearance data to the SimianGrid backend
/// </summary>
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class SimianAvatarServiceConnector : IAvatarService, ISharedRegionModule
public class SimianAvatarServiceConnector : IAvatarService
{
private static readonly ILog m_log =
LogManager.GetLogger(

View File

@ -47,7 +47,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
/// Stores and retrieves friend lists from the SimianGrid backend
/// </summary>
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class SimianFriendsServiceConnector : IFriendsService, ISharedRegionModule
public class SimianFriendsServiceConnector : IFriendsService
{
private static readonly ILog m_log =
LogManager.GetLogger(

View File

@ -51,7 +51,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
/// backend
/// </summary>
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class SimianGridServiceConnector : IGridService, ISharedRegionModule
public class SimianGridServiceConnector : IGridService
{
private static readonly ILog m_log =
LogManager.GetLogger(

View File

@ -61,7 +61,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
/// Connects avatar inventories to the SimianGrid backend
/// </summary>
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class SimianInventoryServiceConnector : IInventoryService, ISharedRegionModule
public class SimianInventoryServiceConnector : IInventoryService
{
private static readonly ILog m_log =
LogManager.GetLogger(

View File

@ -51,7 +51,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
/// message routing) to the SimianGrid backend
/// </summary>
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class SimianPresenceServiceConnector : IPresenceService, ISharedRegionModule
public class SimianPresenceServiceConnector : IPresenceService
{
private static readonly ILog m_log =
LogManager.GetLogger(

View File

@ -60,7 +60,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
/// backend
/// </summary>
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class SimianProfiles : INonSharedRegionModule
public class SimianProfiles
{
private static readonly ILog m_log =
LogManager.GetLogger(

View File

@ -47,7 +47,7 @@ namespace OpenSim.Services.Connectors.SimianGrid
/// users) to the SimianGrid backend
/// </summary>
[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")]
public class SimianUserAccountServiceConnector : IUserAccountService, ISharedRegionModule
public class SimianUserAccountServiceConnector : IUserAccountService
{
private static readonly ILog m_log =
LogManager.GetLogger(

View File

@ -34,6 +34,7 @@ namespace OpenSim.Tests.Common.Mock
{
public class MockUserAccountService : IUserAccountService
{
public MockUserAccountService(IConfigSource config) {}
public UserAccount GetUserAccount(UUID scopeID, UUID userID) { return new UserAccount(); }

View File

@ -215,6 +215,9 @@ namespace OpenSim.Tests.Common.Setup
testScene.PhysicsScene
= physicsPluginManager.GetPhysicsScene("basicphysics", "ZeroMesher", new IniConfigSource(), "test");
// It's really not a good idea to use static variables as they carry over between tests, leading to
// problems that are extremely hard to debug. Really, these static fields need to be eliminated -
// tests using multiple regions that need to share modules need to find another solution.
m_assetService = null;
m_inventoryService = null;
m_gridService = null;

View File

@ -32,14 +32,12 @@
[AvatarService]
LocalServiceModule = "OpenSim.Services.AvatarService.dll:AvatarService"
ConnectionString = "URI=file:avatars.db,version=3"
[AuthorizationService]
LocalServiceModule = "OpenSim.Services.AuthorizationService.dll:AuthorizationService"
[AuthenticationService]
LocalServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
ConnectionString = "URI=file:auth.db,version=3"
[GridService]
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
@ -52,7 +50,6 @@
[UserAccountService]
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService"
ConnectionString = "URI=file:userprofiles.db,version=3"
;; These are for creating new accounts
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
@ -62,7 +59,6 @@
[FriendsService]
LocalServiceModule = "OpenSim.Services.FriendsService.dll"
ConnectionString = "URI=file:friends.db,version=3"
[Friends]
Connector = "OpenSim.Services.FriendsService.dll"

View File

@ -1,19 +1,24 @@
; This is the main configuration file for standalone OpenSim instances
[DatabaseService]
;
; ### Choose the DB
;
;--- For SQLite
StorageProvider = "OpenSim.Data.SQLite.dll"
;--- For MySql
; SQLite
; Uncomment this line if you want to use sqlite storage
Include-Storage = "config-include/storage/SQLiteStandalone.ini";
; For MySql.
; Uncomment these lines if you want to use mysql storage
; Change the connection string to your db details
;StorageProvider = "OpenSim.Data.MySQL.dll"
;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;"
[AssetService]
DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll"
AssetLoaderArgs = "assets/AssetSets.xml"
[Modules]
;; Choose 0 or 1 cache modules, and the corresponding config file, if it exists.
;; Copy the config .example file into your own .ini file and change configs there
@ -38,7 +43,7 @@
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
;;--- For MySql region storage (alternative)
;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;"
;; Next, we can specify properties of regions, including default and fallback regions
;; The syntax is: Region_<RegioName> = "<flags>"
;; where <flags> can be DefaultRegion, FallbackRegion, NoDirectLogin, Persistent, LockedOut

View File

@ -0,0 +1,16 @@
; These are the initialization settings for running OpenSim Standalone with an SQLite database
[DatabaseService]
StorageProvider = "OpenSim.Data.SQLite.dll"
[AvatarService]
ConnectionString = "URI=file:avatars.db,version=3"
[AuthenticationService]
ConnectionString = "URI=file:auth.db,version=3"
[UserAccountService]
ConnectionString = "URI=file:userprofiles.db,version=3"
[FriendsService]
ConnectionString = "URI=file:friends.db,version=3"