V2 Groups

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
(Add better instructions for setting up V2 groups on an HG/non-HG grid. Move migration section to bottom, not top!)
Line 1: Line 1:
As of OpenSimulator 0.7.6 Diva implemented the V2 Groups, which are now part of OpenSimulator core. Using the new groups do not need to use any third Party modules any more.
+
=Introduction=
 +
As of OpenSimulator 0.7.6, OpenSimulator has shipped with a core groups service. This can be used instead of the XmlRpcGroups/Flotsam third party service, though this will remain supported.
  
However, please be aware that this facility is new.  It may contain bugs or have as yet unknown issues with scaling to large grids.  This facility is currently not enabled by default.
+
Please be aware that this facility is new.  It may contain bugs or have as yet unknown issues with scaling to large grids.  This facility is currently not enabled by default.
  
The below script helps, converting existing Flotsam Groups or jOpenSim Groups (which uses Flotsam anyway) to the new Groups. This ensures, that you dont lose any Group information, when you want to switch over.
+
=Configuration=
 +
 
 +
==Standalone==
 +
 
 +
'''TODO'''.
 +
 
 +
==Grid==
 +
 
 +
To enable core groups for a grid, one needs to configure each simulators OpenSim.ini and enable the ROBUST services.
 +
 
 +
===Simulator===
 +
 
 +
In OpenSim.ini, the following settings are required in Hypergrid and non-Hypergrid modes.
 +
 
 +
<source lang="ini">
 +
[Groups]
 +
  Enabled = true
 +
  Module = "Groups Module V2"
 +
  GroupsServerURI = http://example.com:8003
 +
  MessagingModule = "Groups Messaging Module V2"
 +
</source>
 +
 
 +
For a non-Hypergrid installation, you will also want to specify the services connector as
 +
 
 +
<source lang="ini">
 +
[Groups]
 +
  ServicesConnectorModule = "Groups Remote Service Connector"
 +
</source>
 +
 
 +
On a Hypergrid installation, you will want to instead specify it as
 +
 
 +
<source lang="ini">
 +
[Groups]
 +
  ServicesConnectorModule = "Groups HG Service Connector"
 +
</source>
 +
 
 +
On a Hypergrid installation, you will need to make the following additional settings.
 +
 
 +
<source lang="ini">
 +
[Groups]
 +
  LocalService = remote
 +
  HomeURI = http://example.com:8002
 +
</source>
 +
 
 +
===Services===
 +
In Robust.ini, you need to enable the core groups service.
 +
 
 +
<source lang="ini">
 +
GroupsServiceConnector = "8003/OpenSim.Addon.Groups.dll:GroupsServiceRobustConnector"
 +
 
 +
=Migration=
 +
 
 +
The script below aims to help convert existing Flotsam Groups or jOpenSim Groups (which uses Flotsam anyway) database tables to the new core group tables.
  
 
== Differences between tables names ==
 
== Differences between tables names ==
Line 263: Line 316:
 
FROM `FLOTSAMDB`.jos_opensim_offlinemessages;
 
FROM `FLOTSAMDB`.jos_opensim_offlinemessages;
 
</source>
 
</source>
 
<br>
 
 
== Region configuration example for HG enabled robust grid ==
 
 
This example file is for useing V2 groups on your region thats connected to a grid with robust as grid server.<br>
 
This example is enabled for Hypergrid.<br>
 
The configuration options you can find in the opensim.ini file under the section [Groups]
 
 
'''This help section possible need improvements and corrections !!'''
 
 
<code>
 
    ;# {Enabled} {} {Enable groups?} {true false} false
 
    ;; Enables the groups module
 
    <br>'''Enabled = true'''
 
 
    ;# {LevelGroupCreate} {Enabled:true} {User level for creating groups} {} 0
 
    ;; Minimum user level required to create groups
 
    <br>'''LevelGroupCreate = 0'''
 
 
    ;# {Module} {Enabled:true} {Groups module to use? (Use GroupsModule to use Flotsam/Simian)} {Default "Groups Module V2"} Default
 
    ;; The default module can use a PHP XmlRpc server from the Flotsam project at
 
    ;; http://code.google.com/p/flotsam/
 
    ;; or from the SimianGrid project at http://code.google.com/p/openmetaverse
 
    ; Module = Default
 
    ;; or... use Groups Module V2, which works for standalones and robust grids
 
    <br>'''Module = "Groups Module V2"'''
 
 
    ;# {StorageProvider} {Module:Groups Module V2} {The DLL that provides the storage for V2} {OpenSim.Data.MySQL.dll}
 
    <br>'''StorageProvider = OpenSim.Data.MySQL.dll'''
 
 
    ;# {ServicesConnectorModule} {Module:GroupsModule Module:Groups Module V2} {Service connector to use for groups} {XmlRpcGroupsServicesConnector SimianGroupsServicesConnector "Groups Local Service Connector" "Groups Remote Service Connector" "Groups HG Service Connector"} XmlRpcGroupsServicesConnector
 
    ;; Service connectors to the Groups Service as used in the GroupsModule.  Select one as follows:
 
    ;; -- for Flotsam Groups use XmlRpcGroupsServicesConnector
 
    ;; -- for Simian Groups use SimianGroupsServicesConnector
 
    ;; -- for V2 Groups, standalone, non-HG use "Groups Local Service Connector"
 
    ;; -- for V2 Groups, grided sim, non-HG use "Groups Remote Service Connector"
 
    ;; -- for V2 Groups, HG, both standalone and grided sim, use "Groups HG Service Connector"
 
    ;; Note that the quotes "" around the words are important!
 
    ; ServicesConnectorModule = XmlRpcGroupsServicesConnector
 
    <br>'''ServicesConnectorModule = "Groups HG Service Connector"'''
 
 
    ;# {LocalService} {ServicesConnectorModule:Groups HG Service Connector} {Is the group service in this process or elsewhere?} {local remote} local
 
    ;; Used for V2 in HG only. If standalone, set this to local; if grided sim, set this to remote
 
    ; LocalService = local
 
    <br>'''LocalService = remote'''
 
 
    ;# {GroupsServerURI} {Module:GroupsModule (ServicesConnectorModule:Groups Remote Service Connector or (ServicesConnectorModule:Groups HG Service Connector and LocalService:remote))} {Groups Server URI} {}
 
    ;; URI for the groups services of this grid
 
    ;; e.g. http://yourxmlrpcserver.com/xmlrpc.php for Flotsam XmlRpc
 
    ;; or http://mygridserver.com:82/Grid/ for SimianGrid
 
    ;; or http:://mygridserver.com:8003 for robust, V2
 
    ;; Leave it commented for standalones, V2
 
    ; GroupsServerURI = ""
 
    <br>'''GroupsServerURI = "http://mygridserver.com:8003"'''
 
 
    ;# {HomeURI} {ServicesConnectorModule:Groups HG Service Connector} {What's the home address of this world?} {}
 
    ;; Used for V2 in HG only. For example
 
    ;; http://mygridserver.com:9000 or http://mygridserver.com:8002
 
    ;; If you have this set under [Startup], no need to set it here, leave it commented
 
    <br>'''HomeURI = "http://mygridserver.com:8002"'''
 
 
    ;# {MessagingEnabled} {Module:GroupsModule Module:Groups Module V2} {Is groups messaging enabled?} {true false} true
 
    <br>'''MessagingEnabled = true'''
 
 
    ;# {MessagingModule} {MessagingEnabled:true} {Module to use for groups messaging} {GroupsMessagingModule "Groups Messaging Module V2"} GroupsMessagingModule
 
    ; MessagingModule = GroupsMessagingModule
 
    ;; or use V2 for Groups V2
 
    <br>'''MessagingModule = "Groups Messaging Module V2"'''
 
 
    ;# {NoticesEnabled} {Module:GroupsModule Module:Groups Module V2} {Enable group notices?} {true false} true
 
    ;; Enable Group Notices
 
    <br>'''NoticesEnabled = true'''
 
 
    ;# {MessageOnlineUsersOnly} {Module:GroupsModule Module} {Message online users only?} {true false} false
 
    ; Experimental option to only message online users rather than all users
 
    ; Should make large groups with few online members messaging faster, as the expense of more calls to presence service
 
    ; Applies Flotsam Group only. V2 has this always on, no other option
 
    <br>'''MessageOnlineUsersOnly = True'''
 
</code>
 

Revision as of 11:45, 15 May 2014

Contents

Introduction

As of OpenSimulator 0.7.6, OpenSimulator has shipped with a core groups service. This can be used instead of the XmlRpcGroups/Flotsam third party service, though this will remain supported.

Please be aware that this facility is new. It may contain bugs or have as yet unknown issues with scaling to large grids. This facility is currently not enabled by default.

Configuration

Standalone

TODO.

Grid

To enable core groups for a grid, one needs to configure each simulators OpenSim.ini and enable the ROBUST services.

Simulator

In OpenSim.ini, the following settings are required in Hypergrid and non-Hypergrid modes.

[Groups]
  Enabled = true
  Module = "Groups Module V2"
  GroupsServerURI = http://example.com:8003
  MessagingModule = "Groups Messaging Module V2"

For a non-Hypergrid installation, you will also want to specify the services connector as

[Groups]
  ServicesConnectorModule = "Groups Remote Service Connector"

On a Hypergrid installation, you will want to instead specify it as

[Groups]
  ServicesConnectorModule = "Groups HG Service Connector"

On a Hypergrid installation, you will need to make the following additional settings.

[Groups]
  LocalService = remote
  HomeURI = http://example.com:8002

Services

In Robust.ini, you need to enable the core groups service.

GroupsServiceConnector = "8003/OpenSim.Addon.Groups.dll:GroupsServiceRobustConnector"
 
=Migration=
 
The script below aims to help convert existing Flotsam Groups or jOpenSim Groups (which uses Flotsam anyway) database tables to the new core group tables.
 
== Differences between tables names ==
{|class="wikitable"
! jOpenSim
! Flotsam
! V2
|-
|jos_opensim_groupactive
|osagent
 * AgentID
 * ActiveGroupID
|os_groups_principals
 * PrincipalID
 * ActiveGroupID
|-
|jos_opensim_group
|osgroup
 * GroupID
 * Name
 * Charter
 * InsigniaID
 * FounderID
 * MemberShipFee
 * OpenEnrollment
 * ShowInList
 * AllowPublish
 * MaturePublish
 * OwnerRoleID
|os_groups_groups
 * GroupID
 * Name
 * Charter
 * InsigniaID
 * FounderID
 * MembershipFee
 * OpenEnrollment
 * ShowInList
 * AllowPublish
 * MaturePublish
 * OwnerRoleID
|-
|jos_opensim_groupinvite
|osgroupinvite
 * InviteID
 * GroupID
 * RoleID
 * AgentID
 * TMStamp
|os_groups_invites
 * InviteID
 * GroupID
 * RoleID
 * PrincipalID
 * TMStamp
|-
|jos_opensim_groupmembership
|osgroupmembership
 * GroupID
 * AgentID
 * SelectedRoleID
 * Contribution
 * ListInProfile
 * AcceptNotices
|os_groups_membership
 * GroupID
 * PrincipalID
 * SelectedRoleID
 * Contribution
 * ListInProfile
 * AcceptNotices
|-
|jos_opensim_groupnotice
|osgroupnotice
 * GroupID
 * NoticeID
 * Timestamp
 * FromName
 * Subject
 * Message
|os_groups_notices
 * GroupID
 * NoticeID
 * TMStamp
 * FromName
 * Subject
 * Message
|-
|jos_opensim_grouprolemembership
|osgrouprolemembership
 * GroupID
 * RoleID
 * AgentID
|os_groups_rolemembership
 * GroupID
 * RoleID
 * PrincipalID
|-
|jos_opensim_grouprole
|osrole
 * GroupID
 * RoleID
 * Name
 * Description
 * Title
 * Powers
|os_groups_roles
 * GroupID
 * RoleID
 * Name
 * Description
 * Title
 * Powers
|}
 
== Notes ==
 
You do not need to consider the field '''BinaryBucket''' in the flotsam table '''osgroupnotice''' as long as you did not apply the patch attached to [http://opensimulator.org/mantis/view.php?id=6699 Mantis #6699]. If you have applied it, then maybe the following information will help, if you do not want to miss the content in the new tables:
 
Byte offset and description of bucket data:
 
* 0:  1 byte indicating if attachment is present
* 1:  1 byte indicating the type of attachment
* 2:  16 bytes - Group UUID
* 18: 16 bytes - UUID of the attachment owner
* 34: 16 bytes - UUID of the attachment
* 50: variable - Name of the attachment
* ??: NUL byte to terminate the attachment name
 
This information is copied from the original patch and describes the content format of field BinaryBucket.
 
== Flotsam ==
Use this script if your are using the Flotsam groups.
 
The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your Flotsam tables!):
<source lang=sql>
INSERT INTO `ROBUSTDB`.`os_groups_groups`
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,
AllowPublish, MaturePublish, OwnerRoleID)
SELECT GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,
MaturePublish, OwnerRoleID
FROM `FLOTSAMDB`.osgroup;
 
/*fill os_groups_invites in ROBUST database with values from osgroupinvite
or FlotSam osgroupinvite*/
INSERT INTO `ROBUSTDB`.`os_groups_invites`
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp
FROM `FLOTSAMDB`.osgroupinvite;
 
/*fill os_groups_membership in ROBUST database with values from osgroupmembership
or FlotSam osgroupmembership*/
INSERT INTO `ROBUSTDB`.`os_groups_membership`
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices
FROM `FLOTSAMDB`.osgroupmembership;
 
/*fill os_groups_notices in ROBUST database with values from osgroupnotice
or FlotSam osgroupnotice*/
INSERT INTO `ROBUSTDB`.`os_groups_notices`
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message
FROM `FLOTSAMDB`.osgroupnotice;
 
/*fill os_groups_principals in ROBUST database with values from osagent
or FlotSam osagent*/
INSERT INTO `ROBUSTDB`.`os_groups_principals`
(PrincipalID, ActiveGroupID)
SELECT AgentID, ActiveGroupID
FROM `FLOTSAMDB`.osagent;
 
/*fill os_groups_rolemembership in ROBUST database with values from osrolemembership
or FlotSam osgrouprolemembership*/
INSERT INTO `ROBUSTDB`.os_groups_rolemembership
(GroupID, RoleID, PrincipalID)
SELECT GroupID, RoleID, AgentID
FROM `FLOTSAMDB`.osgrouprolemembership;
 
/*fill os_groups_roles in ROBUST database with values from osroles
or FlotSam osrole*/
INSERT INTO `ROBUSTDB`.os_groups_roles
(GroupID, RoleID, Name, Description, Title, Powers)
SELECT GroupID, RoleID, Name, Description, Title, Powers
FROM `FLOTSAMDB`.osrole;

jOpenSim

Use this script if you are using the jOpenSim groups.

The Script (Replace ROBUSTDB with your ROBUST database and FLOTSAMDB with your database, containing your jOpenSim tables!):

/* SQL script to convert group tables from Flotsam Groups (Group database) or jOpenSim (tables in Joomla Database)
to new V2 groups, which are part of OpenSimulator core up from 0.7.6 branch*/
 
/* FlotSam Tables latest version from
https://github.com/mcortez/flotsam/tree/master/flotsam/Servers/XmlRpcGroupsServer/
Commit-No.: 18275462c9*/
 
/* jOpenSim Version: 0.2.6.4*/
 
/*fill os_groups_groups in ROBUST database with values from jos_opensim_groups
or FlotSam osgroup*/
INSERT INTO `ROBUSTDB`.`os_groups_groups`
(GroupID, Name, Charter, InsigniaID, FounderID, MembershipFee, OpenEnrollment, ShowInList,
AllowPublish, MaturePublish, OwnerRoleID)
SELECT GroupID, Name, Charter, InsigniaID, FounderID, MemberShipFee, OpenEnrollment, ShowInList, AllowPublish,
MaturePublish, OwnerRoleID
FROM `FLOTSAMDB`.jos_opensim_group;
 
/*fill os_groups_invites in ROBUST database with values from jos_opensim_groupinvite
or FlotSam osgroupinvite*/
INSERT INTO `ROBUSTDB`.`os_groups_invites`
(InviteID, GroupID, RoleID, PrincipalID, TMStamp)
SELECT InviteID, GroupID, RoleID, AgentID, TMStamp
FROM `FLOTSAMDB`.jos_opensim_groupinvite;
 
/*fill os_groups_membership in ROBUST database with values from jos_opensim_groupmembership
or FlotSam osgroupmembership*/
INSERT INTO `ROBUSTDB`.`os_groups_membership`
(GroupID, PrincipalID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices)
SELECT GroupID, AgentID, SelectedRoleID, Contribution, ListInProfile, AcceptNotices
FROM `FLOTSAMDB`.jos_opensim_groupmembership;
 
/*fill os_groups_notices in ROBUST database with values from jos_opensim_groupnotice
or FlotSam osgroupnotice*/
INSERT INTO `ROBUSTDB`.`os_groups_notices`
(GroupID, NoticeID, TMStamp, FromName, Subject, Message)
SELECT GroupID, NoticeID, Timestamp, FromName, Subject, Message
FROM `FLOTSAMDB`.jos_opensim_groupnotice;
 
/*fill os_groups_principals in ROBUST database with values from jos_opensim_groupactive
or FlotSam osagent*/
INSERT INTO `ROBUSTDB`.`os_groups_principals`
(PrincipalID, ActiveGroupID)
SELECT AgentID, ActiveGroupID
FROM `FLOTSAMDB`.jos_opensim_groupactive;
 
/*fill os_groups_rolemembership in ROBUST database with values from jos_opensim_grouprolemembership
or FlotSam osgrouprolemembership*/
INSERT INTO `ROBUSTDB`.os_groups_rolemembership
(GroupID, RoleID, PrincipalID)
SELECT GroupID, RoleID, AgentID
FROM `FLOTSAMDB`.jos_opensim_grouprolemembership;
 
/*fill os_groups_roles in ROBUST database with values from jos_opensim_grouproles
or FlotSam osrole*/
INSERT INTO `ROBUSTDB`.os_groups_roles
(GroupID, RoleID, Name, Description, Title, Powers)
SELECT GroupID, RoleID, Name, Description, Title, Powers
FROM `FLOTSAMDB`.jos_opensim_grouprole;
 
/*fill os_groups_roles in ROBUST database with values from jos_opensim_offlinemessages
--> no corresponding table in FlotSam  --  only applies to jOpenSim*/
INSERT INTO `ROBUSTDB`.im_offline
(PrincipalID, Message, TMStamp)
SELECT fromAgentID, Message, sent
FROM `FLOTSAMDB`.jos_opensim_offlinemessages;
Personal tools
General
About This Wiki