[Opensim-dev] New configuration capabilities
Robert Martin
robertltux at gmail.com
Sat Oct 11 00:41:30 UTC 2014
somebody really should have a set of config files with this setup
(maybe with localhost/default values?).
It would be great to be able to tell my Music Pastor that "Journey to
Bethlehem" Sim version just needs a single set of switches to be fixed
to go LIVE ON THE NET YEAR ROUND
On Fri, Oct 10, 2014 at 8:33 PM, Melanie <melanie at t-data.com> wrote:
> That is a really nice and useful feature that should definitely make
> it into the default config files. It doesn't keep people who have
> scripted systems for configuration management from continuing to use
> them because this notation is not mandatory, it's just one more option.
>
> Melanie
>
> On 11/10/2014 02:36, James Hughes wrote:
>> Hi everyone,
>>
>> Commit c7a11899f6c5 contains a new feature to allow the creation and use
>> of constants in the ini files. I did not want to switch over the
>> examples without some discussion first because some my have automated
>> systems to configure their installations. This works for both OpenSim
>> and Robust.
>>
>> For an example, think about Robust configuration. Most of us probably
>> have a url to the server that runs our services, and we probably have an
>> internal (protected) port for some of the services and an external
>> (public) port for others. Before now, to set that up, we had to enter
>> the same information over and over throughout our files to define the
>> url and port for each service. Let's look at how we can accomplish that
>> now ...
>>
>> First we need to define a section to hold our constants, we will use
>> [Const]. Then we need to define our values there for the rest of the
>> configuration to use.
>>
>> [Const]
>> BaseURL = http://example.com
>> PublicPort = 8002
>> PrivatePort = 8003
>>
>> Then, we use the syntax: ${Const|KeyName} to replace every instance of
>> the value we wish to replace. Here are a few entries from the
>> Robust.HG.ini to see how it works.
>>
>> [ServiceList]
>>
>> AssetServiceConnector =
>> "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AssetServiceConnector"
>> GridInfoServerInConnector =
>> "${Const|
>> PublicPort}/OpenSim.Server.Handlers.dll:GridInfoServerInConnector"
>>
>>
>> [LoginService]
>>
>> MapTileURL = ${Const|BaseURL}:${Const|PublicPort}/
>>
>> SRV_HomeURI = "${Const|BaseURL}:${Const|PublicPort}"
>> SRV_InventoryServerURI = "${Const|BaseURL}:${Const|PublicPort}"
>> SRV_AssetServerURI = "${Const|BaseURL}:${Const|PublicPort}"
>> SRV_ProfileServerURI = "${Const|BaseURL}:${Const|PublicPort}"
>> SRV_FriendsServerURI = "${Const|BaseURL}:${Const|PublicPort}"
>> SRV_IMServerURI = "${Const|BaseURL}:${Const|PublicPort}"
>> SRV_GroupsServerURI = "${Const|BaseURL}:${Const|PrivatePort}"
>>
>>
>> When these are setup in the configuration file, then all that is needed
>> is to set the values of the keys in the [Const] section.
>>
>> Thanks!
>> BlueWall
>>
>> _______________________________________________
>> Opensim-dev mailing list
>> Opensim-dev at opensimulator.org
>> http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev
>>
>>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at opensimulator.org
> http://opensimulator.org/cgi-bin/mailman/listinfo/opensim-dev
--
Robert L Martin
More information about the Opensim-dev
mailing list