Initial checkin of OPenSimulator checkin files and Dockerfile for

building image
This commit is contained in:
Robert Adams
2019-08-30 09:11:12 -07:00
parent 2f8055f54b
commit 20d7c8267e
50 changed files with 2066 additions and 0 deletions
+98
View File
@@ -0,0 +1,98 @@
# OpenSim with Herbal3d region modules
# docker run --name=opensim -p 9000:9000 -p 9000:9000/udp -d opensim
FROM mono:5 as built
# FROM mono:4.6 as built
LABEL Version="0.1"
LABEL Description="Docker container running OpenSimulator with Herbal3d extensions"
ENV OPENSIMDIR=/home/opensim/opensim
RUN apt-get update \
&& apt-get install -y \
coreutils procps git vim \
screen \
ccrypt \
cron \
mysql-client \
sqlite \
&& rm -rf /var/lib/apt/lists/*
# Scripts that keep OpenSimulator running, make crash reports, clean up log files, etc
COPY scripts/* /home/opensim/
COPY vimrc /home/opensim/.vimrc
# Fetch the latest version of the OpenSimulator sources.
RUN cd /home/opensim \
&& git clone git://opensimulator.org/git/opensim \
&& cp $OPENSIMDIR/bin/OpenSim.ini.example $OPENSIMDIR/bin/OpenSim.ini
# Add the Herbal3d addon modules
RUN cd $OPENSIMDIR/addon-modules/ \
&& git clone https://github.com/Herbal3d/HerbalCommonEntitiesCS.git \
&& git clone https://github.com/Herbal3d/HerbalTransportCS.git \
&& git clone https://github.com/Herbal3d/Loden.git \
&& git clone https://github.com/Herbal3d/OSAuthModule.git \
&& git clone https://github.com/Herbal3d/RaguOS.git
# Copy the default INI files for Herbal3d services to where they will be read
RUN mkdir -p $OPENSIMDIR/bin/config \
&& cp $OPENSIMDIR/addon-modules/RaguOS/RaguOS.ini $OPENSIMDIR/bin/config \
&& cp $OPENSIMDIR/addon-modules/Loden/Loden.ini $OPENSIMDIR/bin/config
# OpenSim.ini does an include of "config-include/Standalone.ini".
# so copy an empty version to nullfy the default configuration.
COPY config-include/ $OPENSIMDIR/bin/config-include/
# Copy over any extra configuration files we're including
COPY config/ $OPENSIMDIR/bin/config/
# Build OpenSimulator
RUN cd $OPENSIMDIR \
&& ./runprebuild.sh \
&& nuget restore OpenSim.sln \
&& cp packages/*/lib/net45/* bin \
&& msbuild
# ============================================================================
# 'slim' doesn't run OpenSimulator so it can't be used
# FROM mono:5-slim
FROM mono:5
ENV OPENSIMDIR=/home/opensim/opensim
RUN apt-get update \
&& apt-get install -y \
coreutils procps git vim \
procps \
screen \
ccrypt \
cron \
mysql-client \
sqlite \
&& rm -rf /var/lib/apt/lists/*
# The simulator is run under the user name 'opensim'
# (From https://stackoverflow.com/questions/27701930/add-user-to-docker-container)
RUN adduser --disabled-password --gecos 'OpenSimulator user' opensim
COPY --from=built --chown=opensim:opensim /home/opensim/ /home/opensim
USER opensim:opensim
WORKDIR $OPENSIMDIR/bin
ENTRYPOINT [ "/home/opensim/bootOpenSim.sh" ]
# No ports are exposed by default since the simulator and regions can be anywhere.
# The simulator defaults to port 9000.
# EXPOSE 9000/tcp
# EXPOSE 9000/udp
# Directories that can be overridden with a mounted volume for configuration.
# The default configuration is for a simple standalone region.
# All the normal configuration has been nulled out (OpenSim.ini is the default
# and all the included files in bin/config-include are empty).
# A non-standalone configuration replaces bin/config with files that do
# the configuration of the whole system (include 'architecture' ini file and
# the necessary other INI files).
VOLUME $OPENSIMDIR/bin/config
+7
View File
@@ -0,0 +1,7 @@
all: docker-standalone
docker-standalone:
docker build -t opensim-herbal3d .
# vim: noet
+52
View File
@@ -0,0 +1,52 @@
This builds the latest 'master' version of OpenSimulator along with all the Herbal3D
addon-modules into a Docker container. The resulting Docker image has scripts
to run, log, and keep running the OpenSimulator instance. The image starts at
'/usr/opensim/bootOpenSim.sh' which checks for initial setup conditions and
then runs '/usr/opensim/run.opensim.sh' which starts OpenSimulator using 'screen'.
The OpenSimulator setup has a specialized configuration setup. This configuration
setup has:
-- the default OpenSimDefault.ini and OpenSim.ini in place
-- all of the usual config-include files nulled out (empty)
-- a 'bin/config/os-config' file that defines the environment variable 'CONFIG_NAME'
-- the default 'CONFIG_NAME' of 'docker-standalone'
-- a set of scripts in 'bin/config' that initialized and configure
'/usr/opensim/bootOpenSim.sh' calls '/usr/opensim/opensim/bin/config/setup.sh' to
configure this particular OpenSimulator instance. 'setup.sh' is called everytime
the Docker image is started. 'setup.sh' uses 'os-config' to define the environment
variable 'CONFIG_NAME' and then uses the information in the same named sub-directory
to setup the configuration files for OpenSimulator.
'bin/config/$CONFIG_NAME/Includes.ini' is copied into 'bin/config'. This will be read
by OpenSimulator on startup and replaces all of the usual configuration includes.
There will usually be a 'bin/config/$CONFIG_NAME/config-includes' that models the
usual OpenSimulator configuration directory.
This configuration design means that the complete OpenSimulator setup and
runtime configuration can be replaced by replacing the directory
'/usr/opensim/opensim/bin/config'. This allows mounting a configuration directory
for the Docker container to completely replace the setup and configuration.
Note that there are secrets needed to configure and run OpenSimulator.
These are stored in a 'ccrypt' encrypted file. Read the comments in
'/usr/opensim/opensim/bin/config/os-secrets' for how to encrypt secrets.
The container is initially run with the 'CONFIGKEY' environment variable
which is the key for decrypting the secrets file.
PROCESS:
Setup build environment:
cd opensim-herbal3d
docker build -t opensim-herbal3d .
Run the container:
CONFIGKEY=configKey EXTERNAL_HOSTNAME=externalHostname docker-compose up -d opensim
How to persistant SQLite database?
Adding custom configuration
How to add persistant database
MYSQL?
How to pass root password?
Create database early?
+8
View File
@@ -0,0 +1,8 @@
#! /bin/bash
# Build docker images for running a Herbal3d version of OpenSimulator
BASE=$(dirname $(realpath -e $(which $0)))
docker build \
-t opensim-herbal3d \
.
@@ -0,0 +1,3 @@
; This file exists because this file is the default architecture include
; in OpenSim.ini.
; Look for the real configuration in bin/config which overlays settings.
+14
View File
@@ -0,0 +1,14 @@
These configuration files are copied on top of the configuration
files in the OpenSimulator distribution.
These configuration files are empty (do nothing) and thus disable
most all configuration that is standardly included by the OpenSimulator
base configuration files.
Configuration is thus:
Read OpenSimDefault.ini
Read OpenSim.ini (an exact copy of OpenSim.ini.example)
This includes these empty files in config-include
Read config/Includes.ini
This includes the files for the actual configuration
@@ -0,0 +1,3 @@
; This file exists because this file is the default architecture include
; in OpenSim.ini.
; Look for the real configuration in bin/config which overlays settings.
@@ -0,0 +1,3 @@
; This file exists because this file is the default architecture include
; in OpenSim.ini.
; Look for the real configuration in bin/config which overlays settings.
@@ -0,0 +1,3 @@
; This file exists because this file is the default architecture include
; in OpenSim.ini.
; Look for the real configuration in bin/config which overlays settings.
+24
View File
@@ -0,0 +1,24 @@
CONFIGURATION ON DOCKER IMAGE
The OpenSim docker image is setup with most of the normal configuration nulled out.
The file 'bin/OpenSim.ini.example' has been copied to 'bin/OpenSim.ini' but all
the files that includes (from 'bin/config-include') have been emptied so none
of the normal network, grid, database, or cache setup is present.
The configuration relies on the feature that OpenSimulator reads any INI file
that is in the 'bin/config' directory.
The default installation is for a single region, standalone, sqlite based version
of OpenSimulator. 'bin/config/setup.sh' copies 'bin/config/docker-standalone/Includes.ini'
into 'bin/config'. This file includes all the INI files
needed to configure same. 'Includes.ini' includes files from the 'docker-standalone'
directory. This includes 'Standalone.ini' and 'StandaloneCommon.ini' to do their
normal configuration. It finally includes 'misc.ini' which specifies parameters
that overlay everything previous for final setting and over-riding.
If running the docker image with any non-standalone configuration, mount
a bind volume over '/home/opensim/opensim/bin/config' to replace all configuration.
When the docker image is run, the startup script also checks for 'bin/config/setup.sh'
and, if it exists, it is executed. This allows initializing databases and any
passwords that need to be set in the configuration files.
+17
View File
@@ -0,0 +1,17 @@
; This file is moved into the bin/config directory where it includes
; all the configuration from these directories.
[Startup]
; Region definitions are in this directory (rather than 'bin/Regions')
regionload_regionsdir = "config/docker-standalone/Regions"
[Architecture]
Include-osslEnable = "config/docker-standalone/config-include/osslEnable.ini"
Include-Architecture = "config/docker-standalone/config-include/Standalone.ini"
; 'Standalone.ini' is usually a copy of the default 'Standalone.ini.example' which
; would include the now empty 'bin/config-include/StandaloneCommon.ini'.
; The next line includes the 'StandaloneCommon.ini' from this configuration.
Include-Common = "config/docker-standalone/config-include/StandaloneCommon.ini"
Include-Flotsam = "config/docker-standalone/config-include/FlotsamCache.ini"
; Last include so it overlays anything before.
; Database is setup in this INI file as it has passwords, etc.
Include-MiscConfig = "config/docker-standalone/misc.ini"
@@ -0,0 +1,12 @@
[Standalone]
RegionUUID = 6c428e83-1a1d-4927-b4a4-2cd13a55720e
Location = "1000,1000"
InternalAddress = "0.0.0.0"
InternalPort = 9050
AllowAlternatePorts = False
ExternalHostName = "EXTERNAL_HOST_NAME"
NonphysicalPrimMax = 256
PhysicalPrimMax = 200
ClampPrimSize = False
MaxPrims = 60000
MaxAgents = 100
@@ -0,0 +1,97 @@
[AssetCache]
;;
;; Options for FlotsamAssetCache
;;
; cache directory can be shared by multiple instances
CacheDirectory = ./assetcache
; Other examples:
;CacheDirectory = /directory/writable/by/OpenSim/instance
; Log level
; 0 - (Error) Errors only
; 1 - (Info) Hit Rate Stats + Level 0
; 2 - (Debug) Cache Activity (Reads/Writes) + Level 1
;
LogLevel = 0
; How often should hit rates be displayed (given in AssetRequests)
; 0 to disable
HitRateDisplay = 100
; Set to false for no memory cache
; assets can be requested several times in short periods
; so even a small memory cache is useful
MemoryCacheEnabled = false
; If a memory cache hit happens, or the asset is still in memory
; due to other causes, update the timestamp on the disk file anyway.
; Don't turn this on unless you share your asset cache between simulators
; AND use an external process, e.g. cron job, to clean it up.
UpdateFileTimeOnCacheHit = false
; Enabling this will cache negative fetches. If an asset is negative-cached
; it will not be re-requested from the asset server again for a while.
; Generally, this is a good thing.
;
; Regular expiration settings (non-sliding) mean that the asset will be
; retried after the time has expired. Sliding expiration means that
; the time the negative cache will keep the asset is refreshed each
; time a fetch is attempted. Use sliding expiration if you have rogue
; scripts hammering the asset server with requests for nonexistent
; assets.
;
; There are two cases where negative caching may cause issues:
;
; 1 - If an invalid asset is repeatedly requested by a script and that asset is
; subsequently created, it will not be seen until fcache clear
; is used. This is a very theoretical scenario since UUID collisions
; are deemed to be not occuring in practice.
; This can only become an issue with sliding expiration time.
;
; 2 - If the asset service is clustered, an asset may not have propagated
; to all cluster members when it is first attempted to fetch it.
; This may theoretically occur with networked vendor systems and
; would lead to an asset not found message. However, after the
; expiration time has elapsed, the asset will then be fetchable.
;
; The defaults below are suitable for all small to medium installations
; including grids.
NegativeCacheEnabled = true
NegativeCacheTimeout = 120
NegativeCacheSliding = false
; Set to false for no file cache
FileCacheEnabled = true
; How long {in hours} to keep assets cached in memory, .5 == 30 minutes
; even a few minutes may mean many assets loaded to memory, if not all.
; this is good if memory is not a problem.
; if memory is a problem then a few seconds may actually save same.
; see hit rates with console comand: fcache status
MemoryCacheTimeout = .016 ; one minute
; How long {in hours} to keep assets cached on disk, .5 == 30 minutes
; Specify 0 if you do not want your disk cache to expire
FileCacheTimeout = 48
; How often {in hours} should the disk be checked for expired files
; Specify 0 to disable expiration checking
FileCleanupTimer = 0.0 ; disabled
; If WAIT_ON_INPROGRESS_REQUESTS has been defined then this specifies how
; long (in miliseconds) to block a request thread while trying to complete
; an existing write to disk.
; NOTE: THIS PARAMETER IS NOT CURRENTLY USED BY THE CACHE
; WaitOnInprogressTimeout = 3000
; Number of tiers to use for cache directories (current valid
; range 1 to 3)
;CacheDirectoryTiers = 1
; Number of letters per path tier, 1 will create 16 directories
; per tier, 2 - 256, 3 - 4096 and 4 - 65K
;CacheDirectoryTierLength = 3
; Warning level for cache directory size
;CacheWarnAt = 30000
@@ -0,0 +1,122 @@
;;
;; Please don't change this file.
;; All optional settings are in StandaloneCommon.ini.example,
;; which you can copy and change.
;;
[Modules]
AssetServices = "LocalAssetServicesConnector"
InventoryServices = "LocalInventoryServicesConnector"
NeighbourServices = "NeighbourServicesOutConnector"
AuthenticationServices = "LocalAuthenticationServicesConnector"
AuthorizationServices = "LocalAuthorizationServicesConnector"
GridServices = "LocalGridServicesConnector"
PresenceServices = "LocalPresenceServicesConnector"
UserProfilesServices = "LocalUserProfilesServicesConnector"
UserAccountServices = "LocalUserAccountServicesConnector"
AgentPreferencesServices= "LocalAgentPreferencesServicesConnector"
GridUserServices = "LocalGridUserServicesConnector"
SimulationServices = "LocalSimulationConnectorModule"
AvatarServices = "LocalAvatarServicesConnector"
EntityTransferModule = "BasicEntityTransferModule"
InventoryAccessModule = "BasicInventoryAccessModule"
MapImageService = "MapImageServiceModule"
SearchModule = "BasicSearchModule"
MuteListService = "LocalMuteListServicesConnector"
LibraryModule = true
LLLoginServiceInConnector = true
GridInfoServiceInConnector = true
MapImageServiceInConnector = true
[SimulationDataStore]
LocalServiceModule = "OpenSim.Services.SimulationService.dll:SimulationDataService"
[EstateDataStore]
LocalServiceModule = "OpenSim.Services.EstateService.dll:EstateDataService"
[AssetService]
LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService"
[InventoryService]
LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService"
[LibraryService]
LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService"
LibraryName = "OpenSim Library"
DefaultLibrary = "./inventory/Libraries.xml"
[AvatarService]
LocalServiceModule = "OpenSim.Services.AvatarService.dll:AvatarService"
[AuthenticationService]
LocalServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
[GridService]
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
Realm = "regions"
StorageProvider = "OpenSim.Data.Null.dll"
[PresenceService]
LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService"
StorageProvider = "OpenSim.Data.Null.dll"
[UserAccountService]
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService"
;; These are for creating new accounts
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService"
GridService = "OpenSim.Services.GridService.dll:GridService"
InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"
;; This switch creates the minimum set of body parts and avatar entries for a viewer 2 to show a default "Ruth" avatar rather than a cloud.
CreateDefaultAvatarEntries = true
[GridUserService]
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:GridUserService"
[FriendsService]
LocalServiceModule = "OpenSim.Services.FriendsService.dll"
[Friends]
Connector = "OpenSim.Services.FriendsService.dll"
[AgentPreferencesService]
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:AgentPreferencesService"
[LoginService]
LocalServiceModule = "OpenSim.Services.LLLoginService.dll:LLLoginService"
UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService"
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService"
AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"
FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService"
WelcomeMessage = "Welcome, Avatar!"
;# {DSTZone} {} {Override Daylight Saving Time rules} {* none local} "America/Los_Angeles;Pacific Standard Time"
;; Viewers do not receive timezone information from the server - almost all (?) default to Pacific Standard Time
;; However, they do rely on the server to tell them whether it's Daylight Saving Time or not.
;; Hence, calculating DST based on a different timezone can result in a misleading viewer display and inconsistencies between grids.
;; By default, this setting uses various timezone names to calculate DST with regards to the viewer's standard PST.
;; Options are
;; "none" no DST
;; "local" use the server's only timezone to calculate DST. This is previous OpenSimulator behaviour.
;; "America/Los_Angeles;Pacific Standard Time" use these timezone names to look up Daylight savings.
;; 'America/Los_Angeles' is used on Linux/Mac systems whilst 'Pacific Standard Time' is used on Windows
DSTZone = "America/Los_Angeles;Pacific Standard Time"
[MapImageService]
LocalServiceModule = "OpenSim.Services.MapImageService.dll:MapImageService"
[MuteListService]
LocalServiceModule = "OpenSim.Services.MuteListService.dll:MuteListService"
;; This should always be the very last thing on this file
[Includes]
Include-Common = "config-include/StandaloneCommon.ini"
@@ -0,0 +1,396 @@
; This is the main configuration file for an instance of OpenSim running in standalone mode
[DatabaseService]
;
; ### Choose the DB
;
; SQLite
Include-Storage = "config-include/storage/SQLiteStandalone.ini";
; 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=***;Old Guids=true;"
; Uncomment this line if you are using MySQL and want to use a different database for estates.
; The usual application for this is to allow estates to be spread out across multiple simulators by share the same database.
; Most people won't need to do this so only uncomment if you know what you're doing.
;EstateConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;Old Guids=true;"
; MSSQL
; Uncomment these lines if you want to use MSSQL storage
; Change the connection string to your db details
; The value for server property is shown in your SQL Server Management Studio login dialog.
; (This sample is the default of express edition)
;StorageProvider = "OpenSim.Data.MSSQL.dll"
;ConnectionString = "Server=localhost\SQLEXPRESS;Database=opensim;User Id=opensim; password=***;"
; PGSQL
; Uncomment these lines if you want to use PGSQL storage
; Change the connection string to your db details
;StorageProvider = "OpenSim.Data.PGSQL.dll"
;ConnectionString = "Server=localhost;Database=opensim;User Id=opensim; password=***;"
[Hypergrid]
; Uncomment the variables in this section only if you are in
; Hypergrid configuration. Otherwise, ignore.
;# {HomeURI} {Hypergrid} {The Home URL of this world} {}
;; If this is a standalone world, this is the address of this instance.
;; If this is a grided simulator, this is the address of the external robust server that
;; runs the UserAgentsService.
;; For example http://myworld.com:9000 or http://myworld.com:8002
;; This is a default that can be overwritten in some sections.
; HomeURI = "${Const|BaseURL}:${Const|PublicPort}"
;# {GatekeeperURI} {Hypergrid} {The URL of the gatekeeper of this world} {}
;; If this is a standalone world, this is the address of this instance.
;; If this is a grided simulator, this is the address of the external robust server
;; that runs the Gatekeeper service.
;; For example http://myworld.com:9000 or http://myworld.com:8002
;; This is a default that can be overwritten in some sections.
; GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}"
[Modules]
;; Choose one cache module and the corresponding config file, if it exists.
;; Copy the config .example file into your own .ini file and alter that
;; We recommend the use of the FlotsamAssetCache since this is most actively maintained.
AssetCaching = "FlotsamAssetCache"
Include-FlotsamCache = "config-include/FlotsamCache.ini"
;AssetCaching = "CenomeMemoryAssetCache"
;Include-CenomeCache = "config-include/CenomeCache.ini"
;; Authorization is not on by default, as it depends on external php
;AuthorizationServices = "LocalAuthorizationServicesConnector"
[AssetService]
DefaultAssetLoader = "OpenSim.Framework.AssetLoader.Filesystem.dll"
AssetLoaderArgs = "assets/AssetSets.xml"
[GridService]
;; For in-memory region storage (default)
StorageProvider = "OpenSim.Data.Null.dll:NullRegionData"
;;--- For MySql region storage (alternative)
;StorageProvider = "OpenSim.Data.MySQL.dll:MySqlRegionData"
;; Directory for map tile images of remote regions
; MapTileDirectory = "./maptiles"
;; Next, we can specify properties of regions, including default and fallback regions
;; The syntax is: Region_<RegionName> = "<flags>"
;; where <flags> can be DefaultRegion, FallbackRegion, NoDirectLogin, Persistent, LockedOut
;;
;; DefaultRegion If a local login cannot be placed in the required region (e.g. home region does not exist, avatar is not allowed entry, etc.)
;; then this region becomes the destination. Only the first online default region will be used. If no DefaultHGRegion
;; is specified then this will also be used as the region for hypergrid connections that require it (commonly because they have not specified
;; an explicit region.
;;
;; DefaultHGRegion If an avatar connecting via the hypergrid does not specify a region, then they are placed here. Only the first online
;; region will be used.
;;
;; FallbackRegion If the DefaultRegion is not available for a local login, then any FallbackRegions are tried instead. These are tried in the
;; order specified. This only applies to local logins at this time, not Hypergrid connections.
;;
;; NoDirectLogin A hypergrid user cannot directly connect to this region. This does not apply to local logins.
;;
;; Persistent When the simulator is shutdown, the region is signalled as offline but left registered on the grid.
;;
;; For example:
Region_Welcome_Area = "DefaultRegion, FallbackRegion"
;; Allow supporting viewers to export content
;; Set to false to prevent export
ExportSupported = true
; === HG ONLY ===
;; If you have this set under [Hypergrid], no need to set it here, leave it commented
; GatekeeperURI="${Const|BaseURL}:${Const|PublicPort}"
[LibraryModule]
; Set this if you want to change the name of the OpenSim Library
;LibraryName = "My World's Library"
[LoginService]
WelcomeMessage = "Welcome, Avatar!"
;; If you have Gatekeeper set under [Hypergrid], no need to set it here, leave it commented
; GatekeeperURI = "${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}"
;; For Viewer 2
MapTileURL = "${Const|BaseURL}:${Const|PublicPort}/"
; Url to search service
; SearchURL = "${Const|BaseURL}:${Const|PublicPort}";
; For V3 destination guide
; DestinationGuide = "${Const|BaseURL}/guide"
; The minimum user level required for a user to be able to login. 0 by default
; If you disable a particular user's account then you can set their login level below this number.
; You can also change this level from the console though these changes will not be persisted.
; MinLoginLevel = 0
;; Ask co-operative viewers to use a different currency name
;Currency = ""
;; Set minimum fee to publish classified
; ClassifiedFee = 0
; Basic Login Service Dos Protection Tweaks
; ;
; ; Some Grids/Users use a transparent proxy that makes use of the X-Forwarded-For HTTP Header, If you do, set this to true
; ; If you set this to true and you don't have a transparent proxy, it may allow attackers to put random things in the X-Forwarded-For header to
; ; get around this basic DOS protection.
; DOSAllowXForwardedForHeader = false
; ;
; ; The protector adds up requests during this rolling period of time, default 10 seconds
; DOSRequestTimeFrameMS = 10000
; ;
; ; The amount of requests in the above timeframe from the same endpoint that triggers protection
; DOSMaxRequestsInTimeFrame = 5
; ;
; ; The amount of time that a specific endpoint is blocked. Default 2 minutes.
; DOSForgiveClientAfterMS = 120000
; ;
; ; To turn off basic dos protection, set the DOSMaxRequestsInTimeFrame to 0.
[FreeswitchService]
;; If FreeSWITCH is not being used then you don't need to set any of these parameters
;;
;; The IP address of your FreeSWITCH server. The common case is for this to be the same as the server running the OpenSim standalone
;; This has to be set for the FreeSWITCH service to work
;; This address must be reachable by viewers.
;ServerAddress = 127.0.0.1
;; The following configuration parameters are optional
;; By default, this is the same as the ServerAddress
; Realm = 127.0.0.1
;; By default, this is the same as the ServerAddress on port 5060
; SIPProxy = 127.0.0.1:5060
;; Default is 5000ms
; DefaultTimeout = 5000
;; The dial plan context. Default is "default"
; Context = default
;; Currently unused
; UserName = freeswitch
;; Currently unused
; Password = password
;; The following parameters are for STUN = Simple Traversal of UDP through NATs
;; See http://wiki.freeswitch.org/wiki/NAT_Traversal
;; stun.freeswitch.org is not guaranteed to be running so use it in
;; production at your own risk
; EchoServer = 127.0.0.1
; EchoPort = 50505
; AttemptSTUN = false
[GridInfoService]
; These settings are used to return information on a get_grid_info call.
; Client launcher scripts and third-party clients make use of this to
; autoconfigure the client and to provide a nice user experience. If you
; want to facilitate that, you should configure the settings here according
; to your grid or standalone setup.
;
; See http://opensimulator.org/wiki/GridInfo
; login uri: for grid this is the login server URI
login = ${Const|BaseURL}:${Const|PublicPort}/
; long grid name: the long name of your grid
gridname = "the lost continent of hippo"
; short grid name: the short name of your grid
gridnick = "hippogrid"
; login page: optional: if it exists it will be used to tell the client to use
; this as splash page. May also be served from an external web server, e.g. for
; information on a standalone
;welcome = ${Const|BaseURL}/welcome
; helper uri: optional: if it exists it will be used to tell the client to use
; this for all economy related things
;economy = ${Const|BaseURL}/economy
; web page of grid: optional: page providing further information about your grid
;about = ${Const|BaseURL}/about
; account creation: optional: page providing further information about obtaining
; a user account on your grid
;register = ${Const|BaseURL}/register
; help: optional: page providing further assistance for users of your grid
;help = ${Const|BaseURL}/help
; password help: optional: page providing password assistance for users of your grid
;password = ${Const|BaseURL}/password
; HG address of the gatekeeper, if you have one
; this is the entry point for all the regions of the world
; gatekeeper = ${Const|BaseURL}:${Const|PublicPort}/
; HG user domain, if you have one
; this is the entry point for all user-related HG services
; uas = ${Const|BaseURL}:${Const|PublicPort}/
[MapImageService]
; Set this if you want to change the default
; TilesStoragePath = "maptiles"
[AuthorizationService]
; If you have regions with access restrictions
; specify them here using the convention
; Region_<Region_Name> = <flags>
; Valid flags are:
; DisallowForeigners -- HG visitors not allowed
; DisallowResidents -- only Admins and Managers allowed
; Example:
; Region_Test_1 = "DisallowForeigners"
;;
;; HG configurations
;;
[GatekeeperService]
;; If you have GatekeeperURI set under [Hypergrid], no need to set it here, leave it commented
; ExternalName = "${Const|BaseURL}:${Const|PublicPort}"
; Does this grid allow incoming links to any region in it?
; If false, HG TPs happen only to the Default regions specified in [GridService] section
AllowTeleportsToAnyRegion = true
;; Regular expressions for controlling which client versions are accepted/denied.
;; An empty string means nothing is checked.
;;
;; Example 1: allow only these 3 types of clients (any version of them)
;; AllowedClients = "Imprudence|Hippo|Second Life"
;;
;; Example 2: allow all clients except these
;; DeniedClients = "Twisted|Crawler|Cryolife|FuckLife|StreetLife|GreenLife|AntiLife|KORE-Phaze|Synlyfe|Purple Second Life|SecondLi |Emerald"
;;
;; Note that these are regular expressions, so every character counts.
;; Also note that this is very weak security and should not be trusted as a reliable means
;; for keeping bad clients out; modified clients can fake their identifiers.
;;
;;
;AllowedClients = ""
;DeniedClients = ""
;; Are foreign visitors allowed?
;ForeignAgentsAllowed = true
;;
;; If ForeignAgentsAllowed is true, make exceptions using AllowExcept.
;; Leave blank or commented for no exceptions.
; AllowExcept = "http://griefer.com:8002, http://enemy.com:8002"
;;
;; If ForeignAgentsAllowed is false, make exceptions using DisallowExcept
;; Leave blank or commented for no exceptions.
; DisallowExcept = "http://myfriendgrid.com:8002, http://myboss.com:8002"
[UserAgentService]
;; User level required to be contacted from other grids
;LevelOutsideContacts = 0
;; Restrictions on destinations of local users.
;; Are local users allowed to visit other grids?
;; What user level? Use variables of this forrm:
;; ForeignTripsAllowed_Level_<UserLevel> = true | false
;; (the default is true)
;; For example:
; ForeignTripsAllowed_Level_0 = false
; ForeignTripsAllowed_Level_200 = true ; true is default, no need to say it
;;
;; If ForeignTripsAllowed is false, make exceptions using DisallowExcept
;; Leave blank or commented for no exceptions.
; DisallowExcept_Level_0 = "http://myothergrid.com:8002, http://boss.com:8002"
;;
;; If ForeignTripsAllowed is true, make exceptions using AllowExcept.
;; Leave blank or commented for no exceptions.
; AllowExcept_Level_200 = "http://griefer.com:8002, http://enemy.com:8002"
;; This variable controls what is exposed to profiles of local users
;; as seen from outside of this grid. Leave it uncommented for exposing
;; UserTitle, UserFlags and the creation date. Uncomment and change to False
;; to block this info from being exposed.
; ShowUserDetailsInHGProfile = True
[HGInventoryService]
;; If you have this set under [Hypergrid], no need to set it here, leave it commented
; HomeURI = "${Const|BaseURL}:${Const|PublicPort}"
[HGAssetService]
;; If you have this set under [Hypergrid], no need to set it here, leave it commented
; HomeURI = "${Const|BaseURL}:${Const|PublicPort}"
;; The asset types that this grid can export to / import from other grids.
;; Comma separated.
;; Valid values are all the asset types in OpenMetaverse.AssetType, namely:
;; Unknown, Texture, Sound, CallingCard, Landmark, Clothing, Object, Notecard, LSLText,
;; LSLBytecode, TextureTGA, Bodypart, SoundWAV, ImageTGA, ImageJPEG, Animation, Gesture, Mesh
;;
;; Leave blank or commented if you don't want to apply any restrictions.
;; A more strict, but still reasonable, policy may be to disallow the exchange
;; of scripts, like so:
; DisallowExport ="LSLText"
; DisallowImport ="LSLBytecode"
[HGInventoryAccessModule]
;; If you have these set under [Hypergrid], no need to set it here, leave it commented
; HomeURI = "${Const|BaseURL}:${Const|PublicPort}"
; GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}"
;; If you want to protect your assets from being copied by foreign visitors
;; uncomment the next line. You may want to do this on sims that have licensed content.
;; true = allow exports, false = disallow exports. True by default.
; OutboundPermission = True
;; Send visual reminder to local users that their inventories are unavailable while they are traveling
;; and available when they return. True by default.
;RestrictInventoryAccessAbroad = True
[HGFriendsModule]
; User level required to be able to send friendship invitations to foreign users
;LevelHGFriends = 0;
[Messaging]
; === HG ONLY ===
;; If you have this set under [Hypergrid], no need to set it here, leave it commented
; GatekeeperURI = "${Const|BaseURL}:${Const|PublicPort}"
[EntityTransfer]
;; User level from which local users are allowed to HG teleport. Default 0 (all users)
;LevelHGTeleport = 0
;; Are local users restricted from taking their appearance abroad?
;; Default is no restrictions
;RestrictAppearanceAbroad = false
;; If appearance is restricted, which accounts' appearances are allowed to be exported?
;; Comma-separated list of account names
AccountForAppearance = "Test User, Astronaut Smith"
[UserProfilesService]
;; To use, set Enabled to true then configure for your site...
Enabled = false
LocalServiceModule = "OpenSim.Services.UserProfilesService.dll:UserProfilesService"
;; Configure this for separate databse
; ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;Old Guids=true;"
; Realm = UserProfiles
UserAccountService = OpenSim.Services.UserAccountService.dll:UserAccountService
AuthenticationServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
@@ -0,0 +1,199 @@
;;
;; Please don't change this file.
;; All optional settings are in StandaloneCommon.ini.example,
;; which you can copy and change.
;;
[Startup]
WorldMapModule = "HGWorldMap"
[Modules]
AssetServices = "HGAssetBroker"
InventoryServices = "HGInventoryBroker"
NeighbourServices = "NeighbourServicesOutConnector"
AuthenticationServices = "LocalAuthenticationServicesConnector"
AuthorizationServices = "LocalAuthorizationServicesConnector"
GridServices = "LocalGridServicesConnector"
PresenceServices = "LocalPresenceServicesConnector"
UserAccountServices = "LocalUserAccountServicesConnector"
AgentPreferencesServices= "LocalAgentPreferencesServicesConnector"
GridUserServices = "LocalGridUserServicesConnector"
SimulationServices = "RemoteSimulationConnectorModule"
AvatarServices = "LocalAvatarServicesConnector"
UserProfilesServices = "LocalUserProfilesServicesConnector"
MapImageService = "MapImageServiceModule"
EntityTransferModule = "HGEntityTransferModule"
InventoryAccessModule = "HGInventoryAccessModule"
FriendsModule = "HGFriendsModule"
UserManagementModule = "HGUserManagementModule"
SearchModule = "BasicSearchModule"
MuteListService = "LocalMuteListServicesConnector"
InventoryServiceInConnector = true
AssetServiceInConnector = true
HypergridServiceInConnector = true
NeighbourServiceInConnector = true
LibraryModule = true
LLLoginServiceInConnector = true
GridInfoServiceInConnector = true
AuthenticationServiceInConnector = true
SimulationServiceInConnector = true
MapImageServiceInConnector = true
[Messaging]
MessageTransferModule = HGMessageTransferModule
LureModule = HGLureModule
[SimulationDataStore]
LocalServiceModule = "OpenSim.Services.SimulationService.dll:SimulationDataService"
[EstateDataStore]
LocalServiceModule = "OpenSim.Services.EstateService.dll:EstateDataService"
[AssetService]
LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService"
; For HGAssetBroker
LocalGridAssetService = "OpenSim.Services.AssetService.dll:AssetService"
HypergridAssetService = "OpenSim.Services.Connectors.dll:HGAssetServiceConnector"
[InventoryService]
; For HGInventoryBroker
LocalGridInventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
[AvatarService]
LocalServiceModule = "OpenSim.Services.AvatarService.dll:AvatarService"
[LibraryService]
LocalServiceModule = "OpenSim.Services.InventoryService.dll:LibraryService"
LibraryName = "OpenSim Library"
DefaultLibrary = "./inventory/Libraries.xml"
[AuthenticationService]
LocalServiceModule = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
[GridService]
; LocalGridServicesConnector needs this
LocalServiceModule = "OpenSim.Services.GridService.dll:GridService"
Realm = "regions"
StorageProvider = "OpenSim.Data.Null.dll"
; Needed to display non-default map tile images for remote regions
AssetService = "OpenSim.Services.AssetService.dll:AssetService"
HypergridLinker = true
AllowHypergridMapSearch = true
[PresenceService]
LocalServiceModule = "OpenSim.Services.PresenceService.dll:PresenceService"
StorageProvider = "OpenSim.Data.Null.dll"
[UserAccountService]
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:UserAccountService"
;; These are for creating new accounts by the service
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService"
GridService = "OpenSim.Services.GridService.dll:GridService"
InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"
;; This switch creates the minimum set of body parts and avatar entries for a viewer 2 to show a default "Ruth" avatar rather than a cloud.
CreateDefaultAvatarEntries = true
[GridUserService]
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:GridUserService"
[FriendsService]
LocalServiceModule = "OpenSim.Services.FriendsService.dll"
[Friends]
Connector = "OpenSim.Services.FriendsService.dll"
[AgentPreferencesService]
LocalServiceModule = "OpenSim.Services.UserAccountService.dll:AgentPreferencesService"
[LoginService]
LocalServiceModule = "OpenSim.Services.LLLoginService.dll:LLLoginService"
UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService"
UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService"
AuthenticationService = "OpenSim.Services.AuthenticationService.dll:PasswordAuthenticationService"
InventoryService = "OpenSim.Services.InventoryService.dll:XInventoryService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService"
AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"
FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService"
; This inventory service will be used to initialize the user's inventory
HGInventoryServicePlugin = "OpenSim.Services.HypergridService.dll:HGSuitcaseInventoryService"
HGInventoryServiceConstructorArg = "HGInventoryService"
[MapImageService]
LocalServiceModule = "OpenSim.Services.MapImageService.dll:MapImageService"
[GatekeeperService]
LocalServiceModule = "OpenSim.Services.HypergridService.dll:GatekeeperService"
;; for the service
UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService"
UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
GridService = "OpenSim.Services.GridService.dll:GridService"
AuthenticationService = "OpenSim.Services.Connectors.dll:AuthenticationServicesConnector"
SimulationService ="OpenSim.Services.Connectors.dll:SimulationServiceConnector"
[UserAgentService]
LocalServiceModule = "OpenSim.Services.HypergridService.dll:UserAgentService"
;; for the service
GridUserService = "OpenSim.Services.UserAccountService.dll:GridUserService"
GridService = "OpenSim.Services.GridService.dll:GridService"
GatekeeperService = "OpenSim.Services.HypergridService.dll:GatekeeperService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService"
UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
;; This switch creates the minimum set of body parts and avatar entries for a viewer 2 to show a default "Ruth" avatar rather than a cloud.
CreateDefaultAvatarEntries = true
;; The interface that local users get when they are in other grids
;; This greatly restricts the inventory operations while in other grids
[HGInventoryService]
; For the InventoryServiceInConnector
LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGSuitcaseInventoryService"
;; alternatives:
;; HG1.5, more permissive, not recommended, but still supported
;LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGInventoryService"
;; HG1.0, totally permissive, not recommended, but OK for grids with 100% trust
;LocalServiceModule = "OpenSim.Services.InventoryService.dll:XInventoryService"
UserAccountsService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
AvatarService = "OpenSim.Services.AvatarService.dll:AvatarService"
;; The interface that local users get when they are in other grids
;; This restricts/filters the asset operations from the outside
[HGAssetService]
LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGAssetService"
UserAccountsService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
[HGFriendsService]
LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGFriendsService"
UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService"
FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService"
UserAccountService = "OpenSim.Services.UserAccountService.dll:UserAccountService"
GridService = "OpenSim.Services.GridService.dll:GridService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
[HGInstantMessageService]
LocalServiceModule = "OpenSim.Services.HypergridService.dll:HGInstantMessageService"
GridService = "OpenSim.Services.GridService.dll:GridService"
PresenceService = "OpenSim.Services.PresenceService.dll:PresenceService"
UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService"
InGatekeeper = True
[MuteListService]
LocalServiceModule = "OpenSim.Services.MuteListService.dll:MuteListService"
;; This should always be the very last thing on this file
[Includes]
Include-Common = "config-include/StandaloneCommon.ini"
@@ -0,0 +1,291 @@
; Enable OSSL functions.
; Including this file in a region's set of INI files, causes the OpenSimulator
; specific functions to be enabled.
; See http://opensimulator.org/wiki/OSSL for a description of OSSL functions and
; refer to http://opensimulator.org/wiki/OSSL_Implemented for a list of functions.
; The below file lists all the functions and specifies who has permission to
; execute the function. Some of the functions are for maintainance or can be
; mis-used so the permission to execute a function can be limited. Ability to
; execute a function is based on the owner of the prim holding the script.
[OSSL]
; Allow the use of os* functions (some are dangerous)
AllowOSFunctions = true
; Allow the user of mod* functions. This allows a script to pass messages
; to a region module via the modSendCommand() function and is used by some
; modules to extend the scripting language.
AllowMODFunctions = true
; Allow the use of LightShare functions.
; The setting enable_windlight = true must also be enabled in the [LightShare] section.
AllowLightShareFunctions = true
; Threat level to allow. One of None, VeryLow, Low, Moderate, High, VeryHigh, Severe.
; See http://opensimulator.org/wiki/Threat_level for more information on these levels.
; This is the default level and can be overridden with the Allow_ specifications.
; Blanket enabling the ossl functions is dangerous and we do not recommend setting higher
; than 'Low' unless you have a high level of trust in all the users that can run scripts
; in your simulator. It is safer to explicitly allow certain types of user to run
; higher threat level OSSL functions, as detailed later on.
OSFunctionThreatLevel = VeryLow
; Some of the OSSL functions can be enabled or disabled individually.
; To disable, set the value to 'false'.
; To enable for everyone, set the value to 'true'.
; To enable for individuals or groups, set it to a comma separated list. This checks
; against the owner of the object containing the script.
; The comma separated entries in the list may be one of:
; "GRID_GOD" -- enable for users with UserLevel >= 200
; "GOD" -- enable for users with rights to be god (local or grid)
; "ACTIVE_GOD" -- enable for users that are present and with active god power
; "ESTATE_MANAGER" -- enable for estate manager
; "ESTATE_OWNER" -- enable for estate owner
; "PARCEL_OWNER" -- enable for parcel owner
; "PARCEL_GROUP_MEMBER" -- enable for any member of the parcel group
; uuid -- enable for specified ID (may be avatar or group ID)
; from this we can also create macros that can be include in the list as
; ${OSSL|macroname} see examples below
; parcel macros
; Allowing ossl functions for anyone owning a parcel can be dangerous especially if
; a region is selling or otherwise giving away parcel ownership. By default, parcel
; ownership or group membership does not enable OSSL functions. Uncomment the
; appropriate line below to allow parcel ownership and groups to do restricted
; OSSL functions. It might be better to check the list below and edit the ones
; to enable individually.
osslParcelO = ""
osslParcelOG = ""
; osslParcelO = "PARCEL_OWNER,"
; osslParcelOG = "PARCEL_GROUP_MEMBER,PARCEL_OWNER,"
; NPC macros
; These can be mis-used so limit use to those you can trust.
osslNPC = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
; The OSSL function name is prepended with "Allow_" and it checks against
; the owners of the containing prim. There can also be entries beginning with
; 'Creators_". The 'Creators_" parameters can only be a list of UUIDs and it is
; checked against the creator of the script itself.
; *************************************************
; ThreatLevel None
Allow_osGetAgents = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetAvatarList = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetGender = true
Allow_osGetHealth = true
Allow_osGetHealRate = true
Allow_osGetNPCList = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetRezzingObject = true
Allow_osNpcGetOwner = ${OSSL|osslNPC}
Allow_osSetSunParam = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osTeleportOwner = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osWindActiveModelPluginName = true
; ThreatLevel Nuisance
Allow_osSetEstateSunSettings = ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetRegionSunSettings = ESTATE_MANAGER,ESTATE_OWNER
; ThreatLevel VeryLow
Allow_osEjectFromGroup = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osForceBreakAllLinks = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osForceBreakLink = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetWindParam = true
Allow_osInviteToGroup = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osReplaceString = true
Allow_osSetDynamicTextureData = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetDynamicTextureDataFace = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetDynamicTextureDataBlend = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetDynamicTextureDataBlendFace = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetDynamicTextureURL = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetDynamicTextureURLBlend = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetDynamicTextureURLBlendFace = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetParcelMediaURL = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetParcelSIPAddress = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetPrimFloatOnWater = true
Allow_osSetWindParam = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osTerrainFlush = ESTATE_MANAGER,ESTATE_OWNER
Allow_osUnixTimeToTimestamp = true
; ThreatLevel Low
Allow_osAvatarName2Key = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osFormatString = true
Allow_osKey2Name = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osListenRegex = true
Allow_osLoadedCreationDate = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osLoadedCreationID = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osLoadedCreationTime = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osMessageObject = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osRegexIsMatch = true
Allow_osGetAvatarHomeURI = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osNpcSetProfileAbout = ${OSSL|osslNPC}
Allow_osNpcSetProfileImage = ${OSSL|osslNPC}
Allow_osDie = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
; ThreatLevel Moderate
Allow_osDetectedCountry = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osDropAttachment = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osDropAttachmentAt = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetAgentCountry = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetGridCustom = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetGridGatekeeperURI = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetGridHomeURI = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetGridLoginURI = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetGridName = true
Allow_osGetGridNick = true
Allow_osGetNumberOfAttachments = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetRegionStats = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetSimulatorMemory = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetSimulatorMemoryKB = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osMessageAttachments = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetSpeed = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetOwnerSpeed = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
; ThreatLevel High
Allow_osCauseDamage = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osCauseHealing = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetHealth = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetHealRate = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osForceAttachToAvatar = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osForceAttachToAvatarFromInventory = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osForceCreateLink = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osForceDropAttachment = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osForceDropAttachmentAt = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetLinkPrimitiveParams = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetPhysicsEngineType = true
Allow_osGetRegionMapTexture = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetScriptEngineName = true
Allow_osGetSimulatorVersion = true
Allow_osMakeNotecard = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osMatchString = true
Allow_osNpcCreate = ${OSSL|osslNPC}
Allow_osNpcGetPos = ${OSSL|osslNPC}
Allow_osNpcGetRot = ${OSSL|osslNPC}
Allow_osNpcLoadAppearance = ${OSSL|osslNPC}
Allow_osNpcMoveTo = ${OSSL|osslNPC}
Allow_osNpcMoveToTarget = ${OSSL|osslNPC}
Allow_osNpcPlayAnimation = ${OSSL|osslNPC}
Allow_osNpcRemove = ${OSSL|osslNPC}
Allow_osNpcSaveAppearance = ${OSSL|osslNPC}
Allow_osNpcSay = ${OSSL|osslNPC}
Allow_osNpcSayTo = ${OSSL|osslNPC}
Allow_osNpcSetRot = ${OSSL|osslNPC}
Allow_osNpcShout = ${OSSL|osslNPC}
Allow_osNpcSit = ${OSSL|osslNPC}
Allow_osNpcStand = ${OSSL|osslNPC}
Allow_osNpcStopAnimation = ${OSSL|osslNPC}
Allow_osNpcStopMoveToTarget = ${OSSL|osslNPC}
Allow_osNpcTouch = ${OSSL|osslNPC}
Allow_osNpcWhisper = ${OSSL|osslNPC}
Allow_osOwnerSaveAppearance = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osParcelJoin = ESTATE_MANAGER,ESTATE_OWNER
Allow_osParcelSubdivide = ESTATE_MANAGER,ESTATE_OWNER
Allow_osRegionRestart = ESTATE_MANAGER,ESTATE_OWNER
Allow_osRegionNotice = ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetProjectionParams = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetRegionWaterHeight = ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetStateEvents = false ; deprecated
Allow_osSetTerrainHeight = ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetTerrainTexture = ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetTerrainTextureHeight = ESTATE_MANAGER,ESTATE_OWNER
; ThreatLevel VeryHigh
Allow_osAgentSaveAppearance = ESTATE_MANAGER,ESTATE_OWNER
; Warning: The next function allows scripts to force animations on avatars without the user giving permission.
; Enabling this can allow forced animations which can trigger traumatic episodes in vulnerable populations.
; Similar things can be said for several of the 'force' functions. Enable with care and control.
; Some of these were added as early functionality for NPCs. This has been replaced with the NPC functions.
Allow_osAvatarPlayAnimation = false
Allow_osAvatarStopAnimation = false
Allow_osForceAttachToOtherAvatarFromInventory = false
Allow_osForceDetachFromAvatar = false
Allow_osForceOtherSit = false
; The notecard functions can cause a lot of load on the region if over used
Allow_osGetNotecard = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetNotecardLine = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osGetNumberOfNotecardLines = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetRot = false
Allow_osSetParcelDetails = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
; ThreatLevel Severe
Allow_osConsoleCommand = false
Allow_osGrantScriptPermissions = false
Allow_osKickAvatar = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osRevokeScriptPermissions = false
Allow_osTeleportAgent = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osTeleportObject = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
; ThreatLevel Severe with additional internal restrictions
Allow_osGetAgentIP = true ; always restricted to Administrators (true or false to disable)
Allow_osSetContentType = false
; available functions out of Threat level control (for reference only)
; Allow_osAdjustSoundVolume = true
; Allow_osAngleBetween = true
; Allow_osApproxEquals = true
; Allow_osCheckODE = true
; Allow_osClearInertia = true
; Allow_osCollisionSound = true
; Allow_osDrawEllipse = true
; Allow_osDrawFilledEllipse = true
; Allow_osDrawFilledPolygon = true
; Allow_osDrawFilledRectangle = true
; Allow_osDrawImage = true
; Allow_osDrawLine = true
; Allow_osDrawPolygon = true
; Allow_osDrawRectangle = true
; Allow_osDrawResetTransform = true
; Allow_osDrawRotationTransform = true
; Allow_osDrawScaleTransform = true
; Allow_osDrawText = true
; Allow_osDrawTranslationTransform = true
; Allow_osGetCurrentSunHour = true
; Allow_osGetInertiaData = true
; Allow_osGetInventoryDesc = true
; Allow_osGetLinkNumber = true
; Allow_osGetMapTexture = true
; Allow_osGetPhysicsEngineName = true
; Allow_osGetPrimitiveParams = true
; Allow_osGetRegionSize = true
; Allow_osGetSunParam = true
; Allow_osGetTerrainHeight = true
; Allow_osGetDrawStringSize = true
; Allow_osIsNpc = true
; Allow_osIsUUID = true
; Allow_osLoopSound = true
; Allow_osLoopSoundMaster = true
; Allow_osLoopSoundSlave = true
; Allow_osMax = true
; Allow_osMin = true
; Allow_osMovePen = true
; Allow_osPlaySound = true
; Allow_osPlaySoundSlave = true
; Allow_osPreloadSound = true
; Allow_osRound = true
; Allow_osSetFontName = true
; Allow_osSetFontSize = true
; Allow_osSetInertia = true
; Allow_osSetInertiaAsBox = true
; Allow_osSetInertiaAsSphere = true
; Allow_osSetInertiaAsCylinder = true
; Allow_osSetPenCap = true
; Allow_osSetPenColor = true
; Allow_osSetPenSize = true
; Allow_osSetPrimitiveParams = true
; Allow_osSetSoundRadius = true
; Allow_osStopSound = true
; Allow_osStringSubString = true
; Allow_osStringStartsWith = true
; Allow_osStringEndsWith = true
; Allow_osStringIndexOf = true
; Allow_osStringLastIndexOf = true
; Allow_osStringRemove = true
; Allow_osStringReplace = true
; Allow_osTriggerSound = true
; Allow_osTriggerSoundLimited = true
; Allow_osVecDistSquare = true
; Allow_osVecMagSquare = true
; Allow_osVolumeDetect = true
@@ -0,0 +1,39 @@
; These are the initialization settings for running OpenSim Standalone with an SQLite database
[DatabaseService]
StorageProvider = "OpenSim.Data.SQLite.dll"
ConnectionString = "URI=file:OpenSim.db,version=3,UseUTF16Encoding=True"
[AssetService]
ConnectionString = "URI=file:Asset.db,version=3"
; The HGAssetService section controls the connection given to the AssetService in a Hypergrid configuration.
; This has to be separate from [AssetService] because the Hypergrid facing connector uses [HGAssetService] for its config data instead.
; However, the internal asset service will still use the [AssetService] section.
; Therefore, you will almost certainly want the ConnectionString in [HGAssetService] to be the same as in [AssetService]
; so that they both access the same database.
; This issue does not apply to normal MySQL/MSSQL configurations, since by default they use the settings in [DatabaseService] and
; do not have separate connection strings for different services.
[HGAssetService]
ConnectionString = "URI=file:Asset.db,version=3"
[InventoryService]
;ConnectionString = "URI=file:inventory.db,version=3"
; if you have a legacy inventory store use the connection string below
ConnectionString = "URI=file:inventory.db,version=3,UseUTF16Encoding=True"
[AvatarService]
ConnectionString = "URI=file:avatars.db,version=3"
[AuthenticationService]
ConnectionString = "URI=file:auth.db,version=3"
[UserAccountService]
ConnectionString = "URI=file:userprofiles.db,version=3"
[GridUserService]
ConnectionString = "URI=file:griduser.db,version=3"
[FriendsService]
ConnectionString = "URI=file:friends.db,version=3"
+55
View File
@@ -0,0 +1,55 @@
; Misc over-rides and settings
[Startup]
MaxPoolThreads = 45
PhysicalPrimMax = 256
physics = BulletSim
; physics = ubODE
; physics = OpenDynamicsEngine
; CombineContiguousRegions = true
; Turn off periodic statistics output to console
LogShowStatsSeconds = 0
[DatabaseService]
; SQLite
Include-Storage = "config/docker-standalone/config-include/storage/SQLiteStandalone.ini"
; 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=OPENSIM_DB_PASSWORD;Old Guids=true;"
[Estates]
DefaultEstateName = DEFAULT_ESTATE_NAME
DefaultEstateOwnerName = DEFAULT_ESTATE_OWNER
; ** Standalone Estate Settings **
; The following parameters will only be used on a standalone system to
; create an estate owner that does not already exist
DefaultEstateOwnerUUID = 00000000-0000-0000-0000-000000000000
DefaultEstateOwnerEMail = owner@example.com
DefaultEstateOwnerPassword = PW_FOR_DEFAULT_ESTATE_OWNER
[Terrain]
SendTerrainUpdatesByViewDistance = true
[BulletSim]
; BulletEngine = BulletXNA
; VehicleLoggingEnabled = True
; VehicleDebuggingEnable = true
; VehiclePhysicalLoggingEnabled = True
; UseSeparatePhysicsThread = true ; orig = false
; PhysicsLoggingEnabled = True
; PhysicsLoggingDoFlush = True
; PhysicsLoggingDir = "../logs"
; PhysicsPhysicalDumpEnabled = True
; PhysicsUnmanLoggingFrames = 100
[ExtendedPhysics]
Enabled = true
[XEngine]
ThreadStackSize = 500000
+3
View File
@@ -0,0 +1,3 @@
# File of configuration parameters that are applied when OpenSimulator is run.
export CONFIG_NAME=${CONFIG_NAME:-docker-standalone}
+29
View File
@@ -0,0 +1,29 @@
# File of secrets for the build and run images.
# This file is a template of the values to use.
# NEVER, NEVER EVER CHECK-IN the version with the real values!!
# The configuration files look for the file 'os-secrets.crypt' and, when
# found, runs 'ccrypt' using the password from the environment variable
# "CONFIGKEY". So, edit this file and do:
# ccrypt -e -E CONFIGKEY < os-secrets > os-secrets.crypt
# or (exposing the key in the bash history):
# ccrypt -e -K thekey < os-secrets > os-secrets.crypt
# If this next variable is defined, MYSQL is configured
# export MYSQL_ROOT_PASSWORD=ksdjfalkcxviowerw
export OPENSIM_USER=opensim
export OPENSIM_USER_PASSWORD=opensimopensim
export OPENSIM_DB_PASSWORD=opensimdbpassword
# The following are used to initialize estate if running standalone
export DEFAULT_ESTATE_NAME="Donalds Estate"
export DEFAULT_ESTATE_OWNER="Donald Duck"
export PW_FOR_DEFAULT_ESTATE_OWNER=asoiouzkxcjkvhuqwu
# Flag used to know if secrest are set
export HAVE_SECRETS=true
# Did I mention that one should NEVER, NEVER, EVER checkin a version
# with the real passwords in it?
+22
View File
@@ -0,0 +1,22 @@
#! /bin/bash
# Script that mangles OpenSim configuration files with the necessary data.
# Someone has set the environment variables before running this.
# Needs:
# OPENSIM_DB_PASSWORD
# DEFAULT_ESTATE_NAME
# DEFAULT_ESTATE_OWNER
# DEFAULT_ESTATE_OWNER_PASSWORD
OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin/}
CONFIG_NAME=${CONFIG_NAME:-docker-standalone}
CONFIGDIR=${OPENSIMBIN}/config/${CONFIG_NAME}
sed --in-place \
-e "s/OPENSIM_DB_PASSWORD/$OPENSIM_DB_PASSWORD/" \
-e "s/PW_FOR_DEFAULT_ESTATE_OWNER/$PW_FOR_DEFAULT_ESTATE_OWNER/" \
-e "s/DEFAULT_ESTATE_NAME/$DEFAULT_ESTATE_NAME/" \
-e "s/DEFAULT_ESTATE_OWNER/$DEFAULT_ESTATE_OWNER/" \
"${CONFIGDIR}/misc.ini"
+46
View File
@@ -0,0 +1,46 @@
#! /bin/bash
# Script to create database 'opensim' in mysql if it does not exist.
# Someone has set the environment variables before running this.
# Needs:
# MYSQL_ROOT_PASSWORD
# OPENSIM_DB_PASSWORD
OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin}
OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config}
cd "$OPENSIMCONFIG"
if [[ ! -z "$MYSQL_ROOT_PASSWORD" ]] ; then
SQLCMDS=${OPENSIMCONFIG}/mymy$$
SQLOPTIONS=${OPENSIMCONFIG}/mymyoptions$$
rm -f "$SQLCMDS"
rm -f "$SQLOPTIONS"
cat > "$SQLCMDS" <<EOFFFF
CREATE DATABASE opensim;
USE opensim;
CREATE USER 'opensim'@'%' IDENTIFIED BY '$OPENSIM_DB_PASSWORD';
GRANT ALL ON opensim.* to 'opensim'@'%';
quit
EOFFFF
cat > "$SQLOPTIONS" <<EOFFFF
[client]
user=root
password=$MYSQL_ROOT_PASSWORD
EOFFFF
HASDB=$(mysql --silent --defaults-extra=file=$SQLOPTIONS -e "show databases" | grep "^opensim$")
if [[ -z "$HASDB" ]] ; then
echo "creating opensim database"
mysql --silent --defaults-extra=file=$SQLOPTIONS < "$SQLCMDS"
else
echo "opensim database has already been created"
fi
rm -f "$SQLCMDS"
rm -f "$SQLOPTIONS"
else
echo "Not configuring MYSQL"
fi
+32
View File
@@ -0,0 +1,32 @@
#! /bin/bash
# Script that sets up the environment variables
OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin}
OPENSIMCONFIG="$OPENSIMBIN/config"
cd "$OPENSIMCONFIG"
if [[ -e "./os-config" ]] ; then
source ./os-config
fi
# See if we have encrypted secrets
unset HAVE_SECRETS
if [[ ! -z "$CONFIGKEY" ]] ; then
for secretsFile in $OPENSIMCONFIG/$CONFIG_NAME/os-secrets.crypt $OPENSIMCONFIG/os-secrets.crypt ; do
if [[ -e "$secretsFile" ]] ; then
source <(ccrypt -c -E CONFIGKEY "$secretsFile")
break;
fi
done
fi
# If no encrypted secrets, maybe unsecure plain-text secrets are available
if [[ -z "$HAVE_SECRETS" ]] ; then
for secretsFile in $OPENSIMCONFIG/$CONFIG_NAME/os-secrets $OPENSIMCONFIG/os-secrets ; do
if [[ -e "$secretsFile" ]] ; then
source "$secretsFile"
break;
fi
done
fi
+20
View File
@@ -0,0 +1,20 @@
#! /bin/bash
# Before running OpenSimulator, we update the configuration files
# for the current running environment.
# This is run before every OpenSimulator run to update changing parameters.
OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin}
CONFIGDIR=${CONFIGDIR:-$OPENSIMBIN/config}
cd "$CONFIGDIR"
source ./scripts/setEnvironment.sh
# Update EXTERNAL_HOSTNAME
cd "$OPENSIMBIN"
for file in $OPENSIMBIN/Regions/*.ini $CONFIGDIR/$CONFIG_NAME/Regions/*.ini ; do
if [[ -e "$file" ]] ; then
sed --in-place -e "s/^ExternalHostName = .*$/ExternalHostName = \"${EXTERNAL_HOSTNAME}\"/" "$file"
fi
done
sed --in-place -e "s/^ *BaseHostname = .*$/ BaseHostname = ${EXTERNAL_HOSTNAME}/" "$OPENSIMBIN/OpenSim.ini"
+32
View File
@@ -0,0 +1,32 @@
#! /bin/bash
# Script run when the container starts and before OpenSimulator is started
OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin}
CONFIGDIR=${CONFIGDIR:-$OPENSIMBIN/config}
FIRSTTIMEFLAG=${CONFIGDIR}/.configFirstTime
cd "$CONFIGDIR"
# This sets CONFIG_NAME which is the configuration subdirectory (like docker-standalone)
source ./scripts/setEnvironment.sh
if [[ ! -e "$FIRSTTIMEFLAG" ]] ; then
cd "$CONFIGDIR"
# Do any database account and db creation
./scripts/initializeDb.sh
# Add environment variables to configuration files
./scripts/initializeConfig.sh
# Remember we've done this
touch "$FIRSTTIMEFLAG"
fi
# Move the configuration include file into place
cd "$CONFIGDIR"
if [[ -e "${CONFIG_NAME}/Includes.ini" ]] ; then
cp "${CONFIG_NAME}/Includes.ini" .
fi
# Do any update to configuration files that happens each start
cd "$CONFIGDIR"
./scripts/updateConfigFiles.sh
+22
View File
@@ -0,0 +1,22 @@
version: '3'
services:
opensim:
image: opensim-herbal3d
environment:
CONFIGKEY: "${CONFIGKEY}"
EXTERNAL_HOSTNAME: "${EXTERNAL_HOSTNAME}"
ports:
- 8002:8002/tcp
- 8002:8002/udp
- 9000:9000/tcp
- 9000:9000/udp
- 9050:9050/tcp
- 9050:9050/udp
- 11440-11449:11440-11449
volumes:
# restart: always
View File
+39
View File
@@ -0,0 +1,39 @@
#! /bin/bash
# Run when booting the Docker file.
# Checks to see if this is the very first time in which case it
# runs the first time setup. Otherwise it just sets things running.
export OPENSIMHOME=/home/opensim
export OPENSIMBIN=$OPENSIMHOME/opensim/bin
export OPENSIMCONFIG=$OPENSIMBIN/config
FIRSTTIMEFLAG=$OPENSIMHOME/.firstTimeFlag
# Some setup environment variables should have been set
for requiredEnv in "CONFIGKEY" "EXTERNAL_HOSTNAME" ; do
if [[ -z "${!requiredEnv}" ]] ; then
echo "Environment variable $requiredEnv is not set"
exit 5
fi
done
# If this configuration has stuff to do...
if [[ -e "$OPENSIMCONFIG/setup.sh" ]] ; then
$OPENSIMCONFIG/setup.sh
fi
if [[ ! -e "$FIRSTTIMEFLAG" ]] ; then
# First time setup for the OpenSim running and crash checking scripts
cd "$OPENSIMHOME"
./firstTimeSetup.sh
touch "$FIRSTTIMEFLAG"
rm -f NOOPENSIM
fi
# Start Opensim
cd "$OPENSIMHOME"
./run.opensim.sh
while true ; do
sleep 300
./checkOpenSim.sh
done
+36
View File
@@ -0,0 +1,36 @@
#! /bin/bash
# Copy physics logs from usual physics log directory into
# a subdirectory of the log dir so they won't get deleted.
# Also saves the OpenSimulator log and screen files in subdir.
DATETAG=$1
OPENSIMHOME=${OPENSIMHOME:-/home/opensim}
if [[ -z "$DATETAG" ]] ; then
DATETAG=$(date +%Y%m%d.%H%M)
fi
OPENSIMBIN=${OPENSIMBIN:-$OPENSIMHOME/opensim/bin}
LOGDIR=$OPENSIMHOME/logs
SAVEDIR=$LOGDIR/$DATETAG
echo "Capturing crash from $OPENSIMBIN into $SAVEDIR"
mkdir -p $SAVEDIR
cd $LOGDIR
for logfile in phys*.log ; do
if [[ -e "$logfile" ]] ; then
mv "$logfile" "$SAVEDIR"
fi
done
if [[ -e "$OPENSIMBIN/screenlog.0" ]] ; then
mv $OPENSIMBIN/screenlog.0 $SAVEDIR
fi
if [[ -e "$OPENSIMBIN/OpenSim.log" ]] ; then
mv $OPENSIMBIN/OpenSim.log $SAVEDIR
fi
+22
View File
@@ -0,0 +1,22 @@
#! /bin/bash
# Clean out old log files in the log directory.
# Does not delete saved log directories.
OPENSIMHOME=${OPENSIMHOME:-/home/opensim}
TIMEAGO=${OPENSIMHOME}/.lastLogCleanup
LOGDIR="${OPENSIMHOME}/logs"
if [[ -d "$LOGDIR" ]] ; then
rm -f "$TIMEAGO"
touch --date="-1 hours" "$TIMEAGO"
cd "$LOGDIR"
for file in phys*.log scene-*.log ; do
if [[ -e "$file" ]] ; then
if [[ $TIMEAGO -nt "$file" ]] ; then
rm -f "$file"
fi
fi
done
fi
+34
View File
@@ -0,0 +1,34 @@
#! /bin/bash
# Check to see if OpenSim is running and restart if it is not
OPENSIMHOME=${OPENSIMHOME:-/home/opensim}
OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin}
CRASHLOG=${OPENSIMHOME}/crashlog.log
HDR="$(date +%Y%m%d%H%M):"
LASTCRASH=${OPENSIMHOME}/.lastCrash
TIMEAGO=${OPENSIMHOME}/.lastTimeAgo
cd
if [[ -e "${OPENSIMHOME}/NOOPENSIM" ]] ; then
exit 5
fi
flag=$(ps -efa | grep SCREEN | grep OpenSimScreen)
if [[ -z "$flag" ]] ; then
echo "$HDR Found crashed OpenSim regions"
rm -f $TIMEAGO
# If crashed last time, don't keep restarting over and over.
touch --date="-1 hours" $TIMEAGO
if [[ ! -e $LASTCRASH || $TIMEAGO -nt $LASTCRASH ]] ; then
echo "$HDR Capturing OpenSim crash"
${OPENSIMHOME}/captureCrash.sh
rm -f $LASTCRASH
touch $LASTCRASH
fi
echo "$HDR Restarting OpenSim regions"
${OPENSIMHOME}/run.opensim.sh
fi >> $CRASHLOG
+2
View File
@@ -0,0 +1,2 @@
*/30 * * * * /home/opensim/checkOldLogFiles.sh
+7
View File
@@ -0,0 +1,7 @@
#! /bin/bash
# Run the first time to setup the environment for OpenSimulator control
OPENSIMHOME=${OPENSIMHOME:-/home/opensim}
OPENSIMBIN=${OPENSIMBIN:-$OPENSIMHOME/opensim/bin}
# Setup the crontab entry for this account so OpenSim stays running
crontab "${OPENSIMHOME}/crontab"
+26
View File
@@ -0,0 +1,26 @@
#! /bin/bash
# Runs the simulators with screen
OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin}
cd "$OPENSIMBIN"
rm -f screenlog.0
rm -f *.log
export MONO_THREADS_PER_CPU=100
# parameters suggested by Ubit (20170526)
ulimit -s 262144
export MONO_GC_PARAMS="soft-heap-limit=1280m,minor=split,promotion-age=14"
export MONO_ENV_OPTIONS="--desktop"
screen -L -S OpenSimScreen -p - -d -m mono OpenSim.exe -console=basic
# screen -L -S OpenSimScreen -p - -d -m mono --profile=log:sample=cycles/100 OpenSim.exe -console=basic
# screen -L -S OpenSimScreen -p - -d -m mono --profile=log:sample=instr/100 OpenSim.exe -console=basic
# screen -L -S OpenSimScreen -p - -d -m mono --profile=log:noalloc,calls,maxframes=4 OpenSim.exe -console=basic
# To analyze:
# mprof-report --traces output.mlpd > /tmp/frog2
# mprof-report --reports=sample output.mlpd
# mprof-report --reports=sample --verbose output.mlpd
# mprof-report --reports=call --verbose output.mlpd
View File
+8
View File
@@ -0,0 +1,8 @@
set tabstop=4
set shiftwidth=4
set expandtab
set autoindent
set ff=unix
set background=dark
syntax enable
+8
View File
@@ -0,0 +1,8 @@
# A version of MYSQL setup for OpenSimulator.
# In particular, the initial database 'opensim' is created.
FROM mysql:latest
LABEL Version="0.1"
LABEL Description="MYSQL setup for OpenSimulator"
+38
View File
@@ -0,0 +1,38 @@
# NOTE: NOT WORKING YET. DON'T USE!!
# TODO: update to version 3. Add build instructions. Add secrets.
version: '2'
services:
mysql:
image: mysql:latest
container_name: opensim-herbal3d-mysql
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
volumes:
- /var/lib/mysql
restart: always
networks:
- opensim-herbal3d-mysql-net
opensim:
depends_on:
- mysql
image: opensim-herbal3d
container_name: opensim-herbal3d
environment:
MYSQL_ROOT_PASSWORD: "${MYSQL_ROOT_PASSWORD}"
OPENSIM_DB_PASSWORD: "${OPENSIM_DB_PASSWORD}"
ports:
- 9000/tcp
- 9000/udp
links:
- mysql:mysql
restart: always
networks:
- opensim-herbal3d-mysql-net
networks:
mysql-net:
name: opensim-herbal3d-mysql-net
driver: bridge
+72
View File
@@ -0,0 +1,72 @@
# Dockerfile for building a region server for OpenSimulator.
#
# This
FROM ubuntu
LABEL Version="0.9"
LABEL Description="Docker container for OpenSimulator region"
# install tools and Mono environment
# Kludge for TZ taken from https://github.com/QuantumObject/docker-opensimulator/blob/master/Dockerfile
ENV TZ America/Los_Angeles
RUN echo $TZ > /etc/timezone \
&& apt-get update \
&& apt-get install -y \
tzdata \
git \
mono-complete \
mono-reference-assemblies-4.0 \
&& rm /etc/localtime \
&& ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \
&& dpkg-reconfigure -f noninteractive tzdata \
&& apt-get clean \
&& rm -rf /tmp/* var/tmp/* \
&& rm -rf /var/lib/apt/lists/*
# The simulator is run under the user name 'opensim'
# (from https://stackoverflow.com/questions/36490627/how-to-create-and-run-docker-container-with-new-user-other-than-root)
# RUN export ACCT=opensim UID=1000 GID=1000 \
# && mkdir -p /home/$ACCT \
# && echo "$ACCT:x:${UID}:${GID}:Abc,,,:/home/$ACCT:/bin/bash" >> /etc/passwd \
# && echo "$ACCT:x:${GID}:" >> /etc/group \
# && echo "$ACCT ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/$ACCT \
# && chmod 0440 /etc/sudoers.d/$ACCT \
# && chown ${UID}:${GID} -R /home/$ACCT
# (From https://stackoverflow.com/questions/27701930/add-user-to-docker-container)
RUN adduser --disabled-password --gecos 'OpenSimulator user' opensim \
&& echo "opensim:${OPENSIM_PASSWORD}" | chpasswd
WORKDIR /home/opensim
USER opensim:opensim
COPY NOOPENSIM /home/opensim
COPY checkOpenSim.sh /home/opensim
COPY captureCrash.sh /home/opensim
COPY checkOldLogFiles.sh /home/opensim
COPY run.opensim.sh /home/opensim
COPY firstTimeSetup.sh /home/opensim
COPY crontab /home/opensim
# Fetch and build the latest version of the sources
RUN git clone git://opensimulator.org/git/opensim /home/opensim/opensim \
&& ./runprebuild.sh \
&& xbuild
CMD /home/opensim/checkOpenSim.sh
# The simulator defaults to port 9000
# All ports are usually over-ridden by the 'docker run' command parameters.
EXPOSE 9000/tcp
EXPOSE 9000/udp
# The configuration of the region can be supplied via the 'config' subdirectory
VOLUME /home/opensim/opensim/bin/config
# HOW TO FIX?
# The OpenSim.ini file doesn't exist (it's OpenSim.ini.example). Is that a problem?
# When starting new regions, it will as for the estate info from the console.
# What about the configuration of MySQL?
# What about the configuration of asset cache?
View File
+27
View File
@@ -0,0 +1,27 @@
#! /bin/bash
# Copy physics logs from usual physics log directory into
# a subdirectory of the log dir so they won't get deleted.
# Also saves the OpenSimulator log and screen files in subdir.
DATETAG=$1
BASE=/home/opensim
if [[ -z "$DATETAG" ]] ; then
DATETAG=$(date +%Y%m%d.%H%M)
fi
RUNDIR=$BASE/opensim/bin
LOGDIR=$BASE/logs
SAVEDIR=$LOGDIR/$DATETAG
echo "Capturing crash from $RUNDIR into $SAVEDIR"
mkdir -p $SAVEDIR
cd $LOGDIR
mv phys*.log $SAVEDIR
mv $RUNDIR/screenlog.0 $SAVEDIR
mv $RUNDIR/OpenSim.log $SAVEDIR
+18
View File
@@ -0,0 +1,18 @@
#! /bin/bash
# Clean out old log files in the log directory.
# Does not delete saved log directories.
BASE=/home/opensim
TIMEAGO=${BASE}/.lastLogCleanup
cd "${BASE}/logs"
rm -f "$TIMEAGO"
touch --date="-1 hours" "$TIMEAGO"
for file in $(ls phys*.log scene-*.log ) ; do
if [[ $TIMEAGO -nt "$file" ]] ; then
rm -f "$file"
fi
done
+32
View File
@@ -0,0 +1,32 @@
#! /bin/bash
# Check to see if OpenSim is running and restart if it is not
BASE=/home/opensim
CRASHLOG=${BASE}/crashlog.log
HDR="$(date +%Y%m%d%H%M):"
LASTCRASH=${BASE}/.lastCrash
TIMEAGO=${BASE}/.lastTimeAgo
cd
if [[ -e "${BASE}/NOOPENSIM" ]] ; then
exit 5
fi
flag=$(ps -efa | grep SCREEN | grep OpenSimScreen)
if [[ -z "$flag" ]] ; then
echo "$HDR Found crashed OpenSim regions"
rm -f $TIMEAGO
touch --date="-1 hours" $TIMEAGO
if [[ ! -e $LASTCRASH || $TIMEAGO -nt $LASTCRASH ]] ; then
echo "$HDR Capturing OpenSim crash"
${BASE}/captureCrash.sh
rm -f $LASTCRASH
touch $LASTCRASH
fi
echo "$HDR Restarting OpenSim regions"
${BASE}/run.opensim.sh
fi >> $CRASHLOG
+3
View File
@@ -0,0 +1,3 @@
*/2 * * * * /home/opensim/checkOpenSim.sh
*/30 * * * * /home/opensim/checkOldLogFiles.sh
+10
View File
@@ -0,0 +1,10 @@
#! /bin/bash
mysql -u root --password=${MYSQL_ROOT_PASSWORD} <<<EOFFFF
CREATE DATABASE opensim;
USE opensim;
CREATE USER 'opensim'@'%' IDENTIFIED BY 'opensimit';
GRANT ALL ON opensim.* to 'opensim'@'%';
quit
EOFFFF
+10
View File
@@ -0,0 +1,10 @@
#! /bin/bash
# Run the first time to setup the environment for OpenSimulator
BASE=/home/opensim
# Run OpenSimulator interactively for setting up estate information
# Setup the crontab entry for this account so OpenSim stays running
# Delete the no run flag
# rm -f ${BASE}/NOOPENSIM
+25
View File
@@ -0,0 +1,25 @@
#! /bin/bash
# Runs the simulators with screen
cd /home/opensim
cd opensim/bin
rm -f screenlog.0
rm -f *.log
export MONO_THREADS_PER_CPU=100
# parameters suggested by Ubit (20170526)
ulimit -s 262144
export MONO_GC_PARAMS="soft-heap-limit=1280m,minor=split,promotion-age=14"
export MONO_ENV_OPTIONS="--desktop"
screen -L -S OpenSimScreen -p - -d -m mono OpenSim.exe -console=basic
# screen -L -S OpenSimScreen -p - -d -m mono --profile=log:sample=cycles/100 OpenSim.exe -console=basic
# screen -L -S OpenSimScreen -p - -d -m mono --profile=log:sample=instr/100 OpenSim.exe -console=basic
# screen -L -S OpenSimScreen -p - -d -m mono --profile=log:noalloc,calls,maxframes=4 OpenSim.exe -console=basic
# To analyze:
# mprof-report --traces output.mlpd > /tmp/frog2
# mprof-report --reports=sample output.mlpd
# mprof-report --reports=sample --verbose output.mlpd
# mprof-report --reports=call --verbose output.mlpd
View File