Rework and simplify configuration.

Add NCG build (image-ncg)
This commit is contained in:
Robert Adams
2024-08-07 01:06:30 +00:00
parent 62fda19d00
commit 662aaec706
36 changed files with 1988 additions and 68 deletions
+20 -14
View File
@@ -11,13 +11,19 @@ that is available at
[OSCC19 Dockerizing OpenSimulator](https://www.youtube.com/watch?v=-EnTepHqLA4) .
This is organized into building *images* and having *config*s for those images.
The model is for one to build a Docker image with one of the [OpenSimulator]
images in it and, at runtime, choose one of the embedded configurations to
images in it and, at runtime, choose one of the configurations to
run it with. The [OpenSimulator] "image" is a built version of the source
code and the "config" is the collection of INI files that are used to run it.
Two images are currently present: `image-opensim` which is a built of the
straight [OpenSimulator] 'master' branch,
The images have no configuration in them. In the image, most of the .ini files
have been nulled out. Configuration is completely specified by mounting
a configuration directory when the [Docker] image is run.
Three images are currently present:
`image-ncg` which is a built of the [NCG] 'develop' branch,
`image-opensim` which is a built of the straight [OpenSimulator] 'master' branch,
and `image-opensim-herbal3d` which is [OpenSimulator] built with
the [Herbal3d] addon modules.
(Since I'm the Herbal3d main developer, this is how I test it.)
@@ -111,21 +117,20 @@ with the base [OpenSimulator] sources and to replace them with copies in
a separate directory. In general,
- `OpenSimDefaults.ini` is used unchanged from the sources
- `OpenSim.ini.example` is copied to `OpenSim.ini` with no changes
- `OpenSim.ini.example` is not used and is ignored
- the files in `config-include` are emptied so they don't do anything when included by any script
- configuration uses the feature that [OpenSimulator] reads all the INI files in `bin/config`
- configuration uses the feature that [OpenSimulator] reads all the INI files from
a specified directory (default is ./bin/config). This directory is mounted
to a directory external to the [Docker] container and based on the `CONFIG_NAME`.
The latter feature is used by `config/setup.sh` which copies a `$CONFIG_NAME/Include.ini`
into `bin/config` and that is what includes all the necessary configuration files in
the `$CONFIG_NAME` directory.
In the mounted configuration directory, the file `setup.sh` is run before [OpenSimulator]
is started to do any setup.
`docker-compose` mounts the container's `bin/config` directory as the `config/`
directory so all of the configuration of the
The latter feature means that one could either use the configuration samples included
with these sources or one could mount a volume on top of `/home/opensim/opensim/bin/config`
and completely replace all the configuration files. This enables the flexibility
of either building configuration within the [Docker] image or supplying one's
own configuration at runtime.
directory so all configuration is loaded from the external directory.
This means that a complete configuration must be created outside the Docker
container.
Many examples are given.
## Running the Docker Image
@@ -175,4 +180,5 @@ will connect you to the OpenSimulator console. *TO EXIT SCREEN* the command is `
[Docker]: https://www.docker.com
[Herbal3d]: https://www.herbal3d.org
[MariaDB]: https://mariadb.org/
[NCG]: https://github.com/OpenSim-NGC/OpenSim-Sasquatch
+1 -1
View File
@@ -1 +1 @@
4.0.1
4.0.2
+137
View File
@@ -0,0 +1,137 @@
# syntax=docker/dockerfile:1
# OpenSim for a container
# docker build -t ncg .
# Built with dotnet8
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
LABEL Description="Docker container running NCG"
# In the target image, these are directories built and used
# While parameters, these usually don't change
ARG OPENSIMHOME=/home/opensim
ARG OPENSIMDIR=/home/opensim/opensim
ARG OPENSIMCONFIG=/home/opensim/opensim/bin/config
ARG VERSIONDIR=/home/opensim/VERSION
ARG OS_ACCOUNT=opensim
# Arguments for fetching the proper version of OpenSimulator
ARG OS_REPO=https://github.com/OpenSim-NGC/OpenSim-Sasquatch.git
ARG OS_BRANCH=develop
ARG OS_BUILDTARGET=Release
ARG OS_SLN=OpenSim.sln
# Arguments about the build environment passed in so they can be embedded in the container
ARG BUILD_DATE=20240101.0000
ARG BUILD_DAY=20240101
ARG OS_DOCKER_VERSION=1.0.0
ARG OS_DOCKER_GIT_BRANCH=main
ARG OS_DOCKER_GIT_COMMIT=62fda19d0038a274bf3fd922b023b149b3a40a90
ARG OS_DOCKER_GIT_COMMIT_SHORT=62fda19d
# Include required packages ('coreutils git vim' included for debugging)
RUN apt-get update \
&& apt-get install -y \
coreutils procps git vim \
screen \
ccrypt \
libgdiplus \
libc6-dev \
mariadb-client
# The simulator is run under the user name 'opensim'
RUN adduser --disabled-password --gecos 'OpenSimulator user' $OS_ACCOUNT
USER $OS_ACCOUNT:$OS_ACCOUNT
# Version information that goes in the image
RUN mkdir -p $VERSIONDIR \
&& cd $VERSIONDIR \
&& echo $BUILD_DATE > "BUILD_DATE" \
&& echo $BUILD_DAY > "BUILD_DAY" \
&& echo $OS_DOCKER_VERSION > "OS_DOCKER_VERSION" \
&& echo $OS_DOCKER_GIT_BRANCH > "OS_DOCKER_GIT_BRANCH" \
&& echo $OS_DOCKER_GIT_COMMIT > "OS_DOCKER_GIT_COMMIT" \
&& echo $OS_DOCKER_GIT_COMMIT_SHORT > "OS_DOCKER_GIT_COMMIT_SHORT" \
&& echo ${OS_DOCKER_VERSION}-${BUILD_DAY}-${OS_DOCKER_GIT_COMMIT_SHORT} > "OS_DOCKER_IMAGE_VERSION"
# Fetch the latest version of the NCG sources.
RUN cd $OPENSIMHOME \
&& git clone --depth=1 -b $OS_BRANCH --single-branch $OS_REPO opensim
# Extract version information from the fetched sources
RUN cd $OPENSIMDIR \
&& git rev-parse HEAD > $VERSIONDIR/OS_GIT_COMMIT \
&& git rev-parse --short HEAD > $VERSIONDIR/OS_GIT_COMMIT_SHORT \
&& echo $OS_BRANCH > $VERSIONDIR/OS_BRANCH \
&& grep "const string VersionNumber" ./OpenSim/Framework/VersionInfo.cs | \
sed -e "s/^.*VersionNumber = \"\(.*\)\".*$/\1/" > $VERSIONDIR/OS_VERSION
# Build OpenSimulator
RUN cd $OPENSIMDIR \
&& dotnet build --configuration $OS_BUILDTARGET $OS_SLN
# None of the configuration files in the built image are used
# Configuration files are all specified by invocation parameter.
# =======================================================================
# Create the binary only container with the dotnet8 runtime
FROM mcr.microsoft.com/dotnet/aspnet:8.0 AS release
# In the target image, these are directories built and used
ARG OPENSIMHOME=/home/opensim
ARG OPENSIMDIR=/home/opensim/opensim
ARG VERSIONDIR=/home/opensim/VERSION
ARG OS_BUILDTARGET=Release
ARG OS_ACCOUNT=opensim
# Include required packages ('coreutils,git,vim' included for debugging)
RUN apt-get update \
&& apt-get install -y \
coreutils procps git vim \
screen \
ccrypt \
cron \
libgdiplus \
libc6-dev \
mariadb-client \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
# The simulator is run under the user name 'opensim'
RUN adduser --disabled-password --gecos 'OpenSimulator user' $OS_ACCOUNT
USER $OS_ACCOUNT:$OS_ACCOUNT
# Scripts that keep OpenSimulator running, make crash reports, clean up log files, etc
COPY --chown=opensim:opensim temp-run-scripts/*.sh $OPENSIMHOME
COPY --chown=opensim:opensim temp-run-scripts/crontab $OPENSIMHOME
COPY --chown=opensim:opensim temp-run-scripts/vimrc $OPENSIMHOME/.vimrc
# Copy the binary files
COPY --from=build --chown=opensim:opensim $OPENSIMDIR/build/$OS_BUILDTARGET $OPENSIMDIR/bin
COPY --from=build --chown=opensim:opensim $VERSIONDIR $VERSIONDIR
# The .ini files in config-include in the image are not used and are emptied here to eliminate any confusion
RUN cd $OPENSIMDIR/bin/config-include \
&& $OPENSIMHOME/nullOutConfigInclude.sh
# Create the directory that is mounted that includes all the configuration
RUN mkdir -p $OPENSIMDIR/bin/config
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
+38
View File
@@ -0,0 +1,38 @@
#! /bin/bash
# Build docker images for running a standalone version of NCG
BUILD_DATE=$(date "+%Y%m%d.%H%M")
BUILD_DAY=$(date "+%Y%m%d")
# version infomation about opensim-docker
OS_DOCKER_VERSION=$(cat ../VERSION.txt)
OS_DOCKER_GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
OS_DOCKER_GIT_COMMIT=$(git rev-parse HEAD)
OS_DOCKER_GIT_COMMIT_SHORT=$(git rev-parse --short HEAD)
# Set up the environment with all the environment build parameters
source ./env
# Copy the run-scripts into the local directory here since the Docker build
# only knowns the context of this directory
rm -rf temp-run-scripts
cp -r ../run-scripts temp-run-scripts
# Build the image
docker build \
--pull \
--build-arg BUILD_DATE=$BUILD_DATE \
--build-arg BUILD_DAY=$BUILD_DAY \
--build-arg OS_DOCKER_VERSION=$OS_DOCKER_VERSION \
--build-arg OS_DOCKER_GIT_BRANCH=$OS_DOCKER_GIT_BRANCH \
--build-arg OS_DOCKER_GIT_COMMIT=$OS_DOCKER_GIT_COMMIT \
--build-arg OS_DOCKER_GIT_COMMIT_SHORT=$OS_DOCKER_GIT_COMMIT_SHORT \
--build-arg OS_REPO=$OS_REPO \
--build-arg OS_BRANCH=$OS_BRANCH \
--build-arg OS_BUILDTARGET=$OS_BUILDTARGET \
--build-arg OS_SLN=$OS_SLN \
-t "$IMAGE_NAME" \
-f Dockerfile-ncg \
.
# Remove the temporarily copied run-scripts to reduce any confusion
rm -rf temp-run-scripts
+88
View File
@@ -0,0 +1,88 @@
; This file is the first configuration file read.
; A normal configuration reads OpenSimDefaults.ini and then
; OpenSim.ini but, in this configuration setup, OpenSimDefaults.ini
; is read from the image, OpenSim.ini does not exist, and then
; this Includes.ini is read to setup global variables and then
; include the files that are in the $OPENSIMCONFIGDIR/config-include
; directory.
; Most of the included files are stock from the sources. The final "misc.ini"
; overlays values and should include the per-simulator instance changes.
; The order of include files is important as new values overlay the previous values.
; Note that all the .ini files in the regular bin/config-include have
; been null'ed out (they exist but do nothing). This is because
; the OpenSim sources often presume the config directory is "./".
; Values from the environment. Usually set from file "./env".
; The values specified here are not used.
; These can be referenced with "${Environment|Name}"
[Environment]
MYSQL_DB_HOST=dbservice
MYSQL_DB_DB=opensim
MYSQL_DB_USER=opensim
MYSQL_DB_USER_PW=NoOneKnowsIt
DEFAULT_ESTATE_NAME=MyEstate
DEFAULT_ESTATE_OWNER=Fred Flintstone
DEFAULT_ESTATE_OWNER_UUID=ff5ec374-8028-43cb-ae58-8d38d70729e5
DEFAULT_ESTATE_OWNER_PW=SomeSecret
; Copy of the [Const] section in OpenSim.ini.example since it is used in
; some of the stock include files
[Const]
; this section defines constants for grid services
; to simplify other configuration files default settings
;# {BaseHostname} {} {BaseHostname} {"example.com" "127.0.0.1"} "127.0.0.1"
BaseHostname = "127.0.0.1"
;# {BaseURL} {} {BaseURL} {"http://${Const|BaseHostname}} "http://${Const|BaseHostname}"
BaseURL = http://${Const|BaseHostname}
; If you run a grid, several services should not be availble to world, access to them should be blocked on firewall
; PrivatePort should closed at the firewall.
;# {PublicPort} {} {PublicPort} {8002 9000} "9000"
; in case of a standalone this needs to match the parameter http_listener_port in section [Network] below
; in that case the default is 9000
PublicPort = "9000"
; for a region on a grid, the grid services public port should be used, normal default is 8002
;PublicPort = "8002"
; you can also have them on a diferent url / IP
;# {PrivURL} {} {PrivURL} {"http://${Const|BaseURL}} "${Const|BaseURL}"
PrivURL = ${Const|BaseURL}
;grid default private port 8003, not used in standalone
;# {PrivatePort} {} {PrivatePort} {8003} "8003"
; port to access private grid services.
; grids that run all their regions should deny access to this port
; from outside their networks, using firewalls
PrivatePort = "8003"
[Startup]
; Region definitions are in this directory (rather than 'bin/Regions')
; Reads all .ini files in this directory
region_info_source = "filesystem"
regionload_regionsdir = "/home/opensim/opensim/bin/config/Regions"
; Region specification from URL.
; Expects XML (see http://opensimulator.org/wiki/Configuring_Regions)
;region_info_source = "web"
;regionload_webserver_url = "http://myoracle.example.com/Region?name=thisRegion"
[Architecture]
Include-osslDefaultEnable = "/home/opensim/opensim/bin/config/config-include/osslDefaultEnable.ini"
; 'osslDefaultEnable.ini' includes the now empty 'bin/config-include/osslEnable.ini.ini'.
; The next line includes the 'osslEnable.ini' from this configuration.
Include-osslEnable = "/home/opensim/opensim/bin/config/config-include/osslEnable.ini"
Include-Architecture = "/home/opensim/opensim/bin/config/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 = "/home/opensim/opensim/bin/config/config-include/StandaloneCommon.ini"
Include-Flotsam = "/home/opensim/opensim/bin/config/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 = "/home/opensim/opensim/bin/config/config-include/Final.ini"
+28
View File
@@ -0,0 +1,28 @@
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 are normally included (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 all INI files
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/standalone/Includes.ini'
into 'bin/config'. This file includes all the INI files
needed to configure same. 'Includes.ini' includes files from the '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.
Edit 'Misc.ini' for specific simulator settings.
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.
One can completely override the configuration included in this Docker image build
by mounting a bind volume over '/home/opensim/opensim/bin/config'. For this case,
all normal OpenSimulator configuration is replaced by whatever one puts in
that 'config' directory.
@@ -0,0 +1,105 @@
; * This is an example region config file.
; *
; * If OpenSimulator is started up without any regions, it will ask you configuration questions to generate a Regions.ini file for you.
; * So there is no need to change this file directly, it is only for reference.
; * However, if you prefer you can also copy this file to Regions.ini and appropriately change the parameters below.
; * Only files ending with .ini and .xml in this directly will be loaded by OpenSimulator.
; *
; * You can multiple regions into one file or make one file per region
; * The section name is the region name
; *
[Default Region]
; *
; * You MUST change this! It will NOT be done for you!
; *
RegionUUID = 2f75645d-acfd-4296-9cc5-8b1f0537fdaf
Location = 1000,1000
InternalAddress = 0.0.0.0
InternalPort = 9000
AllowAlternatePorts = False
ExternalHostName = SYSTEMIP
;; Estate ID or Name to connect region to, leave blank for console prompt, remember estate id can not be less than 100
;; this value is only used when creating a region and after that will be ignored. 0 Will use the next auto id provided by the database
;TargetEstate = 0
; *
; * Variable-sized regions allows the creation of large, borderless spaces.
; * The default is 256 meters. For larger spaces, set these to multiples of 256.
; * For the time being, X and Y need to be the same.
; *
; SizeX = 512
; SizeY = 512
; * Default region landing point used when no teleport coords are specified
; DefaultLanding = <128,128,30>
; *
; * Prim data
; * This allows limiting the sizes of prims and the region prim count
; *
; NonPhysicalPrimMax = 256
; PhysicalPrimMax = 64
; ClampPrimSize = False
; MaxPrims = 15000
; MaxAgents = 100
; * Max prims per user (per parcel).
; * Negative values will disable the check.
; MaxPrimsPerUser = -1
; *
; * Multi-Tenancy. Only set if needed
; *
; ScopeID = "00000000-0000-0000-0000-000000000000"
; *
; * Product name (used in search from viewer 1.23
; *
; RegionType = "Mainland"
; * Region Specific Static Maptiles:
; * Important: To use any kind of texture *assets* as a static maptile, the following
; * things must be set in the [Map] section of OpenSim.ini :
; *
; * MapImageModule = "MapImageModule"
; * GenerateMaptiles = false
; *
; * Now, there is a setting in [Map] in OpenSim.ini called
; *
; * MaptileStaticUUID = 00000000-0000-0000-0000-000000000000
; *
; * where, given the criteria above, lets you specify the UUID of a texture asset to use
; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for
; * Simulators that run multiple regions:
; MaptileStaticUUID = 00000000-0000-0000-0000-000000000000
; * Region Specific Static Maptiles from file:
; * It is also possible to create maptiles using external image files of the right size
; * and supported formats (bmp,png,jpg in RGB 24bpp format)
; *
; * Important: To use any kind of texture *files* as a static maptile, the following
; * things must be set in the [Map] section of OpenSim.ini :
; *
; * MapImageModule = "MapImageModule"
; * GenerateMaptiles = true
; *
; * The image must be the same size in pixels as the region or varregion is in meters.
; * i.e. 256x256 pixels for single region of 256x256m, or 1280x1280 pixels for a varregion
; * of size 1280x1280m. The image can be loaded from anywhere by setting the path
; * ie: MaptileStaticFile = "maptiles/SomeFile.png"
; *
; * If this setting is used, then the base map is generated from this file instead of being
; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are
; * still drawn on top of the static map by the World Map module.
; MaptileStaticFile = "SomeFile.png"
@@ -0,0 +1,105 @@
; * This is an example region config file.
; *
; * If OpenSimulator is started up without any regions, it will ask you configuration questions to generate a Regions.ini file for you.
; * So there is no need to change this file directly, it is only for reference.
; * However, if you prefer you can also copy this file to Regions.ini and appropriately change the parameters below.
; * Only files ending with .ini and .xml in this directly will be loaded by OpenSimulator.
; *
; * You can multiple regions into one file or make one file per region
; * The section name is the region name
; *
[Default Region]
; *
; * You MUST change this! It will NOT be done for you!
; *
RegionUUID = 11111111-2222-3333-4444-555555555555
Location = 1000,1000
InternalAddress = 0.0.0.0
InternalPort = 9000
AllowAlternatePorts = False
ExternalHostName = SYSTEMIP
;; Estate ID or Name to connect region to, leave blank for console prompt, remember estate id can not be less than 100
;; this value is only used when creating a region and after that will be ignored. 0 Will use the next auto id provided by the database
;TargetEstate = 0
; *
; * Variable-sized regions allows the creation of large, borderless spaces.
; * The default is 256 meters. For larger spaces, set these to multiples of 256.
; * For the time being, X and Y need to be the same.
; *
; SizeX = 512
; SizeY = 512
; * Default region landing point used when no teleport coords are specified
; DefaultLanding = <128,128,30>
; *
; * Prim data
; * This allows limiting the sizes of prims and the region prim count
; *
; NonPhysicalPrimMax = 256
; PhysicalPrimMax = 64
; ClampPrimSize = False
; MaxPrims = 15000
; MaxAgents = 100
; * Max prims per user (per parcel).
; * Negative values will disable the check.
; MaxPrimsPerUser = -1
; *
; * Multi-Tenancy. Only set if needed
; *
; ScopeID = "00000000-0000-0000-0000-000000000000"
; *
; * Product name (used in search from viewer 1.23
; *
; RegionType = "Mainland"
; * Region Specific Static Maptiles:
; * Important: To use any kind of texture *assets* as a static maptile, the following
; * things must be set in the [Map] section of OpenSim.ini :
; *
; * MapImageModule = "MapImageModule"
; * GenerateMaptiles = false
; *
; * Now, there is a setting in [Map] in OpenSim.ini called
; *
; * MaptileStaticUUID = 00000000-0000-0000-0000-000000000000
; *
; * where, given the criteria above, lets you specify the UUID of a texture asset to use
; * as a maptile *Simulator Wide*. Here, you can override that on a per region basis for
; * Simulators that run multiple regions:
; MaptileStaticUUID = 00000000-0000-0000-0000-000000000000
; * Region Specific Static Maptiles from file:
; * It is also possible to create maptiles using external image files of the right size
; * and supported formats (bmp,png,jpg in RGB 24bpp format)
; *
; * Important: To use any kind of texture *files* as a static maptile, the following
; * things must be set in the [Map] section of OpenSim.ini :
; *
; * MapImageModule = "MapImageModule"
; * GenerateMaptiles = true
; *
; * The image must be the same size in pixels as the region or varregion is in meters.
; * i.e. 256x256 pixels for single region of 256x256m, or 1280x1280 pixels for a varregion
; * of size 1280x1280m. The image can be loaded from anywhere by setting the path
; * ie: MaptileStaticFile = "maptiles/SomeFile.png"
; *
; * If this setting is used, then the base map is generated from this file instead of being
; * built using MapImageModule's terrain and prim renderer. Parcel 'for sale' overlays are
; * still drawn on top of the static map by the World Map module.
; MaptileStaticFile = "SomeFile.png"
+44
View File
@@ -0,0 +1,44 @@
; Misc over-rides and settings
[Startup]
MaxPoolThreads = 45
PhysicalPrimMax = 256
; physics = BulletSim
physics = ubODE
meshing = ubODEMeshmerizer
; physics = OpenDynamicsEngine
; CombineContiguousRegions = true
; Turn off periodic statistics output to console
LogShowStatsSeconds = 0
[DatabaseService]
; SQLite
; Include-Storage = "/home/opensim/opensim/bin/config/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=${Environment|MYSQL_DB_HOST};Database=${Environment|MYSQL_DB_DB};User ID=${Environment|MYSQL_DB_USER};Password=${Environment|MYSQL_DB_USER_PW};SslMode=None;"
[Estates]
; NOTE That names and passwords come from environment variables set from os-secrets
DefaultEstateName = ${Environment|DEFAULT_ESTATE_NAME}
DefaultEstateOwnerName = ${Environment|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 = ${Environment|DEFAULT_ESTATE_OWNER_UUID}
DefaultEstateOwnerEMail = owner@example.com
DefaultEstateOwnerPassword = ${Environment|DEFAULT_ESTATE_OWNER_PW}
[Terrain]
SendTerrainUpdatesByViewDistance = true
[ExtendedPhysics]
Enabled = true
[XEngine]
; If one uses XEngine, use a larger thread stack
ThreadStackSize = 500000
@@ -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,124 @@
;;
;; Please don't change this file.
;; All optional settings are in StandaloneCommon.ini.example,
;; which you can copy and change.
;;
[Modules]
AssetServices = "RegionAssetConnector"
InventoryServices = "LocalInventoryServicesConnector"
NeighbourServices = "NeighbourServicesOutConnector"
AuthenticationServices = "LocalAuthenticationServicesConnector"
AuthorizationServices = "LocalAuthorizationServicesConnector"
GridServices = "RegionGridServicesConnector"
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"
; For RegionAssetConnector
LocalGridAssetService = "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,402 @@
; 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
; Remove SslMode=None if you need secure connection to the local MySQL
; In most cases ssl is just a pure waste of resources, specially when MySQL is on same machine, and closed to outside
; If using MySQL 8.0.4 or later, check that default-authentication-plugin=mysql_native_password
; rather than caching_sha2_password is set in /etc/mysql/mysql.conf.d/mysqld.cnf (not applicable to MariaDB).
;StorageProvider = "OpenSim.Data.MySQL.dll"
;ConnectionString = "Data Source=localhost;Database=opensim;User ID=opensim;Password=***;Old Guids=true;SslMode=None;"
; 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;SslMode=None;"
; 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=***;SSL Mode = Disable"
[Hypergrid]
; Uncomment the variable GatekeeperURI to enable
; Hypergrid configuration. Otherwise, ignore.
;# {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}"
;# {GatekeeperURIAlias} {Hypergrid} {alternative hostnames (FQDN) or IPs of the gatekeeper of this world and port (default 80 or 443 if entry starts with https://)} {}
;; comma separated list,
;; this is to allow this world to identify this entries also as references to itself
;; entries can be unsecure url (host:port) if using ssl, direct login url if diferent, old grid url, etc
; GatekeeperURIAlias = myoldname.something.org, 127.0.0.1,127.0.0.1:8043
;# {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}"
;# {HomeURIAlias} {Hypergrid} {alternative hostnames (FQDN), or IPs of the home service of this world and port (default 80 or 443)} {}
;; comma separated list,
;; see GatekeeperURIAlias
; HomeURIAlias = myoldname.something.org, 127.0.0.1,127.0.0.1:8043
[Modules]
;; Asset cache module.
;; Warning this is required for several region features
AssetCaching = "FlotsamAssetCache"
Include-FlotsamCache = "config-include/FlotsamCache.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, DefaultHGRegion"
;; Allow supporting viewers to export content
;; Set to false to prevent export
ExportSupported = true
[LibraryModule]
; Set this if you want to change the name of the OpenSim Library
;LibraryName = "My World's Library"
[LoginService]
WelcomeMessage = "Welcome, Avatar!"
SRV_HomeURI = "${Hypergrid|HomeURI}"
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
;; If the region requested at login is not found and there are no default or fallback regions
;; online or defined in section [GridService], try to send user to any region online
;; this similar to legacy (was disabled on 0.9.2.0)
;; you should set this to false and define regions with Default and possible Fallback flags
;; With this option set to true, users maybe sent to regions they where not supposed to be, or even know about
;AllowLoginFallbackToAnyRegion = true
; 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}/
;; a http page for grid status
;GridStatus = ${Const|BaseURL}:${Const|PublicPort}/GridStatus
;; a RSS page for grid status
;GridStatusRSS = ${Const|BaseURL}:${Const|PublicPort}/GridStatusRSS
[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
[HGAssetService]
;; 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 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]
[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,234 @@
; 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/Category:OSSL_Functions for a description of OSSL functions
; do not edit this file.
; copy the line you want to change and paste it on osslEnable.ini, then change there
[OSSL]
; Allow the use of os* functions (some are always available)
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
; Send function permission error to owner if true, to all if false
PermissionErrorToOwner = false
; Function Threat level
; Several functions have a predefined threat level, one of: None, VeryLow, Low, Moderate, High, VeryHigh, Severe.
; See http://opensimulator.org/wiki/Threat_level for more information on these levels.
; 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.
; This setting defines the highest level allowed to execute
OSFunctionThreatLevel = VeryLow
; The threat level can be replaced by more detailed rules by lines of the form
; Allow_FunctionName = parameters
; To use the default threat level coment the respective line
; parameters can be:
; 'false' disables the function.
; 'true' enables for everyone
; or 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 threat level also can be replaced by lines of the form
; Creators__FunctionName = comma separated list of UUIDs
; this will enable the function for users that are the script creators and owners of the prim
; *************************************************
; 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_osGetSunParam = true
Allow_osNpcGetOwner = ${OSSL|osslNPC}
Allow_osSetSunParam = 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_osSetParcelMediaURL = ${OSSL|osslParcelOG}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetParcelMusicURL = ${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
; 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_osReplaceAgentEnvironment = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetSpeed = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetOwnerSpeed = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osRequestURL = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
Allow_osRequestSecureURL = ${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_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_osSetDynamicTextureURL = ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetDynamicTextureURLBlend = ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetDynamicTextureURLBlendFace = ESTATE_MANAGER,ESTATE_OWNER
Allow_osSetRot = false
Allow_osSetParcelDetails = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
; ThreatLevel Severe
Allow_osConsoleCommand = false
Allow_osKickAvatar = ${OSSL|osslParcelO}ESTATE_MANAGER,ESTATE_OWNER
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
; Always available
; see http://opensimulator.org/wiki/Category:OSSL_Functions
;; do no remove this line
Include-osslEnable = "config-include/osslEnable.ini"
@@ -0,0 +1,82 @@
; local region changes for Enable OSSL functions.
; copy this file to osslEnable.ini, unless you already have one with local changes that are still valid for current opensim version.
; this file is included from osslDefaultEnable.ini file where defaults are defined, and allows to override them
; to not edit that file, copy the line you want to change to this file, then edit here
; see osslDefaultEnable.ini and
; http://opensimulator.org/wiki/Category:OSSL_Functions for a description of OSSL functions
; do not delete this line;
[OSSL]
; Allow the use of os* functions (some are always available)
;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
; Send function permission error to owner if true, to all if false
;PermissionErrorToOwner = false
; Function Threat level
; Several functions have a predefined threat level, one of: None, VeryLow, Low, Moderate, High, VeryHigh, Severe.
; See http://opensimulator.org/wiki/Threat_level for more information on these levels.
; 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.
; This setting defines the highest level allowed to execute
OSFunctionThreatLevel = VeryLow
; The threat level can be replaced by more detailed rules by lines of the form
; Allow_FunctionName = parameters
; To use the default threat level coment the respective line
; parameters can be:
; 'false' disables the function.
; 'true' enables for everyone
; or 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
; example
; Allow_osNpcCreate = ${OSSL|osslNPC}
; The threat level also can be replaced by lines of the form
; Creators__FunctionName = comma separated list of UUIDs
; this will enable the function for users that are the script creators and owners of the prim
; *************************************************
; add lines with our region local changes, below this to replace the default on osslDefaultEnable.ini or code.
@@ -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"
+35
View File
@@ -0,0 +1,35 @@
# 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
# "OPENSIM_CONFIGKEY". So, edit this file and do:
# cp os-secrets tempFile
# <edit 'tempFile' adding real passwords>
# ccrypt -e -E "OPENSIM_CONFIGKEY" < tempFile > os-secrets.crypt
# rm tempFile
# or (exposing the key in the bash history):
# ccrypt -e -K thekey < os-secrets > os-secrets.crypt
#
# Later, if you need to review the passwords, decrypt the file with:
# ccrypt -d -E "OPENSIM_CONFIGKEY" < os-secrets.crypt
# If this next variable is defined, MYSQL is configured
export MYSQL_ROOT_PASSWORD=unknownStuff
export MYSQL_DB_HOST=dbservice
export MYSQL_DB_DB=opensim
export MYSQL_DB_USER=opensim
export MYSQL_DB_USER_PW=moreUnknownStuff
export OPENSIM_USER=opensim
# The following are used to initialize estate if running standalone
export DEFAULT_ESTATE_NAME="MyEstate"
export DEFAULT_ESTATE_OWNER="Donald Duck"
export DEFAULT_ESTATE_OWNER_UUID=ff5ec374-8028-43cb-ae58-8d38d70729e5
export DEFAULT_ESTATE_OWNER_PW=SomeSecret
# Did I mention that one should NEVER, NEVER, EVER check-in a version
# with the real passwords in it?
+73
View File
@@ -0,0 +1,73 @@
#! /bin/bash
# Script to create database 'opensim' in mysql if it does not exist.
# This is usually run in the container on the first time it is invoked.
# This creates the database for this simulator (MYSQL_DB_HOST) if it
# doesn't exist.
#
# Someone has set the environment variables before running this.
# Needs:
# MYSQL_ROOT_PASSWORD
# MYSQL_DB_HOST
# MYSQL_DB_DB
# MYSQL_DB_USER
# MYSQL_DB_USER_PW
OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin}
OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config}
echo "opensim-docker: initializeDb.sh: "
cd "$OPENSIMCONFIG"
if [[ ! -z "$MYSQL_ROOT_PASSWORD" ]] ; then
for needed in "MYSQL_DB_DB" "MYSQL_DB_HOST" "MYSQL_DB_USER" "MYSQL_DB_USER_PW" ; do
if [[ -z "$!needed" ]] ; then
echo "opensim-docker: initializeDb.sh: missing required env parameter $needed"
echo "opensim-docker: initializeDb.sh: DATABASE NOT INITIALIZED"
exit 5
fi
done
SQLCMDS=/tmp/mymy$$
SQLOPTIONS=/tmp/mymyoptions$$
rm -f "$SQLCMDS"
rm -f "$SQLOPTIONS"
# Create command file that creates the SQL database and SQL user for this simulator.
cat > "$SQLCMDS" <<EOFFFF
CREATE DATABASE $MYSQL_DB_DB;
USE $MYSQL_DB_DB;
CREATE USER '$MYSQL_DB_USER'@'%' IDENTIFIED BY '$MYSQL_DB_USER_PW';
GRANT ALL ON $MYSQL_DB_DB.* to '$MYSQL_DB_USER'@'%';
quit
EOFFFF
cat > "$SQLOPTIONS" <<EOFFFF
[client]
user=root
password=$MYSQL_ROOT_PASSWORD
host=$MYSQL_DB_HOST
EOFFFF
# If the database is started at the same time, what for it to initialize
until mysql --defaults-extra-file=$SQLOPTIONS -e "show databases" ; do
echo "opensim-docker: initializeDb.sh: Waiting on database to be ready"
sleep 2
done
echo "opensim-docker: initializeDb.sh: Database is ready"
HASDB=$(mysql --defaults-extra-file=$SQLOPTIONS -e "show databases" | grep "^${MYSQL_DB_DB}$")
if [[ -z "$HASDB" ]] ; then
echo "opensim-docker: initialzeDb.sh: creating opensim database"
mysql --defaults-extra-file=$SQLOPTIONS < "$SQLCMDS"
else
echo "opensim-docker: initialzeDb.sh: opensim database has already been created"
fi
rm -f "$SQLCMDS"
rm -f "$SQLOPTIONS"
else
echo "opensim-docker: initializeDb.sh: Not configuring SQL database"
fi
+39
View File
@@ -0,0 +1,39 @@
#! /bin/bash
# Script that sets up the environment variables
# This script is run before the docker-compose file is run to get the
# database password and it is run when the opensim Docker container starts
# to get all the values for the configuration files.
OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin}
OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config}
cd "$OPENSIMCONFIG"
# See if we have encrypted secrets
unset HAVE_SECRETS
if [[ ! -z "$OPENSIM_CONFIGKEY" ]] ; then
for secretsFile in $OPENSIMCONFIG/os-secrets.crypt ; do
if [[ -e "$secretsFile" ]] ; then
echo "opensim-docker: setEnvironment.sh: have secrets file \"{$secretsFile}\""
source <(ccrypt -c -E OPENSIM_CONFIGKEY "$secretsFile")
HAVE_SECRETS=yes
break;
else
echo "opensim-docker: setEnvironment.sh: no encrypted secrets file"
fi
done
fi
# If no encrypted secrets, maybe unsecure plain-text secrets are available
if [[ -z "$HAVE_SECRETS" ]] ; then
echo "opensim-docker: setEnvironment.sh: trying plain text secrets"
for secretsFile in $OPENSIMCONFIG/os-secrets ; do
if [[ -e "$secretsFile" ]] ; then
echo "opensim-docker: setEnvironment.sh: plain text secrets from \"${secretsFile}\""
source "$secretsFile"
break;
else
echo "opensim-docker: setEnvironment.sh: no plain text secrets file"
fi
done
fi
+28
View File
@@ -0,0 +1,28 @@
#! /bin/bash
# Script run when the container starts and before OpenSimulator is started
#
# The operations done here are:
# -- if first time called, setup DB and initialize variables in configuration files
# -- move sub-config specific Includes.ini into the config directory
# -- update all the configuration files with environment variables
export OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin}
export OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config}
echo "opensim-docker: setup.sh: OPENSIMCONFIG=\"${OPENSIMCONFIG}\""
FIRSTTIMEFLAG=${HOME}/.configFirstTime
cd "$OPENSIMCONFIG"
# This sets CONFIG_NAME which is the configuration subdirectory (like standalone)
source ./scripts/setEnvironment.sh
# If this is the first time run, do database setup and some one-time configuration updates
if [[ ! -e "$FIRSTTIMEFLAG" ]] ; then
echo "opensim-docker: setup.sh: first time"
cd "$OPENSIMCONFIG"
# Do any database account and db creation
./scripts/initializeDb.sh
touch "$FIRSTTIMEFLAG"
fi
+42
View File
@@ -0,0 +1,42 @@
version: '3'
networks:
localnet:
driver: bridge
services:
dbservice:
# Use MariaDB
image: mariadb:latest
environment:
MYSQL_ROOT_PASSWORD:
# Parameters added to invocation.
# Default is to flush after every operation which slows Docker image down.
# This flushes log once a second.
command: --innodb_flush_log_at_trx_commit=2 --sync_binlog=0
volumes:
# NOTE: you must create this directory before starting the simulator
# This mysql data directory can be placed anywhere
- ~/opensim-sql-data:/var/lib/mysql
networks:
- localnet
# restart: always
opensim:
depends_on:
- dbservice
image: opensim-ncg
environment:
OS_CONFIG: standalone
volumes:
- ./config-$OS_CONFIG:/home/opensim/opensim/bin/config
networks:
- localnet
ports:
- 9000:9000/tcp
- 9000:9000/udp
- 9010:9010/tcp
- 9010:9010/udp
# restart: always
+27
View File
@@ -0,0 +1,27 @@
# Overall parameters for building and storing the OpenSimulator image.
# This file is 'source'ed in Bash scripts and used by docker-compose.
# While nearly everything can be moved into this file, these are the
# top level build and run configurations but most of the configuration
# happens in the config-$OS_CONFIG directory.
# NOTE: the assignment format is restricted so it works as a Bash
# assignment file and a docker-compose env-file
# The sources to build
OS_REPO=https://github.com/OpenSim-NGC/OpenSim-Sasquatch.git
OS_BRANCH=develop
# OS_BRANCH=opensim-rel-0.9.3.8940
OS_BUILDTARGET=Release
OS_SLN=OpenSim.sln
# The container parameters
IMAGE_OWNER=misterblue
IMAGE_NAME=opensim-ncg
IMAGE_VERSION=${OS_BRANCH}
DOCKER_IMAGE="${IMAGE_OWNER}/${IMAGE_NAME}:${IMAGE_VERSION}"
# The directory "config-$OS_CONFIG" is mounted inside the container
# at /home/opensim/opensim/bin/config. This is the directory that
# OpenSimulator reads all the .ini and .xml files from.
OS_CONFIG=standalone
+10
View File
@@ -0,0 +1,10 @@
#! bin/bash
# The ./env file is formatted for docker-compose
# This script outputs a conversion of that file with
# 'export' added to each line so it can be set into
# a Bash environment.
TEMPFILE=/tmp/envToEnvironment$$
sed -e 's/^\([A-Z]\)/export \1/' < ./env > "$TEMPFILE"
source "$TEMPFILE"
rm -f "$TEMPFILE"
+20
View File
@@ -0,0 +1,20 @@
#! /bin/bash
# Push the local image named "opensim-opensim" to the repository.
# The image tag is set to "latest".
# The repository image name can be over-ridden with the environment variable REPO_IMAGE.
export IMAGE_OWNER=${IMAGE_OWNER:-misterblue}
export IMAGE_NAME=${IMAGE_NAME:-opensim-ncg}
export IMAGE_VERSION=${IMAGE_VERSION:-latest}
VERSIONLABEL=$(docker run --rm --entrypoint /home/opensim/getVersion.sh ${IMAGE_NAME}:${IMAGE_VERSION} OS_BRANCH)
echo "Pushing docker image for opensim version ${VERSIONLABEL}"
for tagg in ${VERSIONLABEL} ${IMAGE_VERSION} ; do
IMAGE=${IMAGE_OWNER}/${IMAGE_NAME}:${tagg}
docker tag ${IMAGE_NAME} ${IMAGE}
echo " Pushing ${IMAGE}"
docker push ${IMAGE}
done
+18
View File
@@ -0,0 +1,18 @@
#! /bin/bash
# Stop the running opensimulator
BASE=$(pwd)
# Get the container parameters into the environment
# (Needs to be in the environment for the docker-compose.yml file)
source ./envToEnvironment.sh
export OS_CONFIG=${OS_CONFIG:-standalone}
echo "Restarting configuration $CONFIG_NAME from docker-compose.yml"
docker-compose \
--file docker-compose.yml \
--env-file ./env \
--project-name opensim-${OS_CONFIG} \
restart
+35
View File
@@ -0,0 +1,35 @@
#! /bin/bash
# Run the OpenSimulator image
# Since the initial run has to create and initialize the MYSQL database
# the first time, this sets the passwords into the environment before
# running things.
# Be sure to set environment variables:
# OS_CONFIG=nameOfRunConfiguration (default 'standalone' of not supplied)
BASE=$(pwd)
# Get the container parameters into the environment
# source ./envToEnvironment.sh
source ./env
export OS_CONFIG=${OS_CONFIG:-standalone}
# Local directory for storage of sql persistant data (so region
# contents persists between container restarts).
# This must be the same directory as in $COMPOSEFILE
if [[ ! -d "$HOME/opensim-sql-data" ]] ; then
echo "Directory \"$HOME/opensim-sql-data/\" does not exist. Creating same."
mkdir -p "$HOME/opensim-sql-data"
chmod o+w "$HOME/opensim-sql-data"
fi
# https://docs.docker.com/engine/security/userns-remap/
# --userns-remap="opensim:opensim"
docker-compose \
--file docker-compose.yml \
--env-file ./env \
--project-name opensim-${OS_CONFIG} \
up \
--detach
+18
View File
@@ -0,0 +1,18 @@
#! /bin/bash
# Stop the running opensimulator
BASE=$(pwd)
# Get the container parameters into the environment
# source ./envToEnvironment.sh
source ./env
export OS_CONFIG=${OS_CONFIG:-standalone}
echo "Stopping configuration $OS_CONFIG from docker-compose.sh"
docker-compose \
--file docker-compose.yml \
--env-file ./env \
--project-name opensim-${OS_CONFIG} \
down
+35 -20
View File
@@ -1,7 +1,7 @@
# OpenSim for a container
# docker build -t opensim-standalone .
FROM mcr.microsoft.com/dotnet/sdk:6.0-focal
FROM mcr.microsoft.com/dotnet/sdk:8.0 as build
LABEL Description="Docker container running OpenSimulator"
@@ -19,7 +19,7 @@ ARG OS_DOCKER_GIT_COMMIT_SHORT
# Arguments for fetching OpenSimulator
ARG OS_REPO=git://opensimulator.org/git/opensim
ARG OS_BRANCH=dotnet6
ARG OS_BRANCH=master
# Include required packages ('coreutils git vim' included for debugging)
# (20220127 using MariaDB as Mono image built on Debian 10)
@@ -30,7 +30,6 @@ RUN apt-get update \
ccrypt \
cron \
mariadb-client \
sqlite \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
# The simulator is run under the user name 'opensim'
@@ -38,11 +37,6 @@ RUN adduser --disabled-password --gecos 'OpenSimulator user' opensim
USER opensim:opensim
# Scripts that keep OpenSimulator running, make crash reports, clean up log files, etc
COPY --chown=opensim:opensim temp-run-scripts/*.sh /home/opensim/
COPY --chown=opensim:opensim temp-run-scripts/crontab /home/opensim/
COPY --chown=opensim:opensim temp-run-scripts/.vimrc /home/opensim/
# Version information that goes in the image
RUN mkdir -p $VERSIONDIR \
&& cd $VERSIONDIR \
@@ -71,19 +65,40 @@ RUN cd $OPENSIMDIR \
&& ./runprebuild.sh \
&& dotnet build --configuration Release OpenSim.sln
# OpenSim.ini and other INI files include from "config-include/*"
# so copy an empty versions to nullfy the default configuration.
RUN cd $OPENSIMDIR/bin \
&& /home/opensim/nullOutConfigInclude.sh
# None of the configuration files in the built image are used
# Configuration files are all specified by invocation parameter.
# Copy the configuration file sets for this image
RUN mkdir -p $OPENSIMDIR/bin/config
COPY --chown=opensim:opensim config/ $OPENSIMDIR/bin/config/
# Use the default, included configuration parameters
RUN cp $OPENSIMDIR/bin/OpenSim.ini.example $OPENSIMDIR/bin/OpenSim.ini
# =======================================================================
# Create the binary only container
FROM mcr.microsoft.com/dotnet/aspnet:8.0 as release
# Remove the run supression flag. If this file exists, OpenSim is not started by the run script.
RUN rm -f $OPENSIMDIR/../NOOPENSIM
ENV BASEDIR=/home/opensim
ENV OPENSIMDIR=/home/opensim/opensim
ENV VERSIONDIR=/home/opensim/VERSION
# Include required packages ('coreutils git vim' included for debugging)
RUN apt-get update \
&& apt-get install -y \
coreutils procps git vim \
screen \
ccrypt \
cron \
mariadb-client \
&& rm -rf /var/lib/{apt,dpkg,cache,log}/
# The simulator is run under the user name 'opensim'
RUN adduser --disabled-password --gecos 'OpenSimulator user' opensim
USER opensim:opensim
# Scripts that keep OpenSimulator running, make crash reports, clean up log files, etc
COPY --chown=opensim:opensim temp-run-scripts/*.sh /home/opensim/
COPY --chown=opensim:opensim temp-run-scripts/crontab /home/opensim/
COPY --chown=opensim:opensim temp-run-scripts/vimrc /home/opensim/.vimrc
# Copy the binary files
COPY --from=build --chown=opensim:opensim $OPENSIMDIR/bin $OPENSIMDIR/bin
COPY --from=build --chown=opensim:opensim $VERSIONDIR $VERSIONDIR
WORKDIR $OPENSIMDIR/bin
ENTRYPOINT [ "/home/opensim/bootOpenSim.sh" ]
@@ -100,5 +115,5 @@ ENTRYPOINT [ "/home/opensim/bootOpenSim.sh" ]
# 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
VOLUME $BASEDIR/config
+2
View File
@@ -0,0 +1,2 @@
If this file exists in /home/opensim, OpenSimulator will not be started.
Create this file to disable the periodic restart test operation.
+5
View File
@@ -2,6 +2,11 @@ This directory of files are copied into /home/opensim to act as the
startup and operation scripts for the instance of OpenSim that is running
in the docker container.
These scripts all run inside the container to control the running of
the OpenSimulator simulator. The scripts for controlling the container
(like starting and stopping the container from the command line) refer
to the image-* directory.
`bootOpenSim.sh` is run when the docker container starts and is responsible
for seeing that the configuration files and other setup (like DB) are initialized.
This script calls `firstTimeSetup.sh` for the first ever boot to do any
+2 -23
View File
@@ -13,29 +13,6 @@ export VERSIONDIR=$OPENSIMHOME/VERSION
export OPENSIMBIN=$OPENSIMHOME/opensim/bin
export OPENSIMCONFIG=$OPENSIMBIN/config
FIRSTTIMEFLAG=$OPENSIMHOME/.firstTimeFlag
# Some setup environment variables should have been set
for requiredEnv in "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
echo "Starting OpenSimulator version $(cat $VERSIONDIR/OS_VERSION)"
echo " with opensim-docker version $(cat $VERSIONDIR/OS_DOCKER_IMAGE_VERSION)"
@@ -43,6 +20,8 @@ echo " using configuration set \"$CONFIG_NAME\""
cd "$OPENSIMHOME"
./run.opensim.sh
# Wait around here because when this script exits the Docker container exits
while true ; do
sleep 300
./checkOpenSim.sh
+2 -4
View File
@@ -1,8 +1,8 @@
#! /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}
export OPENSIMHOME=${OPENSIMHOME:-/home/opensim}
export OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin}
CRASHLOG=${OPENSIMHOME}/crashlog.log
HDR="$(date +%Y%m%d%H%M):"
@@ -10,8 +10,6 @@ HDR="$(date +%Y%m%d%H%M):"
LASTCRASH=${OPENSIMHOME}/.lastCrash
TIMEAGO=${OPENSIMHOME}/.lastTimeAgo
cd
if [[ -e "${OPENSIMHOME}/NOOPENSIM" ]] ; then
exit 5
fi
+16 -3
View File
@@ -1,12 +1,25 @@
#! /bin/bash
# Return a version string for this image.
# The version string is formatted:
# OpenSimVersion-OpenSimGitCommit-OpenSimDockerVersion-BuildDate-OpenSimDockerCommit
# OpenSimVersion-OpenSimBranch-OpenSimGitCommit-BuildDate/OpenSimDockerImageVersion
# An example is:
# 0.9.2.1-17b5123-2.1.3-20220202-4b994b5
# 0.9.2.1-develop-17b5123-20240712.1234/2.1.3-20220202-4b994b5
# Verbose but it has all the version information.
export OPENSIMHOME=/home/opensim
export VERSIONDIR=$OPENSIMHOME/VERSION
echo "$(cat $VERSIONDIR/OS_VERSION)-$(cat $VERSIONDIR/OS_GIT_COMMIT_SHORT)-$(cat $VERSIONDIR/OS_DOCKER_IMAGE_VERSION)"
part=$1
cd "$VERSIONDIR"
for valueName in * ; do
export ${valueName}=$(cat "$valueName")
done
if [[ -z "$part" ]] ; then
echo "${OS_VERSION}-${OS_BRANCH}-${OS_GIT_COMMIT_SHORT}-${BUILD_DATE}/${OS_DOCKER_IMAGE_VERSION}"
else
cat ${VERSIONDIR}/$part
fi
# echo "$(cat $VERSIONDIR/OS_VERSION)-$(cat $VERSIONDIR/OS_GIT_COMMIT_SHORT)-$(cat $VERSIONDIR/OS_DOCKER_IMAGE_VERSION)-$(cat $VERSIONDIR/BUILD_DATE)-$($VERSIONDIR/OS_DOCKER_GIT_COMMIT_SHORT)"
+7 -1
View File
@@ -4,6 +4,11 @@
# Script that walks ./config-include and over-writes all INI files with empty contents.
# This also creates empty INI files for all the *.example files.
OPENSIMDIR=${OPENSIMDIR:-/home/opensim/opensim}
OPENSIMBIN=${OPENSIMBIN:-$OPENSIMDIR/bin}
cd "$OPENSIMBIN"
if [[ ! -d "./config-include" ]] ; then
echo "./config-include directory DOES NOT EXIST in the current directory"
echo "NOT DOING ANYTHING"
@@ -15,13 +20,14 @@ rm -f "$TEMPFILE"
cat > "$TEMPFILE" << EOFFFF
; 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.
; Look for the real configuration in the mounted config directory.
EOFFFF
for iniFile in $(find ./config-include -name \*.ini ) ; do
cp "$TEMPFILE" "$iniFile"
done
# this finds all .example files and creates an empty .ini file from that name
for exampleFile in $(find ./config-include -name \*.example) ; do
cp "$TEMPFILE" "${exampleFile%%.example}"
done
+29 -2
View File
@@ -1,10 +1,37 @@
#! /bin/bash
# Runs the simulators with screen
OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin}
export OPENSIMHOME=${OPENSIMHOME:-/home/opensim}
export OPENSIMBIN=${OPENSIMBIN:-/home/opensim/opensim/bin}
export OPENSIMCONFIG=${OPENSIMCONFIG:-$OPENSIMBIN/config}
# Check for disable flag
if [[ -e "${OPENSIMHOME}/NOOPENSIM" ]] ; then
exit 5
fi
cd "$OPENSIMBIN"
# If this configuration has stuff to do...
# This sets environment variables needed for running OpenSim (See Includes.ini)
if [[ -e "$OPENSIMCONFIG/setup.sh" ]] ; then
source $OPENSIMCONFIG/setup.sh
fi
cd "$OPENSIMBIN"
rm -f screenlog.0
rm -f *.log
screen -L -S OpenSimScreen -p - -d -m ./OpenSim -console=basic
# Start the simulator
# The configuration will read all .ini files from bin/config/.
# ALL other .ini files have been blanked so this is the ONLY configuration
# Simulator is run under 'screen'. Connect to console with "screen -r OpenSimScreen".
screen -L -S OpenSimScreen -p - -d -m dotnet OpenSim.dll -console=basic
# if logConfig is specified, expects to read Nini XML configuration
# -logConfig=/home/opensim/config/logConfig.ini
# iniFile is the main configuration file which defaults to "OpenSim.ini"
# -iniFile=/home/opensim/config/iniFile.ini \
# All .ini and .xml files are read from this directory
# -iniDirectory=/home/opensim/config
+1
View File
@@ -1,3 +1,4 @@
" file copied to /home/opensim/.vimrc
set tabstop=4
set shiftwidth=4
set expandtab